Articles in this section
Category / Section

How to get all the task details from a project in Asana

Published:

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

  1. 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.

    1.png

  2. Create an iterative dashboard parameter with the task GIDs.

    • Click the dashboard parameter icon.

      2.png

    • 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.

      3.png

    • Save the data source.

  3. 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 is tasks_by_project and parameter_name is taskids.

  4. 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"}”
    
  5. Extract the assignee name from the JSON response.

    • Create an expression for this data source.

      4.png

    • Create an expression to extract the assignee name from the JSON response.

      5.png

    • Save the expression and save the data source.

    NOTE: The above expression is for PostgreSQL IMDB

  6. 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.

    6.png

If you want to fetch task details from all projects, you need to add another data source with iteration based on all projects.

References

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
SM
Written by Siranjeevi Murugan
Updated
Comments (0)
Please  to leave a comment
Access denied
Access denied