Import Asana Data to Google Sheets

Import Asana Data to Google Sheets

Last Updated On August 31, 2019
You are here:
< Back

Asana is a project and task management tool. In this guide, we’ll walk through how to pull tasks from the Asana API directly into Google Sheets, using the free API Connector add-on. We’ll first get a personal access token from Asana, and then set up a request to pull in data from Asana to your spreadsheet.

PART 1: GET YOUR ASANA PERSONAL ACCESS TOKEN

  1. Log in to Asana and click your profile icon in the top right corner to open the profile drop-down menu. Click ‘My Profile Settings’
    api-connector-asana-img1

  2. From the My Profile Settings menu, click Apps
    api-connector-asana-img2

  3. Click Manage Developer Apps
    api-connector-asana-img3

  4. On the Developer Apps screen, click “Create New Personal Access Token”
    api-connector-asana-img4

  5. A screen will open, prompting you to provide some details.
    api-connector-asana-img5

  6. Once you click “Create”, you’ll see a Token. Copy this as we’ll need it shortly. Congrats, you’re now ready to get started pulling data out of Asana’s API.
    api-connector-asana-img6

PART 2: CREATE YOUR API REQUEST URL

We’re going to follow the Asana API documentation to make a simple request with the /me endpoint.

  • Base URL:https://app.asana.com/api/1.0
  • Endpoint: /users/me

Putting it all together, we get the full API Request URL:
https://app.asana.com/api/1.0/users/me

PART 3: ENTER VALUES INTO API CONNECTOR

We can now enter all our values into API Connector to start importing Asana data into Google Sheets.

  1. Open up Google Sheets and click Add-ons > API Connector > Create New API Request.
  2. In the Create Request interface, enter the Request URL we just created
    api-connector-asana-img7

  3. Under Headers, enter a key-value pair like this:
    Authorization Bearer {Token}

    Replace {Token} with the personal access token you got above in step 6.
    api-connector-asana-img8


  4. Create a new tab. You can call it whatever you like, but here we’ll call it ‘Asana User’. While still in that tab, click ‘Set’ to use that tab as your data destination.
  5. Name your request. Again we’ll call it ‘Asana User’
  6. Click Run and a moment later you’ll see details about your account populate the Asana User tab in your Google Sheet:
    api-connector-asana-img9


  7. Pay special attention to the field labeled data » workspaces » gid. This is your workspace ID, we can use that to make further requests for tasks and project information.

PART 4: NOTES AND EXPANSIONS

  1. Experiment with different endpoints and query strings as described in the documentation. For example, to retrieve all your tasks, enter the following in the API Request field: https://app.asana.com/api/1.0/projects/{projectID}/tasks. Replace {projectID} with your project ID (click on your project and check the URL bar to see this value).
    api-connector-asana-img10

  2. Asana recommends using pagination when retrieving large result sets, to break responses into smaller sets. Retrieving additional records requires using the ‘limit’ and ‘offset’ parameters as described in their documentation.
  3. To create a new task in Asana from Google Sheets, make a POST request with the URL https://app.asana.com/api/1.0/tasks?projects={projectID}&workspace={workspaceID}. As always make sure to replace {projectID} and {workspaceID} with your own values. Input your task details into the POST body as described in the documentation, like this:
    api-connector-asana-img11
    You will immediately see your new task reflected in your Asana dashboard. Note that you can only create one task at a time with this method.
    api-connector-asana-img12

Comments:0

Leave a Reply

Your email address will not be published.