Skip to content

Adding documentation for Todoist integration #393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
211 changes: 211 additions & 0 deletions pages/toolkits/productivity/todoist.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
# Todoist

import ToolInfo from "@/components/ToolInfo";
import Badges from "@/components/Badges";
import TabbedCodeBlock from "@/components/TabbedCodeBlock";
import TableOfContents from "@/components/TableOfContents";
import ToolFooter from "@/components/ToolFooter";

<ToolInfo
description="Enable agents to interact with Todoist"
author="Arcade"
authType="OAuth2"
versions={["0.1.1"]}
/>

<Badges repo="arcadeai/arcade_todoist" />

The Todoist toolkit provides a comprehensive set of tools for managing tasks and projects within the Todoist application. Users can easily perform the following actions:

- Retrieve all tasks or filter tasks by specific projects or queries.
- Create new tasks and assign them to projects.
- Mark tasks as completed or delete them as needed.
- Access and list all projects to organize tasks effectively.

This toolkit streamlines task management, making it simple to keep track of work and projects.

## Available Tools

<TableOfContents
headers={["Tool Name", "Description"]}
data={
[
["Todoist.GetAllTasks", "Get all tasks from the Todoist API with pagination support. Use this when the user wants"],
["Todoist.GetTasksByProject", "Get tasks from a specific project by project ID or name with pagination support."],
["Todoist.CreateTask", "Create a new task for the user. Use this whenever the user wants to create, add, or make a task."],
["Todoist.CloseTask", "Close a task by its exact ID. Use this whenever the user wants to"],
["Todoist.DeleteTask", "Delete a task by its exact ID. Use this whenever the user wants to"],
["Todoist.GetTasksByFilter", "Get tasks by filter query with pagination support."],
["Todoist.GetProjects", "Get all projects from the Todoist API. Use this when the user wants to see, list, or browse"],
]
}
/>

<Tip>
If you need to perform an action that's not listed here, you can [get in touch
with us](mailto:contact@arcade.dev) to request a new tool, or [create your
own tools](/home/build-tools/create-a-toolkit).
</Tip>

## Todoist.GetAllTasks

<br />
<TabbedCodeBlock
tabs={[
{
label: "Call the Tool Directly",
content: {
Python: ["/examples/integrations/toolkits/todoist/get_all_tasks_example_call_tool.py"],
JavaScript: ["/examples/integrations/toolkits/todoist/get_all_tasks_example_call_tool.js"],
},
},
]}
/>

Get all tasks from the Todoist API with pagination support. Use this when the user wants

**Parameters**

- **limit** (`integer`, optional) Number of tasks to return (min: 1, default: 50, max: 200). Default is 50 which should be sufficient for most use cases.
- **next_page_token** (`string`, optional) Token for pagination. Use None for the first page, or the token returned from a previous call to get the next page of results.


## Todoist.GetTasksByProject

<br />
<TabbedCodeBlock
tabs={[
{
label: "Call the Tool Directly",
content: {
Python: ["/examples/integrations/toolkits/todoist/get_tasks_by_project_example_call_tool.py"],
JavaScript: ["/examples/integrations/toolkits/todoist/get_tasks_by_project_example_call_tool.js"],
},
},
]}
/>

Get tasks from a specific project by project ID or name with pagination support.

**Parameters**

- **project** (`string`, required) The ID or name of the project to get tasks from.
- **limit** (`integer`, optional) Number of tasks to return (min: 1, default: 50, max: 200). Default is 50 which should be sufficient for most use cases.
- **next_page_token** (`string`, optional) Token for pagination. Use None for the first page, or the token returned from a previous call to get the next page of results.


## Todoist.CreateTask

<br />
<TabbedCodeBlock
tabs={[
{
label: "Call the Tool Directly",
content: {
Python: ["/examples/integrations/toolkits/todoist/create_task_example_call_tool.py"],
JavaScript: ["/examples/integrations/toolkits/todoist/create_task_example_call_tool.js"],
},
},
]}
/>

Create a new task for the user. Use this whenever the user wants to create, add, or make a task.

**Parameters**

- **description** (`string`, required) The title of the task to be created.
- **project** (`string`, optional) The ID or name of the project to add the task to. Use the project ID or name if user mentions a specific project. Leave as None to add to inbox.


## Todoist.CloseTask

<br />
<TabbedCodeBlock
tabs={[
{
label: "Call the Tool Directly",
content: {
Python: ["/examples/integrations/toolkits/todoist/close_task_example_call_tool.py"],
JavaScript: ["/examples/integrations/toolkits/todoist/close_task_example_call_tool.js"],
},
},
]}
/>

Close a task by its exact ID. Use this whenever the user wants to

**Parameters**

- **task_id** (`string`, required) The exact ID of the task to be closed.


## Todoist.DeleteTask

<br />
<TabbedCodeBlock
tabs={[
{
label: "Call the Tool Directly",
content: {
Python: ["/examples/integrations/toolkits/todoist/delete_task_example_call_tool.py"],
JavaScript: ["/examples/integrations/toolkits/todoist/delete_task_example_call_tool.js"],
},
},
]}
/>

Delete a task by its exact ID. Use this whenever the user wants to

**Parameters**

- **task_id** (`string`, required) The exact ID of the task to be deleted.


## Todoist.GetTasksByFilter

