Asana 6.0
Asana is a web and mobile application designed to help teams organize, track, and manage their work
- On this page
- Asana
- Overview
- API Information
- Authentication
OverviewCopy
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
API InformationCopy
The Asana connector has the following Base URL: https://app.asana.com/api/1.0. More information can be found on their main API documentation (v1) site. Details regarding their API limitations can be found here.
AuthenticationCopy
IMPORTANT!: Please note that the later versions of the Asana connector (version 6.0+) use a different version of Asana auth services than the trigger.
The different authentication versions are incompatible with one another and cannot be used together in the same workflow.
If you wish to use the Asana trigger and connector in the same workflow you will need to use an earlier version of the connector (version 5.4 and below) with the trigger.
Within the builder, click on the Asana connector to display the connector properties panel. Select the Auth tab and click on the New authentication button.
In the Tray.io authentication pop-up modal name your authentication in a way that will quickly identify it within a potentially large list. For example whether it is a Sandbox or Production auth, etc.
Consider who/ how many people will need access to this authentication when choosing where to create this authentication ('Personal' vs 'Organisational').
The next page asks for your authentication method and environment.
Once you have added these fields to your Tray.io authentication pop-up window click the Create authentication button.
Your connector authentication setup should now be complete. Please run the simplest operation available to test and make sure you can retrieve data as expected.
Available OperationsCopy
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 AsanaCopy
List TasksCopy
When using the List Tasks operation you should only choose one of Assignee ID or Project ID:
If you choose an option for both you will receive an error message such as:
Search TasksCopy
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.
ExampleCopy
This example demonstrates how to use a workflow to create a new task and send a slack message with the task name:
You will need to create two steps:
Create task (using the asana connector)
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":[1920],21"liked":false,22"assignee":null,23"followers":[24{25"gid":"68711130877162",26"id":68711130877162,27"resource_type":"user",28"name":"A person"29}30],31"workspace":{32"gid":"498346170860",33"id":498346170860,34"resource_type":"workspace",35"name":"Personal Projects"36},37"tags":[3839],40"projects":[41{42"gid":"969484041887157",43"id":969484041887157,44"resource_type":"project",45"name":"test"46}47],48"id":972375047894944,49"start_on":null,50"likes":[5152],53"memberships":[54{55"project":{56"gid":"969484041887157",57"id":969484041887157,58"resource_type":"project",59"name":"test"60},61"section":null62}63],64"due_at":null65}66}
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":[1617]18}19}