Todoist

Learn how to use Todoist with Composio

Overview

SLUG: TODOIST

Description

Todoist is a task management tool allowing users to create to-do lists, set deadlines, and collaborate on projects with reminders and cross-platform syncing

Authentication Details

client_id
stringRequired
client_secret
stringRequired
oauth_redirect_uri
stringDefaults to https://backend.composio.dev/api/v1/auth-apps/add
scopes
stringDefaults to data:read_write
bearer_token
string

Connecting to Todoist

Create an auth config

Use the dashboard to create an auth config for the Todoist toolkit. This allows you to connect multiple Todoist accounts to Composio for agents to use.

1

Select App

Navigate to the Todoist toolkit page and click “Setup Integration”.

2

Configure Auth Config Settings

Select among the supported auth schemes of and configure them here.

3

Create and Get auth config ID

Click “Create Integration”. After creation, copy the displayed ID starting with ac_. This is your auth config ID. This is not a sensitive ID — you can save it in environment variables or a database. This ID will be used to create connections to the toolkit for a given user.

Connect Your Account

Using OAuth2

1from composio import Composio
2
3# Replace these with your actual values
4todoist_auth_config_id = "ac_YOUR_TODOIST_CONFIG_ID" # Auth config ID created above
5user_id = "0000-0000-0000" # UUID from database/application
6
7composio = Composio()
8
9
10def authenticate_toolkit(user_id: str, auth_config_id: str):
11 connection_request = composio.connected_accounts.initiate(
12 user_id=user_id,
13 auth_config_id=auth_config_id,
14 )
15
16 print(
17 f"Visit this URL to authenticate Todoist: {connection_request.redirect_url}"
18 )
19
20 # This will wait for the auth flow to be completed
21 connection_request.wait_for_connection(timeout=15)
22 return connection_request.id
23
24
25connection_id = authenticate_toolkit(user_id, todoist_auth_config_id)
26
27# You can also verify the connection status using:
28connected_account = composio.connected_accounts.get(connection_id)
29print(f"Connected account: {connected_account}")

Tools

Executing tools

To prototype you can execute some tools to see the responses and working on the Todoist toolkit’s playground

Python
1from composio import Composio
2from openai import OpenAI
3import json
4
5openai = OpenAI()
6composio = Composio()
7
8# User ID must be a valid UUID format
9user_id = "0000-0000-0000" # Replace with actual user UUID from your database
10
11tools = composio.tools.get(user_id=user_id, toolkits=["TODOIST"])
12
13print("[!] Tools:")
14print(json.dumps(tools))
15
16def invoke_llm(task = "What can you do?"):
17 completion = openai.chat.completions.create(
18 model="gpt-4o",
19 messages=[
20 {
21 "role": "user",
22 "content": task, # Your task here!
23 },
24 ],
25 tools=tools,
26 )
27
28 # Handle Result from tool call
29 result = composio.provider.handle_tool_calls(user_id=user_id, response=completion)
30 print(f"[!] Completion: {completion}")
31 print(f"[!] Tool call result: {result}")
32
33invoke_llm()

Tool List

Tool Name: Add Workspace

Description

Tool to create a new workspace in todoist. use when you need a separate workspace to organize projects. generates uuid and temp id automatically.

Action Parameters

color
integer
icon
string
name
stringRequired
temp_id
string
uuid
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Close Task

Description

This tool marks an existing task as completed in todoist. it requires the `task id` of the task to be closed.

Action Parameters

task_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create Comment

Description

Tool to create a new comment in todoist. use when you need to add a note to a specific task or project after confirming its id.

Action Parameters

content
stringRequired
project_id
string
task_id
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create Label

Description

Creates a new label.

Action Parameters

color
integer
is_favorite
boolean
name
stringRequired
order
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create Project

Description

Creates a new project in todoist.

Action Parameters

color
string
favorite
boolean
name
stringRequired
parent_id
string
view_style
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create Section

Description

Tool to create a new section within a specific project. use when you need to group tasks under a new heading in a project.

Action Parameters

name
stringRequired
order
integer
project_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create task

Description

Create a new task in todoist. this action allows users to create tasks with various parameters including content, due dates, priority, and more. the task can be created in a specific project, section, or as a subtask of another task.

Action Parameters

assignee_id
string
content
stringRequired
description
string
due_date
string
due_datetime
string
due_lang
string
due_string
string
duration
integer
duration_unit
string
labels
array
order
integer
parent_id
string
priority
integer
project_id
string
section_id
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Label

Description

Tool to delete a specific label. use when you need to permanently remove an unused label by its id after confirming it's not in use. example: "delete label with id 2298391482".

Action Parameters

label_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Project

Description

Tool to delete a specific todoist project. use when you need to permanently remove a project by its id.

Action Parameters

project_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Section

Description

Tool to delete a specific section. use when you need to permanently remove an unused section by its id after confirming it's not in use. example: "delete section with id 82181370".

Action Parameters

section_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete task

Description

Delete a task from todoist. this action permanently removes the task and all its subtasks.

Action Parameters

task_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get All Comments

Description

This tool retrieves all comments associated with a specific task or project in todoist. it requires either a task id or a project id to fetch the comments, and it returns a json array of comment objects with details such as id, posted at, content, and attachment information.

Action Parameters

project_id
string
task_id
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get all labels

Description

Get all personal labels from todoist. this action retrieves all personal labels from a user's todoist account. each label contains information like name, color, order and favorite status. api documentation: https://developer.todoist.com/rest/v2/#get-all-personal-labels

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get all projects

Description

Get all projects from a user's todoist account. this tool retrieves all projects from the authenticated user's todoist account. the response includes details like project id, name, color, parent project, sharing status, and other metadata for each project.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get All Sections

Description

Tool to retrieve all sections for a specific project in todoist. use when you need to list section structure within a project after selecting the project.

Action Parameters

project_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get All Tasks

Description

Fetches all tasks from todoist and returns their details.

Action Parameters

filter
string
ids
array
lang
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Backups

Description

Tool to list all available backup archives for the user. use when you need to retrieve and review all existing backups.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Comment

Description

Tool to retrieve details of a specific comment by its comment id. use when you need full information (content, timestamp, or attachment) about a known comment.

Action Parameters

comment_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Label

Description

Tool to retrieve a specific label by its id. use when you need detailed info about a label after you have its id.

Action Parameters

id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Project

Description

Tool to retrieve a specific project by its id. use when you have a project id and need its metadata before display or update.

Action Parameters

project_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Section

Description

Tool to retrieve a specific section by its id. use when you have a section id and need its metadata before display or update.

Action Parameters

section_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Special Backups

Description

Tool to list special backup archives for the user. use when you need to retrieve all project backups for the authenticated user after creating or managing projects.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Task

Description

Tool to retrieve a specific task by its id. use when you need to fetch all details of an existing task before processing or display.

Action Parameters

task_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Archived Workspace Projects

Description

Tool to list all archived projects in a workspace. use when you need to retrieve archived workspace projects with optional filters or pagination.

Action Parameters

limit
integer
offset
integer
project_ids
array
since
string
until
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Filters

Description

Tool to list all filters for the authenticated user. use when you need to retrieve the current set of custom filters.

Action Parameters

sync_token
stringDefaults to *

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Reopen Task

Description

This tool reopens a previously completed task.

Action Parameters

task_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update Project

Description

Tool to update a specific project's attributes such as name, color, indent, and order. use when you need to rename or reorder a project after reviewing its current settings. example: "update project 2203306141 name to 'q1 goals'."

Action Parameters

color
integer
indent
integer
name
string
order
integer
project_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update Task

Description

Tool to update an existing task's properties. use when you need to modify a task's details after confirming its id and new values.

Action Parameters

assignee_id
string
content
string
description
string
due_date
string
due_datetime
string
due_lang
string
due_string
string
label_ids
array
priority
integer
task_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Pending Workspace Invitations

Description

Tool to list pending invitation emails in a workspace. use when you need to check which email invites are still pending acceptance in a workspace.

Action Parameters

workspace_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update Comment

Description

Tool to update a specific comment's content. use when you need to correct or clarify an existing comment after confirming its id and the new text.

Action Parameters

comment_id
stringRequired
content
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update Section

Description

Tool to update a specific section's attributes such as name and order. use when you need to rename or reorder a section after confirming its id.

Action Parameters

name
string
order
integer
section_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired