Setu Recipes: reusable workflows across every app.Browse templates

Integrations / Todoist

Todoist

Task management: tasks, projects, due dates and comments (Todoist API v1).

10 actions OAuth 2 5 read4 write1 destructive Calls api.todoist.com

Connect

TypeScript
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "todoist" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();

Permissions requested

ScopeWhy it is requested
data:readRead your tasks, projects and comments
data:read_writeCreate, update and complete tasks and comments
data:deleteDelete tasks

Actions

Complete taskwritetodoist.complete_taskMark a task as completed (recurring tasks move to their next due date).

Needs scope: data:read_write

InputTypeDescription
task_idstringRequiredTask ID
TypeScript
await setu.execute({
  userId: "user_1",
  action: "todoist.complete_task",
  input: {
    "task_id": "<task_id>"
  },
});
Add commentwritetodoist.create_commentAdd a comment to a task (pass task_id) or to a project (pass project_id). Exactly one of the two is required by Todoist.

Needs scope: data:read_write

InputTypeDescription
contentstringRequiredComment text (Markdown)
task_idstringOptionalTask to comment on
project_idstringOptionalProject to comment on
TypeScript
await setu.execute({
  userId: "user_1",
  action: "todoist.create_comment",
  input: {
    "content": "<content>"
  },
});
Create taskwritetodoist.create_taskCreate a task, optionally in a project or section, under a parent task, with labels, priority and a natural-language or exact due date.

Needs scope: data:read_write

InputTypeDescription
contentstringRequiredTask title
descriptionstringOptionalLonger description (Markdown)
project_idstringOptionalProject ID from list_projects (default: Inbox)
section_idstringOptionalSection ID
parent_idstringOptionalParent task ID, to create a sub-task
labelsarray of stringOptionalLabel names
priorityintegerOptionalPriority 1 to 4; 4 is very urgent (shown as p1 in the app) and 1 is normal
due_stringstringOptionalHuman-readable due date, e.g. 'tomorrow at 12:00'
due_datestringOptionalDue date, YYYY-MM-DD
TypeScript
await setu.execute({
  userId: "user_1",
  action: "todoist.create_task",
  input: {
    "content": "<content>"
  },
});
Delete taskdestructivetodoist.delete_taskPermanently delete a task and its sub-tasks. This cannot be undone through the API.

Needs scope: data:delete

InputTypeDescription
task_idstringRequiredTask ID
TypeScript
await setu.execute({
  userId: "user_1",
  action: "todoist.delete_task",
  input: {
    "task_id": "<task_id>"
  },
  confirm: true,
});
Find tasks by filterreadtodoist.filter_tasksFind tasks with a Todoist filter query such as 'today | overdue', 'p1', '#Work' or '@label'. Returns one page; pass next_cursor back as cursor for more.

Needs scope: data:read

InputTypeDescription
querystringRequiredTodoist filter query, e.g. 'today | overdue'
limitintegerOptionalPage size, 1 to 200 (default 50)
cursorstringOptionalnext_cursor from the previous page
TypeScript
await setu.execute({
  userId: "user_1",
  action: "todoist.filter_tasks",
  input: {
    "query": "<query>"
  },
});
Get taskreadtodoist.get_taskGet one active task by ID, including its content, description, labels, priority and due date.

Needs scope: data:read

InputTypeDescription
task_idstringRequiredTask ID
TypeScript
await setu.execute({
  userId: "user_1",
  action: "todoist.get_task",
  input: {
    "task_id": "<task_id>"
  },
});
List commentsreadtodoist.list_commentsList the comments on a task (pass task_id) or on a project (pass project_id). Exactly one of the two is required by Todoist.

Needs scope: data:read

InputTypeDescription
task_idstringOptionalTask whose comments to list
project_idstringOptionalProject whose comments to list
limitintegerOptionalPage size, 1 to 200 (default 50)
cursorstringOptionalnext_cursor from the previous page
TypeScript
await setu.execute({
  userId: "user_1",
  action: "todoist.list_comments",
  input: {},
});
List projectsreadtodoist.list_projectsList the user's projects with their IDs and names, so tasks can be created in or filtered by a project.

Needs scope: data:read

InputTypeDescription
limitintegerOptionalPage size, 1 to 200 (default 50)
cursorstringOptionalnext_cursor from the previous page
TypeScript
await setu.execute({
  userId: "user_1",
  action: "todoist.list_projects",
  input: {},
});
List tasksreadtodoist.list_tasksList active (not completed) tasks, optionally narrowed to a project, section, parent task or label. Returns one page; pass next_cursor back as cursor for more.

Needs scope: data:read

InputTypeDescription
project_idstringOptionalOnly tasks in this project
section_idstringOptionalOnly tasks in this section
parent_idstringOptionalOnly sub-tasks of this task
labelstringOptionalOnly tasks with this label name
limitintegerOptionalPage size, 1 to 200 (default 50)
cursorstringOptionalnext_cursor from the previous page
TypeScript
await setu.execute({
  userId: "user_1",
  action: "todoist.list_tasks",
  input: {},
});
Update taskwritetodoist.update_taskChange a task's title, description, labels, priority or due date. Only the fields you pass are changed.

Needs scope: data:read_write

InputTypeDescription
task_idstringRequiredTask ID
contentstringOptionalNew title
descriptionstringOptionalNew description
labelsarray of stringOptionalReplacement list of label names
priorityintegerOptionalPriority 1 to 4; 4 is very urgent (shown as p1 in the app) and 1 is normal
due_stringstringOptionalHuman-readable due date, e.g. 'next monday'
due_datestringOptionalDue date, YYYY-MM-DD
TypeScript
await setu.execute({
  userId: "user_1",
  action: "todoist.update_task",
  input: {
    "task_id": "<task_id>"
  },
});