Creating OmniFocus Templates with Workflow on iOS

I have used OmniFocus for task and project management for some time now on both the Mac and iPad. It’s a terrific application and one I’m always learning to get the most of its capabilities. At the end of last year, I heard a Mac Power Users episode on workflows where hosts David Sparks and Katie Floyd mentioned creating templates for OmniFocus projects. David used templates to automate task creation for regular projects that always have the same tasks (his example was prepping a podcast episode). I also heard Fraser Speirs discuss how he uses the iOS app Workflow to create OmniFocus tasks and projects in a Learn OmniFocus webinar. Fraser gives an example of tasks to be completed when he needs to cover for an absent teacher in his school. (To learn more about Workflow, I highly recommend Fraser Speirs and Frederico Viticci’s Canvas episodes on the Workflow app). This got me thinking about possible reoccurring projects where I could use a similar kind of template. In my current role, I coordinate two orientation programs for new business majors each quarter. Preparing for each program requires the same tasks, so it made an ideal project for a template.

Writing the template

To get started, I listed the tasks required and organized them in a way that made sense for the project. In OmniFocus’s terminology, I set this up as a parallel project (i.e. tasks don’t necessarily need to be done in a particular order). OmniFocus requires templates in the plain text TaskPaper format. In its most basic format, a template looks like this:

- project name
	- first task
	- second task
	- etc.  

TaskPaper (as it has been implemented by OmniFocus) allows the user to assign tags to projects and tasks to specify options such as context, due date, flagged, etc., Tags start with a “@” followed by the tag name (no space between) and the parameters in parenthesis, for example @due(01/10/2017). This tag would give the project a due date of January 10, 2017. The full list of tags OmniFocus supports can be found at https://discourse.omnigroup.com/t/implementation-details-for-omnifocus-2-14-automation/24179.

The final template with tags for my project is as follows:

- prep for (orientation type) on (date) @due(date -1d) @autodone(true)
	- print advising worksheet labels
	- assign front desk to apply labels
	- assign checklists to advisors
	- pair checklists with advising worksheets
	- update general education presentation
	- update pre-business presentation
	- save copies of presentations to OneDrive and shared drive
	- provide front desk with numbers of packets to prepare
	- request open class lists 
	- prepare agenda and staffing
	- send "items to bring with you" email to staff
	- review agenda with staff
	- print check in line signs
	- check atrium signs have correct room listed

Making the workflow

The workflow starts with asking the user for input, the orientation type and the date, which are used to specify the project due date and project name in OmniFocus. Each request starts with the “ask for input” action followed by the “set variable” action. The date input gets an intermediate step that formats it as a short date. This input is stored in two variables (“orientation type” and “date”) whose values are used in the template.

The next action “text” is where the TaskPaper-formatted template text is stored and variables from the previous steps are inserted. This text is then passed to the “URL encode” action which, in turn, forwards the template text as an input to a custom URL. The URL is the mechanism that sends the template to OmniFocus:

omnifocus:///paste?target=/folder/work/task/orientation&content=Input

The URL tells OmniFocus to paste the content (the text defining the tasks to create) in a specific location in OmniFocus (my “orientation” project in the “work” folder). Details on crafting URL schemes for OmniFocus on iOS can be found on Inside OmniFocus at https://inside.omnifocus.com/url-schemes .

The finished workflow can be run directly from the Workflow app or for quick access, I have added it to the Workflow widget on the iPad home screen.