Hi @olderbrother!
I use Alfred to trigger apps with that type of Keyboard shortcut, here’s a link to the Alfred website if you want to learn more about the app). You can set up workflows in Alfred that trigger with keyboard commands and send webhooks using Apple Script. You can then use the Catch hook trigger for the Webhooks by Zapier integration to trigger a Zap.
I’m not familiar with LaunchBar or Omnifocus, but if they can do the same then you should be able to put something together.
If you have (or would consider using) Alfred, we have a blog post that explains how to set up a Zap using Alfred: Zapier for Alfred blog post
I hope that helps!
Hey, @Danvers, thanks for the tip. I may eventually switch to Alfred, but I’m already using the similar LaunchBar. Fortunately, the process of setting up such a zap with webhooks and AppleScript is probably about the same. I’ll check it out and see what I can come up with!
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)