Workflow: Create Multiple Events in Fantastical with Recursive Action in Drafts

One of the things I commonly do several times a day is registering new events in Fantastical. Sometimes, I even created multiple events in a single seating. I need to find a way to easily write any number of these events down in Drafts and have them processed through Fantastical automatically.

This is an example of the common use case I have for jotting down multiple events in a single seating using Drafts.

In order to do this, I need to parse each line in the Drafts post and convert it to a Fantastical URL scheme. Because I don't know how many events I want to create each time I trigger this action, I need the action to recursively invoke itself until there are no more lines left.

Update: If you're using Fantastical 2, please read this post to use the new fantastical2:// URL Scheme.

Open this link if you want it installed on your iOS device automatically.

I named the action Add Events to Fantastical, and if you notice the x-success and x-cancel parameters, I specify that Drafts should process the [[body]] using the same action. Using this approach, I'm processing one line at a time into Fantastical. And, if I decide to skip an event, I can still continue processing the next events in queue.


This is just one example of how powerful Drafts is. You can tweak this recursive approach to involve a more complex action - instead of just parsing events in Fantastical. You can also use the built-in Email Actions in Drafts to mail drop a list of tasks to Asana or OmniFocus. You just need to make sure that every actions being involved in the recursive action must fully support x-callback-url specification.

To find my other workflows, please visit my Productivity and Workflows blog.