Connectors / Service / Asana

Asana is a project management tool for teams. From tasks and projects to conversations and notifications, Asana enables teams to move work from start to finish. (updated: 1657718462999)

Asana

Asana is a web and mobile application designed to help teams organize, track, and manage their work

Overview

The Asana connector on Tray allows you to interact with the data in your Asana account in any way you choose. The majority of the API is currently supported on Tray, enabling you to do things like:

  • Copy a project for each new Salesforce Opportunity that's created

  • Add project status updates

  • Add comments

  • Attach files to tasks

Authentication

When using the Asana connector, the first thing you will have to do is click on 'New Authentication' in the step editor:

add-auth

On the following page proceed to allow Tray access to your account.

Available Operations

The examples below show one or two of the available connector operations in use.

Please see the Full Operations Reference at the end of this page for details on all available operations for this connector.

Note on using Asana

List Tasks

When using the List Tasks operation you should only choose one of Assignee ID or Project ID:

asana-list-tasks-step

If you choose an option for both you will receive an error message such as:

asana-error-output

Search Tasks

The Search Tasks operation is only available to premium Asana users.

A user is a premium if any of the following is true:

  • The workspace in which the search is being performed is a premium workspace.

  • The user is a member of a premium team inside the workspace.

Even if a user is only a member of a premium team inside a non-premium workspace, the search will allow them to find data anywhere in the workspace, not just inside the premium team.

When using Search Tasks, you must send a minimum of one parameter from either 'Search parameters' or 'Custom fields' inputs.

For more information on how to use each 'Search parameter', you can find details in the Asana documentation v1.0 - Search tasks in a workspace. The document helps to find the exact format that Asana will be expecting the 'Search parameters' to be passed in.

Example

This example demonstrates how to use a workflow to create a new task and send a slack message with the task name:

asana-create-task-workflow

You will need to create two steps:

  1. Create task (using the asana connector)

  2. Send message (using the slack connector)

With the Create task operation you will need to specify the Workflow ID to which the new task will belong and its Name, all the other properties are not mandatory.

With the Send message operation you will need to specify the Channel to which the message will be sent and of course the message body. In this example, the message body will be {$.steps.asana-1.data.name} has been created so that you can combine both text and the JSON path to the name of the task created in the previous step.

You can run this workflow and see the logs in the DEBUG section. The output of the first step should look like this:

1
{
2
"data": {
3
"notes": "",
4
"assignee_status": "upcoming",
5
"gid": "972375047894944",
6
"num_likes": 0,
7
"hearted": false,
8
"num_hearts": 0,
9
"completed_at": null,
10
"modified_at": "2019-01-09T14:37:42.867Z",
11
"resource_subtype": "default_task",
12
"due_on": null,
13
"parent": null,
14
"created_at": "2019-01-09T14:37:42.867Z",
15
"resource_type": "task",
16
"completed": false,
17
"name": "This is a task",
18
"hearts": [],
19
"liked": false,
20
"assignee": null,
21
"followers": [
22
{
23
"gid": "68711130877162",
24
"id": 68711130877162,
25
"resource_type": "user",
26
"name": "A person"
27
}
28
],
29
"workspace": {
30
"gid": "498346170860",
31
"id": 498346170860,
32
"resource_type": "workspace",
33
"name": "Personal Projects"
34
},
35
"tags": [],
36
"projects": [
37
{
38
"gid": "969484041887157",
39
"id": 969484041887157,
40
"resource_type": "project",
41
"name": "test"
42
}
43
],
44
"id": 972375047894944,
45
"start_on": null,
46
"likes": [],
47
"memberships": [
48
{
49
"project": {
50
"gid": "969484041887157",
51
"id": 969484041887157,
52
"resource_type": "project",
53
"name": "test"
54
},
55
"section": null
56
}
57
],
58
"due_at": null
59
}
60
}

The output of the second step should look like this:

1
{
2
"ok": true,
3
"channel": "D2DRPB1J9",
4
"ts": "1547014664.000300",
5
"message": {
6
"type": "message",
7
"subtype": "bot_message",
8
"text": "This is a task has been created",
9
"ts": "1547014664.000300",
10
"username": "Tray.io",
11
"icons": {
12
"image_48": "https://imageurl.png"
13
},
14
"bot_id": "BCA3SHKJN",
15
"attachments": []
16
}
17
}

All Operations

Latest version:

6.0

List portfolio colors DDL

List project sections DDL

List project tasks DDL

List workspace tasks DDL

Search tasks

Search tasks in a workspace, this endpoint will only be available to premium Asana users.

Update section

Update a section.

Update task

Update a task.

Upload attachment to task

Upload a file attachment to a task.

Add custom field to portfolio

Add a custom field to a portfolio.

Add custom field to project

Add a custom field to a project.

Add drop down option to custom field

Add an enum option to a custom field.

Add followers to a task

Add followers to a task. Returns an empty data block. Each task can be associated with zero or more followers in the system. Requests to add/remove followers, if successful, will return the complete updated task record, described above.

