Documentation

Asana Integration via REST API

This article describes how to get your Asana information into your data destination via a REST API input.

Note

You may want to create two connections (Asana_tasks and Asana_users, for example) to retrieve your Asana data. This will allow you to have joinable IDs for retrieving names for specific IDs in events as described below. To be clear, you can begin retrieving data with just one input.

A Quick Note about Authentication

Authentication for Asana is covered in Asana's API docs here: https://asana.com/developers/documentation/getting-started/auth. In the Quick Reference section, see the instructions for getting the ACCESS_TOKEN.

When configuring authentication for your input in Alooma, no username/password is required. Use the Authorization header from Asana instead.

Creating the Main Input
  1. From the Plumbing page, select Add new input.

  2. Select REST API from the list of inputs.

  3. Enter a name for the input. We’ll use the input name in the UI and to name the events that come from this input. Note that after creation, the input name cannot be changed.

  4. Enter your Asana API "Tasks" URL and leave the HTTP method as GET. Do not specify a username/password. Leave Pagination as "None".

  5. Enter the following URL Parameters and values:

    URL Parameter

    Value

    Type

    opt_fields

    name,id,owner,current_status,due_date,created_at, modified_at,archived,public,members,followers,color, notes,workspace,team

    text

    limit

    100

    text

  6. Enter a Data Field value of "data".

  7. Under Advanced Settings, add an Authorization header (see A Quick Note about Authentication.  Ours looks something like this:

    asana_auth.png
  8. Click Create Input

Ok, you've created your Asana_tasks input. It will look something like this:

Asana_tasks_REST.png

From here you can begin importing your Asana data. That said, if you want to have joinable IDs so you can retrieve the name associated with the user IDs, you will need to create a second input. That process is covered in the next section.

Using Two Inputs to Map IDs and Names in Asana Events

Once you've created your initial Asana input as described above, you may notice that your events only contain the ID of the user:

Copy
{
    "id": 0123456789,
    "created_at": "2018-02-12T19:32:08.189Z",
    "followers": [
        {
            "id": 112233445566778
        },
        {
            "id": 112233445566770
        }
    ],
    "modified_at": "2018-03-10T00:41:45.422Z",
    "name": "Research most popular project management apps to demo in a webinar",
    "notes": "",
    "workspace": {
        "id": 123123123
    },
    "_metadata": {
      ...
    }
}

Note

Once you create your input, a good practice to is to go into the Code Engine and click Get Sample (you may have to select your input from the Sample pull down). If a sample event appears, you know you have the input configured correctly and that you are retrieving data.

But, what if you want more information about that ID? If you want to map the users' names to IDs in your data destination, you'll need to create a second input (for the Users endpoint) to use for the join.

Create a second input (we called ours Asana_users, but the name is not significant), following the steps above, with the following changes:

  1. On step 4, provide the API "Users" URL.

  2. On step 5, enter the following URL Parameters and values:

    URL Parameter

    Value

    Type

    limit

    100

    text

Now you have the Tasks and Users endpoints loading into your data destination and available for joining. Here's an example event from the Users endpoint, showing the Name associated with the User ID in the event example above.

Copy
{
    "id": 0123456789,
    "name": "A. User",
    "_metadata": {
        ...
    }
}

Search results

    No results found