Here’s a walkthrough with some screenshots of the process I use to create new OmniFocus actions, straight into an existing folder or project, without scripting.
I’ve used Zapier’s OmniFocus integration for a long time to create actions in my OmniFocus inbox triggered by things like receiving an invoice from a particular vendor in Gmail, a recurring event in my diary, invoicing a client after a meeting, updating my CRM after a networking event, and lots of others.
The nature of the projects, actions, tags, defer and due dates, and so on I need inside OmniFocus to manage all of these inputs don’t change much, if ever. These are all the sort of projects you’d use a template for.
Manually processing all of these actions from my inbox to the same projects each time got increasingly frustrating, boring and time-consuming.
Whilst I’m comfortable with markup like HTML and CSS, I’d never spent any time getting to grips with JavaScipt, so starting from scratch to build a scripting solution wasn’t attractive.
This is what I came up with. It uses a combination of Zapier, Taskpaper text and the URL reference scheme for OmniFocus, and Keyboard Maestro.
I’m going to assume that you’re familiar with using all of these but if you’re not I’ve put a few links at the bottom that you should find helpful.
(@DomBett Unfortunately, I don’t have anything set up in Airtable that I can use for this walkthrough, but I’m sure you’ll be able to adapt the method.)
The example I’ve used here relates to any work meetings I go to where I’ve travelled by car. For each meeting, I need to create two actions inside a specific project called “Process mileage and travel expenses for work meetings”. (Catchy title, I know, but it does what it says on the tin.)
One action is to update the spreadsheet that I use to track my business miles, and because I’m likely to have other expenses that need to go into my accounting software I need an action for that as well.
It’s a 3 step process.
-
Every time I get a new work meeting in my diary, I add a short text string “.wme” (for work miles and expenses) to the appointment notes. (As I mentioned, I use the Fantastical apps on my Mac and iPhone, but my calendar is hosted on Google.)
-
Zapier sees the matching search text in the notes for the Google calendar appointment and creates a new file inside a Dropbox folder using the TaskPaper text format.
I created what’s essentially an OmniFocus project template in TaskPaper format in the File Contents section on the Zap that Zapier populates with placeholders pulled from the appointment, like the date and who I’m meeting.
Because I can’t do any of these actions until the meeting’s happened, I can use the meeting date that Zapier found in the appointment to set a defer date for the actions.
- Back on my Mac, this Keyboard Maestro macro opens the Dropbox file that Zapier has created, copies the TaskPaper text, and uses the OmniFocus URL scheme to paste the text directly into the project that I’ve specified in the “Open URL” step in the macro to create the OmniFocus actions.
Finally Keyboard Maestro deletes the TaskPaper text file that Zapier created inside Dropbox so that I don’t end up with multiple actions for the same meeting.
I don’t need to have this project updated any more than once a day, so I have the macro set to run on a time-based trigger.
This is the full macro:
I’ve used a straightforward example here (mainly so that I can get everything I want on the screenshots!) but you can take this as far as you want to by adding extra steps to the Zap. You could have Zapier create multiple TaskPaper text files if you want to create different projects inside OmniFocus from the same initial Zapier trigger.
For example, if I’m meeting a client and I need to generate an invoice afterwards, I’ll add another text string “.inv” to the appointment notes, alongside “.wme”.
This will create the OmniFocus project and actions I need for the client invoice all the way through to reconciling the client invoice inside my accounting software via a different Zap, TaskPaper text file and Keyboard Maestro macro.
A few other things to mention
-
One limitation with this is that if you’ve asked Keyboard Maestro to create whatever projects and actions you want inside a specific OmniFocus project then you do need to make sure that if you change the project name at any time you update the “Open URL” step in the macro.
-
Another limitation is that you need a create a new Zap and Keyboard Maestro macro for each different trigger that you have. In practice though this really isn’t an issue. Once you have the first one set up, it’s much easier to build as many as you want.
-
You may need to experiment with the number, position and the length of pauses in the Keyboard Maestro macro.
-
When I first put this together I created a note in Evernote, rather than a Dropbox text file, so that’s an alternative you might prefer to use. I think that any text-based app that has a cloud connection should work, where Zapier and Keyboard Maestro can access the individual note that contains the TaskPaper text.
-
If the OmniGroup ever introduce a filters feature for the OmniFocus inbox in the same way that we’ve got filters on our email inboxes this whole process will all be redundant!
-
I haven’t tried this with IFTTT so that may be another possibility if you’re already using that service.
One more thing. I certainly don’t consider myself an expert in this stuff and there may well be simpler, more elegant, tidier ways to do this that don’t involve scripting. I did clean this process up a little once I’d got this to the point where it was working reliably but stopped after that. If anyone’s got suggestions for improvements please do let me know.
Useful resources
OmniFocus url reference scheme (for addressing the right project to paste into in the “Open URL” step of the Keyboard Maestro macro) https://inside.omnifocus.com/url-schemes
OmniFocus TaskPaper reference ( for creating the TaskPaper template in the File Contents section of your Zap) https://support.omnigroup.com/omnifocus-taskpaper-reference/
I can recommend @MacSparky’s excellent Keyboard Maestro field guide if you need help with that (the others I’ve got are equally good.)
If anyone’s got any questions about any of this, or if there’s anything I’ve put in here that isn’t clear please shout.
Before I set this up I was regularly processing twenty or so of these sorts of actions from my OmniFocus inbox every day. That’s all happening behind the scenes now.
Do try it out and let me know how it works for you.