# Asana (/integrations/asana)





{/* MANUAL-CONTENT-START:intro */}

Use [Asana](https://asana.com/) in Sim to manage tasks, projects, sections, comments, and followers. Workflows can create tasks, update their status or assignees, and read project and workspace data.

{/* MANUAL-CONTENT-END */}

Connection guides: [Service accounts and personal access tokens](/integrations/asana-service-account).

## OAuth scopes [#oauth-scopes]

Sim requests these scopes when someone connects an Asana account. For a self-hosted deployment, register your own app with the provider using the settings below. See [Integrations and OAuth](/platform/self-hosting/integrations-oauth) for setup.

| Setting | Value |
| - | - |
| Redirect URI | `<NEXT_PUBLIC_APP_URL>/api/auth/oauth2/callback/asana` |
| Environment variables | `ASANA_CLIENT_ID`, `ASANA_CLIENT_SECRET` |

| Scope | Description |
| - | - |
| `default` | Full access to everything the account can reach in Asana |

## Use the block [#usage-instructions]

Read, write, and update tasks.

## Actions [#actions]

### Asana Get Task [#asana-get-task]

Retrieve a single task by GID or get multiple tasks with filters

<ReferenceDetails>
  #### Input [#input]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `taskGid` | string | No | The globally unique identifier (GID) of the task. If not provided, will get multiple tasks. |
  | `workspace` | string | No | Asana workspace GID (numeric string) to filter tasks (required when not using taskGid) |
  | `project` | string | No | Asana project GID (numeric string) to filter tasks |
  | `limit` | number | No | Maximum number of tasks to return (default: 50) |

  #### Output [#output]

  | Parameter | Type | Description |
  | - | - | - |
  | `success` | boolean | Operation success status |
  | `ts` | string | Timestamp of the response |
  | `gid` | string | Task globally unique identifier |
  | `resource_type` | string | Resource type (task) |
  | `resource_subtype` | string | Resource subtype |
  | `name` | string | Task name |
  | `notes` | string | Task notes or description |
  | `completed` | boolean | Whether the task is completed |
  | `assignee` | object | Assignee details |
  | ↳ `gid` | string | Assignee GID |
  | ↳ `name` | string | Assignee name |
  | `created_by` | object | Creator details |
  | ↳ `gid` | string | Creator GID |
  | ↳ `name` | string | Creator name |
  | `due_on` | string | Due date (YYYY-MM-DD) |
  | `created_at` | string | Task creation timestamp |
  | `modified_at` | string | Task last modified timestamp |
  | `tasks` | array | Array of tasks (when fetching multiple) |
  | ↳ `gid` | string | Task GID |
  | ↳ `name` | string | Task name |
  | ↳ `completed` | boolean | Completion status |
</ReferenceDetails>

### Asana Create Task [#asana-create-task]

Create a new task in Asana

<ReferenceDetails>
  #### Input [#input-1]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `workspace` | string | Yes | Asana workspace GID (numeric string) where the task will be created |
  | `name` | string | Yes | Name of the task |
  | `notes` | string | No | Notes or description for the task |
  | `assignee` | string | No | User GID to assign the task to |
  | `due_on` | string | No | Due date in YYYY-MM-DD format |

  #### Output [#output-1]

  | Parameter | Type | Description |
  | - | - | - |
  | `success` | boolean | Operation success status |
  | `ts` | string | Timestamp of the response |
  | `gid` | string | Task globally unique identifier |
  | `name` | string | Task name |
  | `notes` | string | Task notes or description |
  | `completed` | boolean | Whether the task is completed |
  | `created_at` | string | Task creation timestamp |
  | `permalink_url` | string | URL to the task in Asana |
</ReferenceDetails>

### Asana Update Task [#asana-update-task]

Update an existing task in Asana

<ReferenceDetails>
  #### Input [#input-2]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `taskGid` | string | Yes | Asana task GID (numeric string) of the task to update |
  | `name` | string | No | Updated name for the task |
  | `notes` | string | No | Updated notes or description for the task |
  | `assignee` | string | No | Updated assignee user GID |
  | `completed` | boolean | No | Mark task as completed or not completed |
  | `due_on` | string | No | Updated due date in YYYY-MM-DD format |

  #### Output [#output-2]

  | Parameter | Type | Description |
  | - | - | - |
  | `success` | boolean | Operation success status |
  | `ts` | string | Timestamp of the response |
  | `gid` | string | Task globally unique identifier |
  | `name` | string | Task name |
  | `notes` | string | Task notes or description |
  | `completed` | boolean | Whether the task is completed |
  | `modified_at` | string | Task last modified timestamp |
</ReferenceDetails>

### Asana Get Projects [#asana-get-projects]

Retrieve all projects from an Asana workspace

<ReferenceDetails>
  #### Input [#input-3]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `workspace` | string | Yes | Asana workspace GID (numeric string) to retrieve projects from |

  #### Output [#output-3]

  | Parameter | Type | Description |
  | - | - | - |
  | `success` | boolean | Operation success status |
  | `ts` | string | Timestamp of the response |
  | `projects` | array | Array of projects |
  | ↳ `gid` | string | Project GID |
  | ↳ `name` | string | Project name |
  | ↳ `resource_type` | string | Resource type (project) |
</ReferenceDetails>

### Asana Search Tasks [#asana-search-tasks]

Search for tasks in an Asana workspace

<ReferenceDetails>
  #### Input [#input-4]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `workspace` | string | Yes | Asana workspace GID (numeric string) to search tasks in |
  | `text` | string | No | Text to search for in task names |
  | `assignee` | string | No | Filter tasks by assignee user GID |
  | `projects` | array | No | Array of Asana project GIDs (numeric strings) to filter tasks by |
  | `completed` | boolean | No | Filter by completion status |

  #### Output [#output-4]

  | Parameter | Type | Description |
  | - | - | - |
  | `success` | boolean | Operation success status |
  | `ts` | string | Timestamp of the response |
  | `tasks` | array | Array of matching tasks |
  | ↳ `gid` | string | Task GID |
  | ↳ `resource_type` | string | Resource type |
  | ↳ `resource_subtype` | string | Resource subtype |
  | ↳ `name` | string | Task name |
  | ↳ `notes` | string | Task notes |
  | ↳ `completed` | boolean | Completion status |
  | ↳ `assignee` | object | Assignee details |
  | ↳ `gid` | string | Assignee GID |
  | ↳ `name` | string | Assignee name |
  | ↳ `due_on` | string | Due date |
  | ↳ `created_at` | string | Creation timestamp |
  | ↳ `modified_at` | string | Modified timestamp |
  | `next_page` | object | Pagination info |
  | ↳ `offset` | string | Offset token |
  | ↳ `path` | string | API path |
  | ↳ `uri` | string | Full URI |
</ReferenceDetails>

### Asana Add Comment [#asana-add-comment]

Add a comment (story) to an Asana task

<ReferenceDetails>
  #### Input [#input-5]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `taskGid` | string | Yes | Asana task GID (numeric string) |
  | `text` | string | Yes | The text content of the comment |

  #### Output [#output-5]

  | Parameter | Type | Description |
  | - | - | - |
  | `success` | boolean | Operation success status |
  | `ts` | string | Timestamp of the response |
  | `gid` | string | Comment globally unique identifier |
  | `text` | string | Comment text content |
  | `created_at` | string | Comment creation timestamp |
  | `created_by` | object | Comment author details |
  | ↳ `gid` | string | Author GID |
  | ↳ `name` | string | Author name |
</ReferenceDetails>

### Asana Create Subtask [#asana-create-subtask]

Create a subtask under an existing Asana task

<ReferenceDetails>
  #### Input [#input-6]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `taskGid` | string | Yes | GID of the parent Asana task (numeric string) |
  | `name` | string | Yes | Name of the subtask |
  | `notes` | string | No | Notes or description for the subtask |
  | `assignee` | string | No | User GID to assign the subtask to |
  | `due_on` | string | No | Due date in YYYY-MM-DD format |

  #### Output [#output-6]

  | Parameter | Type | Description |
  | - | - | - |
  | `success` | boolean | Operation success status |
  | `ts` | string | Timestamp of the response |
  | `gid` | string | Subtask globally unique identifier |
  | `name` | string | Subtask name |
  | `notes` | string | Subtask notes or description |
  | `completed` | boolean | Whether the subtask is completed |
  | `created_at` | string | Subtask creation timestamp |
  | `permalink_url` | string | URL to the subtask in Asana |
</ReferenceDetails>

### Asana Delete Task [#asana-delete-task]

Delete an Asana task by its GID (moves it to the trash)

<ReferenceDetails>
  #### Input [#input-7]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `taskGid` | string | Yes | GID of the Asana task to delete (numeric string) |

  #### Output [#output-7]

  | Parameter | Type | Description |
  | - | - | - |
  | `success` | boolean | Operation success status |
  | `ts` | string | Timestamp of the response |
  | `gid` | string | GID of the deleted task |
  | `deleted` | boolean | Whether the task was deleted |
</ReferenceDetails>

### Asana Add Followers [#asana-add-followers]

Add one or more followers to an Asana task

<ReferenceDetails>
  #### Input [#input-8]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `taskGid` | string | Yes | GID of the Asana task (numeric string) |
  | `followers` | array | Yes | Array of user GIDs to add as followers to the task |

  #### Output [#output-8]

  | Parameter | Type | Description |
  | - | - | - |
  | `success` | boolean | Operation success status |
  | `ts` | string | Timestamp of the response |
  | `gid` | string | Task globally unique identifier |
  | `name` | string | Task name |
  | `followers` | array | Current followers on the task after the update |
  | ↳ `gid` | string | Follower GID |
  | ↳ `name` | string | Follower name |
</ReferenceDetails>

### Asana Create Project [#asana-create-project]

Create a new project in an Asana workspace

<ReferenceDetails>
  #### Input [#input-9]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `workspace` | string | Yes | Asana workspace GID (numeric string) where the project will be created |
  | `name` | string | Yes | Name of the project |
  | `notes` | string | No | Notes or description for the project |

  #### Output [#output-9]

  | Parameter | Type | Description |
  | - | - | - |
  | `success` | boolean | Operation success status |
  | `ts` | string | Timestamp of the response |
  | `gid` | string | Project globally unique identifier |
  | `name` | string | Project name |
  | `notes` | string | Project notes or description |
  | `archived` | boolean | Whether the project is archived |
  | `color` | string | Project color |
  | `created_at` | string | Project creation timestamp |
  | `modified_at` | string | Project last modified timestamp |
  | `permalink_url` | string | URL to the project in Asana |
</ReferenceDetails>

### Asana Get Project [#asana-get-project]

Retrieve a single Asana project by its GID

<ReferenceDetails>
  #### Input [#input-10]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `projectGid` | string | Yes | Asana project GID (numeric string) to retrieve |

  #### Output [#output-10]

  | Parameter | Type | Description |
  | - | - | - |
  | `success` | boolean | Operation success status |
  | `ts` | string | Timestamp of the response |
  | `gid` | string | Project globally unique identifier |
  | `name` | string | Project name |
  | `notes` | string | Project notes or description |
  | `archived` | boolean | Whether the project is archived |
  | `color` | string | Project color |
  | `created_at` | string | Project creation timestamp |
  | `modified_at` | string | Project last modified timestamp |
  | `permalink_url` | string | URL to the project in Asana |
</ReferenceDetails>

### Asana List Workspaces [#asana-list-workspaces]

List all Asana workspaces and organizations the authenticated user belongs to

<ReferenceDetails>
  #### Input [#input-11]

  | Parameter | Type | Required | Description |
  | - | - | - | - |

  #### Output [#output-11]

  | Parameter | Type | Description |
  | - | - | - |
  | `success` | boolean | Operation success status |
  | `ts` | string | Timestamp of the response |
  | `workspaces` | array | Array of workspaces |
  | ↳ `gid` | string | Workspace GID |
  | ↳ `name` | string | Workspace name |
  | ↳ `resource_type` | string | Resource type (workspace) |
</ReferenceDetails>

### Asana Create Section [#asana-create-section]

Create a new section in an Asana project

<ReferenceDetails>
  #### Input [#input-12]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `projectGid` | string | Yes | GID of the Asana project (numeric string) to add the section to |
  | `name` | string | Yes | Name of the section |

  #### Output [#output-12]

  | Parameter | Type | Description |
  | - | - | - |
  | `success` | boolean | Operation success status |
  | `ts` | string | Timestamp of the response |
  | `gid` | string | Section globally unique identifier |
  | `name` | string | Section name |
  | `created_at` | string | Section creation timestamp |
</ReferenceDetails>

### Asana List Sections [#asana-list-sections]

List all sections in an Asana project

<ReferenceDetails>
  #### Input [#input-13]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `projectGid` | string | Yes | GID of the Asana project (numeric string) to list sections from |

  #### Output [#output-13]

  | Parameter | Type | Description |
  | - | - | - |
  | `success` | boolean | Operation success status |
  | `ts` | string | Timestamp of the response |
  | `sections` | array | Array of sections in the project |
  | ↳ `gid` | string | Section GID |
  | ↳ `name` | string | Section name |
  | ↳ `resource_type` | string | Resource type (section) |
</ReferenceDetails>
