New to Kestra?
Use blueprints to kickstart your first workflows.
Escalate overdue Todoist tasks automatically with Kestra. A daily sweep raises each overdue task to urgent priority and reports the count to Discord.
An overdue task with a normal priority looks exactly like every other task, which is how it stays overdue. This blueprint makes slippage visually loud: a daily sweep runs the Todoist overdue filter, iterates over every match, and sets each one to priority 4 through io.kestra.plugin.todoist.UpdateTask. Discord gets the count. The sweep is idempotent by construction, a task already at priority 4 simply stays at priority 4, so running it twice changes nothing.
list_overdue (io.kestra.plugin.todoist.ListTasks) evaluates the Todoist filter overdue with fetchType: FETCH, exposing the matches as {{ outputs.list_overdue.rows }} and the count as {{ outputs.list_overdue.size }}.loop_tasks (io.kestra.plugin.core.flow.Loop) fans out over the rows. Each iteration receives one task as a JSON string in item.value, and fromJson(item.value).id extracts the task id.raise_priority (io.kestra.plugin.todoist.UpdateTask) sets priority: 4 on that task, moving it to the top of priority-sorted views.report posts the escalation count to Discord; the errors block posts a distinct alert when the sweep itself fails.Schedule trigger runs the sweep daily at 06:30, before the morning agenda is read.Todoist can show overdue tasks but will not change them for you. Kestra supplies the loop: a scheduled query, a fan-out over the results with per-item error isolation, secret handling for the API token, and an execution history that records exactly which tasks were escalated on which day.
TODOIST_API_TOKEN: Todoist personal API token.DISCORD_WEBHOOK_URL: Discord incoming webhook URL.disabled: false on the daily trigger.projectId, or tighten the filter to overdue & !assigned to: others.dueString such as today to the update, pulling slipped tasks back onto today's list as well.