Add members to portfolio

Add members to a portfolio.

Add members to project

Add users as members of a project, if they're not already added.

Add project status update

Add a status update to a project, setting a "message" and a colour reflecting the project's status.

Add project to portfolio

Add a project to a portfolio.

Add tag to task

Add a tag to a particular task.

Add task dependencies

Add dependencies to a task.

Add task to project

Add a task to a project.

Add task to section

Add a task to a section.

Copy all project custom fields

Copy all custom fields from a source project to a destination project. This is operation is only available to premium Asana accounts.

Copy all tasks

Copy all tasks from one project to another, including those that are marked completed and archived in the source.

Copy task

Copy a task, copying over the description, followers, and assignee, along with subtasks and custom field settings.

Create custom field

Create a new custom field.

Create portfolio

Create a new portfolio.

Create project

Create a project.

Create project section

Create a project section.

Create subtask

Create a subtask.

Create tag

Create a new tag in a workspace.

Create task

Create a new task.

Create task comment

Add a comment to a task. Comments will appear in the Asana UI to be from the Asana user connected with your tray account.

Delete custom field

Delete a custom field.

Delete portfolio

Delete a portfolio.

Delete project

Delete a project.

Delete section

Delete a section.

Delete task

Delete a task.

Download attachments

Download task attachments hosted on Asana. Maximum total size of attachments is 500MB.

Get attachment

Get the full record for a single attachment.

Get custom field

Return all metadata for a specified custom field.

Get portfolio

Return data for a specified portfolio.

Get project

Find a project in an Asana workspace.

Get section

Get a section from your Asana account.

Get task

Find a task by its GID.

Get team

Return information about a team.

Get user

Return information about a user.

Get user by email

Return information about a user.

Get workspace

Return information about a workspace.

List colors DDL

List custom field drop down options DDL

List custom fields

List all custom fields in a given workspace.

List custom fields DDL

List custom fields in portfolio

Return custom fields in a given portfolio.

List custom fields in portfolio DDL

List organization teams

Get a list of all of the teams in an organization workspace.

List organization teams DDL

List organizations DDL

List portfolio members DDL

List portfolio projects

Return a list of all projects in a portfolio.

List portfolio projects DDL

List portfolios

Return a list of all portfolios.

List portfolios DDL

List project custom field settings

Retrieve a list of all of the custom fields settings on a project.

List project custom field settings DDL

List project custom fields DDL

List project sections

Get a list of all of the sections in a given project.

List project tasks

Get a list of all the tasks in a project.

List section tasks

Return the compact section records for all tasks within the given section.

List section tasks DDL

List task attachments

Retrieve a list of all attachments on the task.

List task custom fields DDL

List task custom fields for project

Retrieve a list of all tasks custom fields for a single project.

List task custom fields for projects

Retrieve a list of all tasks custom fields for multiple projects.

List task custom fields from projects DDL

List task custom fields from task ID DDL

List task dependencies

Return a list of all the other tasks that a specified task is dependent on.

List task dependents

List all the dependents from a task.

List task stories

Get a list of all of the stories on a task, including comments, and other actions.

List task subtasks

Find a task's subtasks.

List tasks

List tasks by criteria.

List team members

Get a list of all of the users part of the team.

List workspace projects

Retrieve a list of all the projects you can access in your account.

List workspace projects DDL

List workspace projects without team DDL

List workspace tags

Retrieve a list of tags from a workspace.

List workspace tags DDL

List workspace tasks

Retrieve a list of tasks from a workspace.

List workspace users

Retrieve a list of all users in a workspace.

List workspace users DDL

List workspaces

Retrieve a list of all the workspaces you can access in your account.

List workspaces DDL

Project exists?

Check if a project exists in Asana.

Raw HTTP request (advanced)

Perform a raw HTTP request with some pre-configuration and processing by the connector, such as authentication.

Remove custom field from portfolio

Remove a custom field from a portfolio.

Remove followers from a task

Remove each of the specified followers from the task if they are following. Returns the complete, updated record for the affected task.

Remove members from a project

Remove users as members of a project.

Remove members from portfolio

Remove members from a portfolio.

Remove project from portfolio

Remove a project from a portfolio.

Remove tag from task

Remove a tag from a particular task.

Remove task from project

Remove the task from the specified project. The task will still exist in the system, but it will not be in the project anymore.

Set dependencies for a task

Mark a set of tasks as dependencies of this task, if they are not already dependencies. A task can have at most 15 dependencies.

Set dependents for a task

Mark a set of tasks as dependents of this task, if they are not already dependents. A task can have at most 30 dependents.

Unlink dependencies from a task

Unlink a set of dependencies from this task.

Unlink dependents from a task

Unlink a set of dependents from this task.

Update custom field

Update a custom field.

Update drop down option in custom field

Update a drop-down option attached to a custom field.

Update order of drop down options in custom field

Reorder the drop-down options in a given custom field.

Update portfolio

Update a portfolio.

Update project

Update a project.