Create new Omnifocus project triggered by new Airtable record

I’m not sure this is possible, but I’d love for it to happen: I would like to find an automation that watched AirTable for the creation of a new record in a particular view in a particular base and when it sees it, triggers the creation of a new Omnifocus project from a Taskpaper-based template using values from the fields of that Airtable record to fill in the variables in the OF project.

Currently, I enter the Airtable record by hand and then run an iOS Shortcut that runs a Javascript automation in Drafts (a modification of the one developed by @RosemaryOrchard), re-entering the data into the Javascript that I had just entered into the Airtable record. I would like to bridge these tasks.

Obviously, Zapier can watch Airtable and will be triggered by the creation of a new record in a particular view, but then what? Can a Zapier run an iOS shortcut? (My guess is No.) Can it run a Javascript in Drafts? (My guess is still No.)

Any ideas?

A couple of suggestions:

  1. Prompted Manual: Pushcut to prompt you to run a shortcut with an appropriate parameter.
  2. Automatic: Use a Mac to receive an update and trigger a script to create the project.
2 Likes

I use Zapier to create OmniFocus projects without the need for scripting, or having to process projects and actions manually from my OmniFocus inbox.

Zapier uses information from the trigger app to populate a taskpaper template for the OmniFocus project which is stored in the zap, and uses this to create a text file inside Dropbox.

On my Mac I have Keyboard Maestro run a macro to open the text file, copy the text, go over to OmniFocus and paste the taskpaper straight into the app, bypassing the OmniFocus inbox.

Keyboard Maestro goes back to the taskpaper text file in Dropbox and deletes everything in there so that I don’t end up with duplicate projects and actions in OmniFocus.

I have multiple zaps set up to create OmniFocus projects and actions based on email parsing in Gmail, and I’m working on others for a client to create OmniFocus projects from Google sheets, so this should work with Airtable too.

(Apologies for the quick walkthrough. I can share more about the process if you’re interested.)

2 Likes

That sound exactly what I’d like to do. If you could share more about the zaps, I would greatly appreciate it.

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.

  1. 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.)

  2. 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.

  1. 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.

1 Like

Thank you, Chris. That is an excellent recourse and well-documented. In my zeal, I failed to wait for your response and dove in on my own. I’ve written it up here on my blog:

One difference is that rather than use a time-based trigger, I use Hazel to watch the Dropbox folder and execute an Applescript that triggers the Keyboard Maestro macro so I don’t have to wait until a particular time of day for the OF project to show up. I agree that I would love to have filters in OF’s inbox. That would be so useful.

I have had to set up separate zaps for each kind of project because Zapier filtering is a feature at a higher product level than I’m able to pay for at this time. Thank you again!

1 Like