@robinpath/todoist
0.1.1Node.jsPublicTodoist module for RobinPath.
Todoist
Todoist module for RobinPath.
Package: @robinpath/todoist | Category: Project Management | Type: Integration
Authentication
todoist.setCredentials "your-credentials"
Call this once at the start of your script before using any other function. Credentials persist for the duration of the script execution.
Use Cases
Use the todoist module when you need to:
- listProjects -- Use
todoist.listProjectsto perform this operation - getProject -- Use
todoist.getProjectto perform this operation - createProject -- Use
todoist.createProjectto perform this operation - updateProject -- Use
todoist.updateProjectto perform this operation - deleteProject -- Use
todoist.deleteProjectto perform this operation
Quick Reference
| Function | Description | Returns |
|---|---|---|
setCredentials | Configure todoist credentials. | object |
listProjects | listProjects | object |
getProject | getProject | object |
createProject | createProject | object |
updateProject | updateProject | object |
deleteProject | deleteProject | object |
listTasks | listTasks | object |
getTask | getTask | object |
createTask | createTask | object |
updateTask | updateTask | object |
closeTask | closeTask | object |
reopenTask | reopenTask | object |
deleteTask | deleteTask | object |
listLabels | listLabels | object |
createLabel | createLabel | object |
listComments | listComments | object |
createComment | createComment | object |
deleteComment | deleteComment | object |
Functions
setCredentials
Configure todoist credentials.
Module: todoist | Returns: object -- API response.
todoist.setCredentials
| Parameter | Type | Required | Description |
|---|---|---|---|
apiToken | string | Yes | apiToken |
listProjects
listProjects
Module: todoist | Returns: object -- API response.
todoist.listProjects
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getProject
getProject
Module: todoist | Returns: object -- API response.
todoist.getProject
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
createProject
createProject
Module: todoist | Returns: object -- API response.
todoist.createProject
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
updateProject
updateProject
Module: todoist | Returns: object -- API response.
todoist.updateProject
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
deleteProject
deleteProject
Module: todoist | Returns: object -- API response.
todoist.deleteProject
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listTasks
listTasks
Module: todoist | Returns: object -- API response.
todoist.listTasks
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getTask
getTask
Module: todoist | Returns: object -- API response.
todoist.getTask
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
createTask
createTask
Module: todoist | Returns: object -- API response.
todoist.createTask
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
updateTask
updateTask
Module: todoist | Returns: object -- API response.
todoist.updateTask
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
closeTask
closeTask
Module: todoist | Returns: object -- API response.
todoist.closeTask
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
reopenTask
reopenTask
Module: todoist | Returns: object -- API response.
todoist.reopenTask
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
deleteTask
deleteTask
Module: todoist | Returns: object -- API response.
todoist.deleteTask
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listLabels
listLabels
Module: todoist | Returns: object -- API response.
todoist.listLabels
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
createLabel
createLabel
Module: todoist | Returns: object -- API response.
todoist.createLabel
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listComments
listComments
Module: todoist | Returns: object -- API response.
todoist.listComments
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
createComment
createComment
Module: todoist | Returns: object -- API response.
todoist.createComment
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
deleteComment
deleteComment
Module: todoist | Returns: object -- API response.
todoist.deleteComment
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
Error Handling
All functions throw on failure. Common errors:
| Error | Cause |
|---|---|
Todoist API error (${res.status}): ${t} | Check the error message for details |
todoist.setCredentials requires apiToken. | Check the error message for details |
todoist.updateProject requires an ID. | Check the error message for details |
todoist.deleteProject requires an ID. | Check the error message for details |
todoist.updateTask requires an ID. | Check the error message for details |
todoist.closeTask requires an ID. | Check the error message for details |
todoist.reopenTask requires an ID. | Check the error message for details |
todoist.deleteTask requires an ID. | Check the error message for details |
@desc "List projects and validate result"
do
set $result as todoist.listProjects
if $result != null
print "Success"
else
print "No result"
end
enddo
Recipes
1. List and iterate Projects
Retrieve all items and loop through them.
@desc "Setup authentication"
do
todoist.setCredentials $token
enddo
@desc "List projects and iterate results"
do
set $result as todoist.listProjects
each $item in $result
print $item
end
enddo
2. Create a new item with createProject
Create a new resource and capture the result.
@desc "Setup authentication"
do
todoist.setCredentials $token
enddo
@desc "Create project"
do
set $result as todoist.createProject
print "Created: " + $result
enddo
3. Create and update workflow
Create an item and then update it.
@desc "Setup authentication"
do
todoist.setCredentials $token
enddo
@desc "Create project and update project"
do
set $created as todoist.createProject
# Update the created item
todoist.updateProject
enddo
4. Check before creating
List existing items and only create if needed.
@desc "Setup authentication"
do
todoist.setCredentials $token
enddo
@desc "List projects and create project"
do
set $existing as todoist.listProjects
if $existing == null
todoist.createProject
print "Item created"
else
print "Item already exists"
end
enddo
5. Multi-step Todoist workflow
Chain multiple todoist operations together.
@desc "Setup authentication"
do
todoist.setCredentials $token
enddo
@desc "List projects, get project, and more"
do
set $r_listProjects as todoist.listProjects
set $r_getProject as todoist.getProject
set $r_createProject as todoist.createProject
print "All operations complete"
enddo
6. Safe listProjects with validation
Check results before proceeding.
@desc "Setup authentication"
do
todoist.setCredentials $token
enddo
@desc "List projects and validate result"
do
set $result as todoist.listProjects
if $result != null
print "Success: " + $result
else
print "Operation returned no data"
end
enddo
Related Modules
- asana -- Asana module for complementary functionality
- clickup -- ClickUp module for complementary functionality
- jira -- Jira module for complementary functionality
- linear -- Linear module for complementary functionality
- monday -- Monday.com module for complementary functionality
Versions (1)
| Version | Tag | Published |
|---|---|---|
| 0.1.1 | latest | 1 months ago |
Related Modules
rightplace
JS@robinpathv0.1.3
RightPlace integration — 130 functions for projects, WordPress, WooCommerce, email, files, git, spreadsheets, stages, docs, automations via rightplace-cli
asana
JS@robinpathv0.1.2
Asana module for RobinPath.
google-sheets
JS@robinpathv0.1.1
Google Sheets module for RobinPath.
airtable
JS@robinpathv0.1.2
Airtable module for RobinPath.
$ robinpath add @robinpath/todoist
