I don’t like to repeat myself to stay productive. That’s part of the reason why I’m constantly looking to optimize my productivity workflows. Using tools like OmniFocus and Workflow from DeskConnect, Inc., help me meet those needs. Since I switched to OmniFocus earlier this year, I haven’t looked back—I’m even looking forward to a bright future!
What is Automation?
As a former software architect, I used to apply an awful lot of principles, best practices, and design patterns to the systems I had to build. One of them is the DRY principle: Don’t Repeat Yourself. It’s aimed at reducing repetition in information of all kinds.
In the productivity world—and with today’s abundance of technology and apps—the DRY principle can be applied by using scripts that allow you to automate things you would normally do by hand. These scripts run on your devices using scriptable apps. When you don’t automate—at best—you: copy, paste, modify, and repeat this process every time you need it. These individual steps are unbearable to me.
Automation is all about having a dynamic system that allows you to save time and energy. For me, it’s even fun. It’s meant for the repetitive tasks that slow you down or provide enough friction that postpone or cause you to neglect actions. The less friction, the better.
Capture and clarify for GTD lovers
There’s even beneficial side effects from automation.
If, like me, you use the GTD methodology to get on top of your life, the two unavoidable steps are:
1. capturing 2. clarifying
Templating in particular, along with automation in general, can help you do both in one step! Indeed, the actions you create by automation will be captured, and even partially processed, automatically. Processing clarifies the outcome of your action and allows immediate understanding of what you’re about to do. Automation can help by guiding the input process using a simple question/response principle.
But enough with the concepts. Let’s get our hands dirty.
The Template Workflow
When Ken Case announced the availability of OmniFocus 2.14, I immediately booked a slot in the testing program. Later, he published an example script using Editorial to create an OmniFocus project from a TaskPaper template. ￼
I couldn’t dig into the script as I didn’t have the Editorial app, but I did have Workflow.
Let’s have a look at a very simple and fictional example project we would like to transform to a template: ￼
Mmm..There are some notes which you can’t see because it’s not possible to show the outline of the project and all notes at the same time. Let’s try to represent this project using a pure text format:
- Prepare next week’s meeting about the automation project
- Check last week’s meeting notes
Make sure all required actions have been processed
- Email the project’s technical lead RE: feedback from the team
Ask about difficulties and situations that need to be addressed during the meeting
- Write the meeting agenda
- Send invitations to all attendees and attach the agenda
- Check last week’s meeting notes
Now we have the whole picture, and it’s pretty readable. And guess what? You just learned how to create an OmniFocus project in the TaskPaper format! You’re not a TaskPaper pro quite yet, but you get the point. If you want to learn more, use this reference file. Ken Case put together a great summary of the format in the TaskPaper format section in this thread.
My template requirements
You may have noticed that I put certain words in italic. That’s because I’d like to replace these words depending of the context. The project’s technical lead can vary from project to project. So I need to replace that portion of the action title by a meaningful name, for example the name of the real person. This is where placeholders come into play. In your template, you just need to replace the words that will vary by the placeholder. Let’s use the following convention: placeholders will be put between « and ».
I know that I have meetings on every Wednesday morning at 10 am, but sometimes the meeting is moved to another day. I’ll have to take that into consideration, too.
This is a sequential project, i.e. each action has to be completed in order, from top to bottom. The project has to be completed on the meeting’s day, or earlier, and let’s say I would like to complete an action each day prior to the meeting date.
We can now modify the template to take our requirements into account : ￼
… and in TaskPaper format, so you can see it all:
- Prepare next week’s meeting «meeting_date» about the «project_name» project @due(«due») @parallel(false)
- Check last week’s meeting notes @due(«due» -3d) Make sure all required actions have been processed
- Email «technical_contact» RE: feedback from the team @due(“due” -2d) Ask about difficulties and situations that need to be addressed during the meeting
- Write the meeting agenda @due(«due» -1d)
- Send invitations to all attendees and attach the agenda @due(«due»)
So what do @due and @parallel represent? They’re TaskPaper tags. There are currently 11 tags you can use in OmniFocus 2.15. Go to this page at the end of the TaskPaper Format section to read the full list (the eleventh tag is @autosave which has been added in the 2.15 release and is not listed there yet). These tags map to an OmniFocus action’s attributes like the time estimate, the due date, the context … you name it.
On to the workflow
To use the workflow I’m about to present to you, you’ll need to open the template project and use the share extension. Like so:
After a few taps the workflow begins. Just fill in a few prompts:
I won’t go too much into the ins-and-outs of writing scripts in Workflow, but I will give you an overview of the logic behind it and how it fits in to the OmniFocus URL scheme. Before that, a quick bit about URL schemes.
URL schemes are a way to jumpstart apps’ functionalities from other apps without having to manually launch them first. Let’s try this: open Safari on your iOS device and type (or click the link) in the URL bar: OmniFocus:///. This will simply launch our beloved app!
If you want to go further, try adding a few parameters that are built-in to OmniFocus, like so: OmniFocus:///add?name=An%20Action¬e=A%20note&flag=true. We’ve just created a flagged action in OmniFocus, from Safari, with a name and a note (because this is a URL, spaces must be encoded with %20). Pretty useful!
The last piece, which is essential if you want apps to communicate with each other in both ways, is the support for x-callback-url. This is a mechanism that allows apps to be called and chained together, essentially a back and forth between the two (or more!). URL schemes and x-callback-url are at the heart of automation on iOS.
This particular workflow makes use of the x-callback-url for the /parse-date URL action and the /paste URL action. ￼
In the first part of the workflow, I search for all the placeholders which I need to curate so that you’ll be prompted only once to replace a placeholder that would appear multiple times in your template.
This excerpt shows you how to use the x-callback call so that you can rely on OmniFocus to parse a date and get the result back in Workflow. The URL used is:
OmniFocus://x-callback-url/parse-date?input=Input. Input is a Workflow variable containing the date to be parsed.
This is the heart of the Workflow: all placeholders are replaced by the values you just entered. Pretty simple, yet very powerful. ￼
Now the resulting TaskPaper formatted actions are sent to OmniFocus by using the
/paste url action. I personally like to use the Inbox so that I can review the result and process appropriately. But you can change the target to projects if you prefer to. Starting with version 2.16, you have even more control when it comes to choosing the target, be it a folder, a project, or even an existing action. See here for more details.
My Workflow should work for any template — as long as you use the convention of putting your placeholders between « and » and use the keyword date in a placeholder to have the input parsed by OmniFocus. Of course, you can modify it to your needs and make it even more powerful. You can download it here.
I hope this was a useful look at what automation can bring to your own productivity—especially in combination with OmniFocus. In this article, I’ve talked about using the Workflow app to power my templating…but it’s not limited to just that. You could manage your templates (written in TaskPaper format) in different apps, like Editorial or Drafts. My approach to store templates in OmniFocus has pros and cons, but I find it practical to be able to review my templates within OmniFocus’ review perspective. It’s also more convenient to create and edit templates using OmniFocus’ own interface.
We only scratched the surface by focusing on templating; OmniFocus’ automation features can also be used in many other ways.
I also use Workflow to:
- delegate an action: this one allows me to delegate an existing action to someone and have all required informations taken from the Contacts app, in the notes section, to follow up with this person, like a list of (clickable) phone numbers or a link which allows me to write to this person using a pre filled email in my favorite app.
- remind me of a YouTube or Vimeo video: In case of a YouTube or Vimeo link, I can automatically set the duration of the action to the duration of the video. Pretty handy when you have spare time and need to choose something to watch in that window of time.