CompleteTask icon
SlackIncomingWebhook icon
Webhook icon

Complete a Todoist Task Automatically When External Work Finishes

Complete Todoist tasks automatically with Kestra when deploys finish or tickets resolve. A webhook closes the task by id and acknowledges in Slack.

Categories
Business

Tasks that track external work have a specific failure mode: the work finishes and the task stays open, because closing it was a second, manual step. This blueprint deletes that step. When the deploy pipeline goes green or the ticket resolves, the system POSTs the Todoist task id to a Kestra webhook, io.kestra.plugin.todoist.CompleteTask marks the task done, and Slack gets an acknowledgment naming the closed task.

How it works

  1. done_webhook (io.kestra.plugin.core.trigger.Webhook) exposes a keyed endpoint. The sending system includes the task id in the JSON body as task_id.
  2. complete_task (io.kestra.plugin.todoist.CompleteTask) resolves the id as {{ trigger.body.task_id ?? inputs.task_id }}: the webhook body wins when present, and the optional task_id input covers manual runs and testing from the UI.
  3. acknowledge posts the completed task id to Slack, closing the loop visibly.
  4. The errors block posts a distinct Slack warning when completion fails, since a task believed closed but still open is worse than one never automated.

What you get

  • Task state that follows reality: when the work is done, the todo is done.
  • One integration pattern that works for any system able to send an HTTP POST, from CI pipelines to ticketing webhooks to a curl in a deploy script.
  • A manual fallback input, so the same flow doubles as a one-click task closer during testing.
  • A loud failure path for the dangerous case of a completion that did not happen.

Who it's for

  • Engineers who track deploys, migrations, or ticket follow-ups as Todoist tasks.
  • Teams pairing this with the alert-capture blueprint, so alerts open tasks and resolutions close them.
  • Anyone tired of a task list that lags behind the systems it describes.

Why orchestrate this with Kestra

The hard part is not the single API call; it is giving every external system one authenticated place to send the signal, handling a missing task id gracefully, telling the team it happened, and keeping a record. Kestra provides the keyed webhook, the secret storage for the Todoist token, the fallback logic, the Slack acknowledgment, and the execution history in one short flow.

Prerequisites

  • A Todoist account and a personal API token.
  • A Slack incoming webhook for acknowledgments and failure alerts.
  • An external system able to POST JSON containing task_id, typically stored when the task was created (the alert-capture blueprint exposes it as an output).

Secrets

  • TODOIST_API_TOKEN: Todoist personal API token.
  • SLACK_WEBHOOK_URL: Slack incoming webhook URL.

Quick start

  1. Add the two secrets to your Kestra namespace.
  2. Replace change-me-strong-webhook-key with a strong random string.
  3. Create a throwaway Todoist task, then POST {"task_id": "<its id>"} to the webhook URL.
  4. Confirm the task shows as completed in Todoist and the acknowledgment appears in Slack.

How to extend

  • Have the sending system include a summary field and interpolate it into the Slack message.
  • Chain io.kestra.plugin.todoist.GetTask before completion to log the task content in the acknowledgment.
  • Pair with the on-call alert blueprint: it creates the task and returns taskId, which the resolving system echoes back here.
  • Swap CompleteTask for io.kestra.plugin.todoist.UpdateTask if the done signal should reprioritize instead of close.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.