@robinpath/asana
0.1.2Node.jsPublicAsana module for RobinPath.
Asana
Asana module for RobinPath.
Package: @robinpath/asana | Category: Project Management | Type: Integration
Authentication
asana.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 asana module when you need to:
- listWorkspaces -- Use
asana.listWorkspacesto perform this operation - listProjects -- Use
asana.listProjectsto perform this operation - getProject -- Use
asana.getProjectto perform this operation - createProject -- Use
asana.createProjectto perform this operation - updateProject -- Use
asana.updateProjectto perform this operation
Quick Reference
| Function | Description | Returns |
|---|---|---|
setCredentials | Configure asana credentials. | object |
listWorkspaces | listWorkspaces | 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 |
deleteTask | deleteTask | object |
addComment | addComment | object |
listSections | listSections | object |
createSection | createSection | object |
addTaskToSection | addTaskToSection | object |
listTags | listTags | object |
createTag | createTag | object |
addTagToTask | addTagToTask | object |
getUser | getUser | object |
listTeams | listTeams | object |
searchTasks | searchTasks | object |
listSubtasks | listSubtasks | object |
Functions
setCredentials
Configure asana credentials.
Module: asana | Returns: object -- API response.
asana.setCredentials
| Parameter | Type | Required | Description |
|---|---|---|---|
accessToken | string | Yes | accessToken |
listWorkspaces
listWorkspaces
Module: asana | Returns: object -- API response.
asana.listWorkspaces
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listProjects
listProjects
Module: asana | Returns: object -- API response.
asana.listProjects
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getProject
getProject
Module: asana | Returns: object -- API response.
asana.getProject
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
createProject
createProject
Module: asana | Returns: object -- API response.
asana.createProject
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
updateProject
updateProject
Module: asana | Returns: object -- API response.
asana.updateProject
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
deleteProject
deleteProject
Module: asana | Returns: object -- API response.
asana.deleteProject
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listTasks
listTasks
Module: asana | Returns: object -- API response.
asana.listTasks
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getTask
getTask
Module: asana | Returns: object -- API response.
asana.getTask
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
createTask
createTask
Module: asana | Returns: object -- API response.
asana.createTask
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
updateTask
updateTask
Module: asana | Returns: object -- API response.
asana.updateTask
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
deleteTask
deleteTask
Module: asana | Returns: object -- API response.
asana.deleteTask
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
addComment
addComment
Module: asana | Returns: object -- API response.
asana.addComment
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listSections
listSections
Module: asana | Returns: object -- API response.
asana.listSections
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
createSection
createSection
Module: asana | Returns: object -- API response.
asana.createSection
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
addTaskToSection
addTaskToSection
Module: asana | Returns: object -- API response.
asana.addTaskToSection
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listTags
listTags
Module: asana | Returns: object -- API response.
asana.listTags
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
createTag
createTag
Module: asana | Returns: object -- API response.
asana.createTag
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
addTagToTask
addTagToTask
Module: asana | Returns: object -- API response.
asana.addTagToTask
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getUser
getUser
Module: asana | Returns: object -- API response.
asana.getUser
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listTeams
listTeams
Module: asana | Returns: object -- API response.
asana.listTeams
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
searchTasks
searchTasks
Module: asana | Returns: object -- API response.
asana.searchTasks
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listSubtasks
listSubtasks
Module: asana | Returns: object -- API response.
asana.listSubtasks
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
Error Handling
All functions throw on failure. Common errors:
| Error | Cause |
|---|---|
Asana API error (${res.status}): ${t} | Check the error message for details |
asana.setCredentials requires accessToken. | Check the error message for details |
asana.updateProject requires an ID. | Check the error message for details |
asana.deleteProject requires an ID. | Check the error message for details |
asana.updateTask requires an ID. | Check the error message for details |
asana.deleteTask requires an ID. | Check the error message for details |
Asana: "..." not configured. Call asana.setCredentials first. | Check the error message for details |
@desc "List workspaces and validate result"
do
set $result as asana.listWorkspaces
if $result != null
print "Success"
else
print "No result"
end
enddo
Recipes
1. List and iterate Workspaces
Retrieve all items and loop through them.
@desc "Setup authentication"
do
asana.setCredentials $token
enddo
@desc "List workspaces and iterate results"
do
set $result as asana.listWorkspaces
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
asana.setCredentials $token
enddo
@desc "Create project"
do
set $result as asana.createProject
print "Created: " + $result
enddo
3. Create and update workflow
Create an item and then update it.
@desc "Setup authentication"
do
asana.setCredentials $token
enddo
@desc "Create project and update project"
do
set $created as asana.createProject
# Update the created item
asana.updateProject
enddo
4. Check before creating
List existing items and only create if needed.
@desc "Setup authentication"
do
asana.setCredentials $token
enddo
@desc "List workspaces and create project"
do
set $existing as asana.listWorkspaces
if $existing == null
asana.createProject
print "Item created"
else
print "Item already exists"
end
enddo
5. Multi-step Asana workflow
Chain multiple asana operations together.
@desc "Setup authentication"
do
asana.setCredentials $token
enddo
@desc "List workspaces, list projects, and more"
do
set $r_listWorkspaces as asana.listWorkspaces
set $r_listProjects as asana.listProjects
set $r_getProject as asana.getProject
print "All operations complete"
enddo
6. Safe listWorkspaces with validation
Check results before proceeding.
@desc "Setup authentication"
do
asana.setCredentials $token
enddo
@desc "List workspaces and validate result"
do
set $result as asana.listWorkspaces
if $result != null
print "Success: " + $result
else
print "Operation returned no data"
end
enddo
Related Modules
- 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
- todoist -- Todoist module for complementary functionality
Versions (1)
| Version | Tag | Published |
|---|---|---|
| 0.1.2 | 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
google-sheets
JS@robinpathv0.1.1
Google Sheets module for RobinPath.
airtable
JS@robinpathv0.1.2
Airtable module for RobinPath.
basecamp
JS@robinpathv0.1.2
Basecamp module for RobinPath.
$ robinpath add @robinpath/asana
