How to get all the task details from a project in Asana
This article will guide you through the process of fetching all task details from a project in Asana using the Asana API.
Prerequisites
- An Asana account with access to the project you want to fetch task details from.
- The project GID (Global ID) of the project you want to fetch task details from.
Steps to create data source with all task details from Asana project
-
Create a data source to fetch all task IDs from a project.
Use the following URL format to create the data source:
https://app.asana.com/api/1.0/projects/<:project_gid>/tasks
Replace
<:project_gid>
with your project GID.You can find your project GID from Asana.
-
Create an iterative dashboard parameter with the task GIDs.
-
Click the dashboard parameter icon.
-
Create the iterative dashboard parameter with the task GIDs. Choose the GID field from the existing data source connected. This will have all the task Ids.
-
Save the data source.
-
-
Create another data source to fetch task details using the iterative dashboard parameter.
Use the following URL format to create another data source:
https://app.asana.com/api/1.0/tasks/@{{:datasource_name.parameter_name}}
Replace
:datasource_name
with the name of your data source where you saved the dashboard parameter and:parameter_name
with the name of your iterative dashboard parameter.Example URL:
https://app.asana.com/api/1.0/tasks/@{{:tasks_by_project.taskids}}
In this example,
datasource_name
istasks_by_project
andparameter_name
istaskids
. -
Get the required field from the assignee
Now, You will get all the task details from the project. The assignee field will be in JSON structure like below. If we need to get the name alone, then we need to use the expressions to split the data in the assignee field.“ { "gid": "1204832643245713", "name": "Jeevi m", "resource_type": "user"}”
-
Extract the assignee name from the JSON response.
-
Create an expression for this data source.
-
Create an expression to extract the assignee name from the JSON response.
-
Save the expression and save the data source.
NOTE: The above expression is for PostgreSQL IMDB
-
-
Create a dashboard using the data source.
Now you have all the task details in the data source, and you can create a dashboard using this data source.
If you want to fetch task details from all projects, you need to add another data source with iteration based on all projects.