I used Curt Clifton’s Populate Template Placeholders script in OmniFocus on my Mac a while back. I don’t know when or why this stopped working, but I assume it was when OmniFocus 4 came out. But rather than spend time troubleshooting it, I decided to switch my birthday reminder template to Apple Shortcuts. The benefit is that it works on all of my Apple devices. I have other templates that I also use and need to switch over.
The Template Placeholders script, or Apple Shortcuts set to add something to OmniFocus, makes it simple to set up projects when you need them. This is ideal for birthdays where you want a project each year to sort out presents and a card for an individual without manually creating a project each time with the date and times of everything you want to do to prepare for that.
Likewise, it is great for meetings where specific steps are needed before or after the meeting, such as emailing Zoom meeting details or booking a room, processing minutes and actions after the meeting, reminders, setting, etc.
The shortcuts are not particularly challenging to create, although I ran into issues getting the project placed in the correct folder. It took a bit of research to find the correct syntax. I tried various methods such as deep links like omnifocus:///folder/gXBOjxW8JqA or folder names like Family/Birthdays. Neither of them worked. What I found was that the correct format is simply Family : Birthdays
When running the shortcut, it now correctly places the project into the correct folder rather than dropping it in the inbox.
You can see this in the screenshot below:
Here is a quick summary of what is happening for those new to adding projects to OmniFocus with Apple Shortcuts.
First, it prompts the user for the birthday person’s name. Then, it sets the provided input into a variable called Name.
It asks for the birthday date. It formats the date into something more friendly (you can click “Show More” to see various options available) and then sets that formatted date to a variable called Date.
The Text field contains TaskPaper format. Rather than creating the TaskPaper syntax myself, I manually build a project in OmniFocus and set all dates and notes precisely as I want (this is a sample project deleted when I have copied the task paper). I then select all items in the project, including the project name, and right-click and hit “Copy as TaskPaper”. I then paste this into the Text field and replace my fake names/dates in the text with the variables that I have. For the date on the project, I don’t want to see someone’s birthday next year as an item I need to action now, so I set a defer date to Date -21d, which reveals the project 21 days before the individual’s birthday.
When done, it uses the “Add TaskPaper” action using the Text just created. In the instance of this Birthday shortcut, I want all shortcuts to go into Family : Birthdays, so I select Folder in the action and then put the folder name as detailed above.
When running the shortcut, you get prompted in the order of the shortcut, so name and then birthday date. Thats it. The project is added to OmniFocus in the correct folder, and if it is more than 21 days away, it is deferred and only shows up when needed.
I can then repeat adding people with the short cut as needed.
Apple Shortcuts is extremely useful when you want to reduce the time it takes to create identical projects. Please post any questions, and I’ll help where needed.