Skip to main content

Import Builder Use Case — Asana

Use the Import Builder to fetch Tasks from Asana using their REST API

G
Written by Gleb Nikonov
Updated today

Overview

This use case will show how to use the Ardoq Import Builder to fetch data from the GitHub API, specifically focusing on issues in a repository.

Setting Up the Connection

Pre-requisites in Asana

You will need to create an personal access token in Asana before proceeding.

You can do so by going to the Asana Developer Console and clicking Create new token. Give your token a name, agree to the terms, and click Create token. Copy the token ID for use later in the integration.

We'll be using the Get tasks from a project endpoint — https://app.asana.com/api/1.0/projects/{project_gid}/tasks — to retrieve tasks on a per-project basis. The endpoint is configurable with query parameters, specifically opt_fields, to define the data that is returned.

We'll be using the following query parameter: ?opt_fields=name,resource_type,resource_subtype,assignee.name,parent.name,assigned_by.name,completed

Refer to the Asana documentation to see how to define the optional fields you wish to retrieve.

Ardoq Connection

In Ardoq, open up the Import Builder, go to the Connections tab and create a new connection. Next, configure the following setting for a basic set up:

  1. Set the Base URL to app.asana.com

  2. Set the Authentication method to Bearer token

  3. Set the token value to the personal access token you copied from the Asana Developer Console

  4. Set the endpoint to /api/1.0/projects/{project_gid}/tasks?opt_fields=name,resource_type,resource_subtype,assignee.name,parent.name,assigned_by.name,completed

    1. You can find the {project_gid} value in the URL after /project/. For instance, the project_gid will be 1212879799821799 for the following URL: https://app.asana.com/1/251344344001670/project/1212879799821799/

  5. Set the Pagination method to Cursor-based and set the Cursor path to next_page.offset

  6. Run the request to verify your connection and click Save connection

The configuration should look like the following:

Did this answer your question?