I found a way! Borrowing some code from various places and tweaking, I use Script Editor (on every Mac) to make an AppleScript for adding tasks with notes to Asana. I saved it as an application, so I can just run it using any app launcher’s keyboard shortcut (Spotlight, LaunchBar, Alfred, etc.). I called my app “Add to Asana,” so I just type “aa” and hit return. Very quick.
Here’s the code if anyone wants to try it out:
set prompt to "Task name:"
set dialogResult to display dialog prompt ¬
buttons {"Cancel", "OK"} default button 2 ¬
default answer "task name"
set theProjectTitle to text returned of dialogResult
set prompt to "Notes:"
set dialogResult to display dialog prompt ¬
buttons {"Cancel", "OK"} default button 2 ¬
default answer "notes"
set theNotes to text returned of dialogResult
set url_text to "curl -X \"POST\" \"https://app.asana.com/api/1.0/tasks\" -H \"Authorization: Bearer 1/REPLACE THIS WITH YOUR PERSONAL ACCESS TOKEN\" -H 'Content-Type: application/x-www-form-urlencoded; charset=utf-8' --data-urlencode \"workspace=REPLACE THIS WITH YOUR WORKSPACE ID\" --data-urlencode \"assignee=REPLACE WITH ASSIGNEE’S EMAIL\" --data-urlencode \"name=" & theProjectTitle & "\""
set url_text to url_text & " --data-urlencode \"notes=" & theNotes & "\""
set response to do shell script url_text
-- display dialog (url_text as text)
-- display dialog (response as text)