<br />
<TabbedCodeBlock
tabs={[
{
label: "Call the Tool Directly",
content: {
Python: ["/examples/integrations/toolkits/todoist/get_tasks_by_filter_example_call_tool.py"],
JavaScript: ["/examples/integrations/toolkits/todoist/get_tasks_by_filter_example_call_tool.js"],
},
},
]}
/>

Get tasks by filter query with pagination support.

**Parameters**

- **filter_query** (`string`, required) The filter query to search tasks.
- **limit** (`integer`, optional) Number of tasks to return (min: 1, default: 50, max: 200). Default is 50 which should be sufficient for most use cases.
- **next_page_token** (`string`, optional) Token for pagination. Use None for the first page, or the token returned from a previous call to get the next page of results.


## Todoist.GetProjects

<br />
<TabbedCodeBlock
tabs={[
{
label: "Call the Tool Directly",
content: {
Python: ["/examples/integrations/toolkits/todoist/get_projects_example_call_tool.py"],
JavaScript: ["/examples/integrations/toolkits/todoist/get_projects_example_call_tool.js"],
},
},
]}
/>

Get all projects from the Todoist API. Use this when the user wants to see, list, or browse

**Parameters**

This tool does not take any parameters.



<ToolFooter pipPackageName="arcade_todoist" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { Arcade } from "@arcadeai/arcadejs";

const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable

const USER_ID = "{arcade_user_id}";
const TOOL_NAME = "Todoist.CloseTask";

// Start the authorization process
const authResponse = await client.tools.authorize({tool_name: TOOL_NAME});

if (authResponse.status !== "completed") {
console.log(`Click this link to authorize: ${authResponse.url}`);
}

// Wait for the authorization to complete
await client.auth.waitForCompletion(authResponse);

const toolInput = {
"task_id": "12345"
};

const response = await client.tools.execute({
tool_name: TOOL_NAME,
input: toolInput,
user_id: USER_ID,
});

console.log(JSON.stringify(response.output.value, null, 2));
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import json
from arcadepy import Arcade

client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable

USER_ID = "{arcade_user_id}"
TOOL_NAME = "Todoist.CloseTask"

auth_response = client.tools.authorize(tool_name=TOOL_NAME)

if auth_response.status != "completed":
print(f"Click this link to authorize: {auth_response.url}")

# Wait for the authorization to complete
client.auth.wait_for_completion(auth_response)

tool_input = {
'task_id': '12345'
}

response = client.tools.execute(
tool_name=TOOL_NAME,
input=tool_input,
user_id=USER_ID,
)
print(json.dumps(response.output.value, indent=2))
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { Arcade } from "@arcadeai/arcadejs";

const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable

const USER_ID = "{arcade_user_id}";
const TOOL_NAME = "Todoist.CreateTask";

// Start the authorization process
const authResponse = await client.tools.authorize({tool_name: TOOL_NAME});

if (authResponse.status !== "completed") {
console.log(`Click this link to authorize: ${authResponse.url}`);
}

// Wait for the authorization to complete
await client.auth.waitForCompletion(authResponse);

const toolInput = {
"description": "Implement user authentication",
"project": "ProjectX"
};

const response = await client.tools.execute({
tool_name: TOOL_NAME,
input: toolInput,
user_id: USER_ID,
});

console.log(JSON.stringify(response.output.value, null, 2));
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import json
from arcadepy import Arcade

client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable

USER_ID = "{arcade_user_id}"
TOOL_NAME = "Todoist.CreateTask"

auth_response = client.tools.authorize(tool_name=TOOL_NAME)

if auth_response.status != "completed":
print(f"Click this link to authorize: {auth_response.url}")

# Wait for the authorization to complete
client.auth.wait_for_completion(auth_response)

tool_input = {
'description': 'Implement user authentication', 'project': 'ProjectX'
}

response = client.tools.execute(
tool_name=TOOL_NAME,
input=tool_input,
user_id=USER_ID,
)
print(json.dumps(response.output.value, indent=2))
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { Arcade } from "@arcadeai/arcadejs";

const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable

const USER_ID = "{arcade_user_id}";
const TOOL_NAME = "Todoist.DeleteTask";

// Start the authorization process
const authResponse = await client.tools.authorize({tool_name: TOOL_NAME});

if (authResponse.status !== "completed") {
console.log(`Click this link to authorize: ${authResponse.url}`);
}

// Wait for the authorization to complete
await client.auth.waitForCompletion(authResponse);

const toolInput = {
"task_id": "12345"
};

const response = await client.tools.execute({
tool_name: TOOL_NAME,
input: toolInput,
user_id: USER_ID,
});

console.log(JSON.stringify(response.output.value, null, 2));
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import json
from arcadepy import Arcade

client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable

USER_ID = "{arcade_user_id}"
TOOL_NAME = "Todoist.DeleteTask"

auth_response = client.tools.authorize(tool_name=TOOL_NAME)

if auth_response.status != "completed":
print(f"Click this link to authorize: {auth_response.url}")

# Wait for the authorization to complete
client.auth.wait_for_completion(auth_response)

tool_input = {
'task_id': '12345'
}

response = client.tools.execute(
tool_name=TOOL_NAME,
input=tool_input,
user_id=USER_ID,
)
print(json.dumps(response.output.value, indent=2))
Loading