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
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
| Scope | Why it is requested |
|---|---|
data:read | Read your tasks, projects and comments |
data:read_write | Create, update and complete tasks and comments |
data:delete | Delete tasks |
Actions
Complete taskwritetodoist.complete_taskMark a task as completed (recurring tasks move to their next due date).
Needs scope: data:read_write
| Input | Type | Description | |
|---|---|---|---|
task_id | string | Required | Task ID |
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
| Input | Type | Description | |
|---|---|---|---|
content | string | Required | Comment text (Markdown) |
task_id | string | Optional | Task to comment on |
project_id | string | Optional | Project to comment on |
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
| Input | Type | Description | |
|---|---|---|---|
content | string | Required | Task title |
description | string | Optional | Longer description (Markdown) |
project_id | string | Optional | Project ID from list_projects (default: Inbox) |
section_id | string | Optional | Section ID |
parent_id | string | Optional | Parent task ID, to create a sub-task |
labels | array of string | Optional | Label names |
priority | integer | Optional | Priority 1 to 4; 4 is very urgent (shown as p1 in the app) and 1 is normal |
due_string | string | Optional | Human-readable due date, e.g. 'tomorrow at 12:00' |
due_date | string | Optional | Due date, YYYY-MM-DD |
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
| Input | Type | Description | |
|---|---|---|---|
task_id | string | Required | Task ID |
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
| Input | Type | Description | |
|---|---|---|---|
query | string | Required | Todoist filter query, e.g. 'today | overdue' |
limit | integer | Optional | Page size, 1 to 200 (default 50) |
cursor | string | Optional | next_cursor from the previous page |
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
| Input | Type | Description | |
|---|---|---|---|
task_id | string | Required | Task ID |
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
| Input | Type | Description | |
|---|---|---|---|
task_id | string | Optional | Task whose comments to list |
project_id | string | Optional | Project whose comments to list |
limit | integer | Optional | Page size, 1 to 200 (default 50) |
cursor | string | Optional | next_cursor from the previous page |
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
| Input | Type | Description | |
|---|---|---|---|
limit | integer | Optional | Page size, 1 to 200 (default 50) |
cursor | string | Optional | next_cursor from the previous page |
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
| Input | Type | Description | |
|---|---|---|---|
project_id | string | Optional | Only tasks in this project |
section_id | string | Optional | Only tasks in this section |
parent_id | string | Optional | Only sub-tasks of this task |
label | string | Optional | Only tasks with this label name |
limit | integer | Optional | Page size, 1 to 200 (default 50) |
cursor | string | Optional | next_cursor from the previous page |
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
| Input | Type | Description | |
|---|---|---|---|
task_id | string | Required | Task ID |
content | string | Optional | New title |
description | string | Optional | New description |
labels | array of string | Optional | Replacement list of label names |
priority | integer | Optional | Priority 1 to 4; 4 is very urgent (shown as p1 in the app) and 1 is normal |
due_string | string | Optional | Human-readable due date, e.g. 'next monday' |
due_date | string | Optional | Due date, YYYY-MM-DD |
await setu.execute({
userId: "user_1",
action: "todoist.update_task",
input: {
"task_id": "<task_id>"
},
});