Exporting tasks from Asana for backup and analytic

Paweł Świderski
5 min readJun 24, 2018

I’ve been using Asana to organize my life for over 2 years. It is a great tool to create task lists, template task lists, group of tasks related to specific task and to set due dates for those tasks. Asana sorts tasks by duedate and send notifications to always know what is to be done for each day. It is really useful for me and I think it also can be useful for you.

UPDATE: Please look at the article about newer version of AsanaExporter tool.

Recently I realized that making backup of my Asana with using Asana’s export function is problematic. Asana allows to export only 2000 tasks at once with using their export feature. It is of course possible to filter tasks from specific period, export them, then export from another period, over and over again, and finally merge all data. It is possible but very tedious and not so practical. If I filter by modification date it is very likely that some tasks would be exported mutiple times. So it requires from me to merge exports. It is not so easy to do with just spreadsheet.

To avoid all those problems I wrote an application that uses Asana’s API to download all your tasks from all your projects. It is available on github:

Run AsanaExporter

Build or download AsanaExporter then run it by entering the command in console:

java -jar asanaexporter-all-1.1.1.jar $personalAccessToken

$personalAccessToken is an authorization token for your Asana’s account (more: https://asana.com/developers/documentation/getting-started/auth#personal-access-token). You can generate it from Asana settings panel, click on your logo (top right corner) in Asana Webpanel. Then select My Profile Settings > Apps > Manage Developer Apps > Create New Personal Access Token.

Remember to Deauthorize token that you do not use. It is safer to generate token before each usage of AsanaExporter.

Result of AsanaExporter

The result is available in asanaTasks.csv file. You can use these data for backup. It is also possible to analyze this data.

Let’s import it to the spreadsheet. You can use whatever spreadsheet implementation you like, I will use Google Doc.

Click File > Import > Upload asanaTasks.csv

Set correct import options. Important thing is to set separator type to semicolon. Rest of the options depends on your preference.

Imported table should have 10 columns.

  • id —task identifier from Asana
  • createdAt —date and time of task creation
  • completedAt — date and time of task completion
  • dueOn —due date that you set
  • modifiedAt — date and time of task last modification
  • name — task content
  • assignee
  • notes — content that you put in task’s description
  • projects — project names separated with comma and space e.g. “Example Project 1, Example Project 2”
  • parentTask — name of the task that is a parent for this task

AsanaExporter exports all your tasks from your default workspace. Unassigned tasks from projects are also exported. AsanaExporter does not export tasks that are not assigned to you and any project.

Analyze Asana’s data

I wanted to know how many tasks were created, modified in the last week and from the beginning. Also I wanted to know how many of them are uncompleted and completed.

It is easy to do with spreadsheet. Add two columns on the left and few rows on the top of the imported data. We will add formulas in those cells. Future imports you can put in the sheet. Just point start of the imported table to the start of your current table. Then formulas will adjust to the new rows in the imported data.

Spreadsheet looks as follows:

As you see all needed data are visible here.

Additionally you can filter the data by using filter options.

Create spreadsheet formulas

In G3 put date and time of the day week ago. We need this to be able to calculate if task was created/modified within last week or it is older.

When it comes to columns, A6 has a formula:

=IF(D6>=$G$3;IF(E6="";1;0);IF(E6="";3;2))

Mark cell and drag it to few more cells. Than click on A6 cell, Ctrl+C and mark all A column by clicking on the top, on A and then Ctrl+V. Delete values from rows above A6. With this trick column A is full of formulas that are needed.

Numbers in the column:

  • 0 — completed task that was created in the last week
  • 1 — uncompleted task that was created in the last week
  • 2 — completed task that was created more than week from now
  • 3 — uncompleted task that was created more than week from now

In Column B, put a formula for B6 and then apply for the entire B column:

=IF(G6>=$G$3;IF(E6="";1;0);IF(E6="";3;2))

Numbers in the column means the same but the date is based on the modification date.

Let’s look closer to formulas for analytical table:

Formula for all tasks modified within last week (D2):

=COUNTIF(B6:B200001;"=0")+COUNTIF(B6:B200001;"=1")

all tasks created within last week (E2):

=COUNTIF(A6:A200001;"=0")+COUNTIF(A6:A200001;"=1")

all tasks (F2):

=COUNTIF(B6:B200001;"=0")+COUNTIF(B6:B200001;"=1")+COUNTIF(B6:B200001;"=2")+COUNTIF(B6:B200001;"=3")

uncompleted tasks that were modified within last week (D3):

=COUNTIF(B6:B200001;"=1")

uncompleted tasks that were created within last week (E3):

=COUNTIF(A6:A200001;"=1")

all uncompleted tasks (F3):

=COUNTIF(B6:B200001;"=1")+COUNTIF(B6:B200001;"=3")

completed tasks that were modified within last week (D4):

=COUNTIF(B6:B200001;"=0")

completed tasks that were created within last week (E4):

=COUNTIF(A6:A200001;"=0")

all completed tasks (F4):

=COUNTIF(B6:B200001;"=0")+COUNTIF(B6:B200001;"=2")

Summary

I hope AsanaExporter will be useful tool for you! Exported content can be used by you to backup the data and perform lots of analytical jobs.

If you have any questions or comments. Please let me know. Constructive feedback is appreciated.

--

--