Skip to content

Instantly share code, notes, and snippets.

@gjlondon
Created January 4, 2014 18:32
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save gjlondon/8258749 to your computer and use it in GitHub Desktop.
Save gjlondon/8258749 to your computer and use it in GitHub Desktop.
Export Asana tasks to CSV
# use Asana's "export project to JSON" function and copy-paste contents to an "asana_dump.js" file
import json
import csv
import pprint
pp = pprint.PrettyPrinter(indent=4)
f = json.load(open("asana_dump.js"))
with open('asana_dump.csv', 'w') as fp:
a = csv.writer(fp, delimiter=',')
data = []
for task in f["data"]:
# choose conditions for inclusion and what fields you want to include in dump
if not task['completed']:
data.append([task['name'], task["due_on"]])
a.writerows(data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment