# Todoist

> Create and manage tasks, comments, and projects in Todoist.

App · To-Do Lists · 5 actions · 1 trigger. Web page: https://docs.lodol.com/docs/integrations/todoist

## Triggers

Start a workflow when something happens in Todoist. See [how triggers work](https://docs.lodol.com/docs/concepts/triggers.md).

### Todoist New Task

Triggers when a new task is added to Todoist.

**Filters**: Narrow which events start a run.

- `project_id`
- `content_pattern`

**Event fields**: What a run starts with. Later steps read each field with an @ reference.

- `id` (text)
- `content` (text)
- `project_id` (text)
- `due_string` (text)

## Actions

### Add a task comment

Add a comment to a Todoist task.

**Inputs**

- Task ID (`task_id`, text, required): Task ID to comment on.
- Content (`content`, text, required): Comment text.

**Outputs**: Todoist comment object from API.

**Example output**

```json
{
  "content": "Don't forget to get organic milk",
  "id": "123456789",
  "task_id": "2995104339"
}
```

### Close a task

Close a Todoist task.

**Inputs**

- Task ID (`task_id`, text, required): Task ID to close.

**Outputs**

- `status` (text): Close operation status.

**Example output**

```json
{
  "status": "closed"
}
```

### Create a task

Create a new Todoist task, with an optional project and due date.

**Inputs**

- Content (`content`, text, required): The task text, for example, Buy milk.
- Project ID (`project_id`, text): The ID of the project to add the task to.
- Due date (`due_string`, text): When the task is due, in plain words, for example, tomorrow or next Monday at 3pm.

**Outputs**: Todoist task object from API.

**Example output**

```json
{
  "content": "Buy milk",
  "due": {
    "date": "2024-01-20",
    "string": "tomorrow"
  },
  "id": "2995104339",
  "project_id": "2203306141"
}
```

### List projects

List all of your Todoist projects.

**Inputs**: None.

**Outputs**: Array of Todoist project objects.

**Example output**

```json
[
  {
    "color": "blue",
    "id": "2203306141",
    "name": "Shopping"
  }
]
```

### Reopen a task

Reopen a completed Todoist task.

**Inputs**

- Task ID (`task_id`, text, required): Task ID to reopen.

**Outputs**

- `status` (text): Reopen operation status.

**Example output**

```json
{
  "status": "reopened"
}
```
