Automation in OmniFocus 2.14 (released 2016-04-26)

@zemackdaddy @kcase
Good to know, thanks!

If I just copied the text (e.g. from a plain text document) then how/where would I paste it in by hand in OmniFocus?

Please forgive wrong brackets…

@skipif(«var»=value)

An example use: for a packing list that can vary depending upon activity and destination i.e. If variable equals “domestic” the skip the “pack passport” item

Skipping should also affect subtasks

As an aside, in an ideal world, I could define a shortlist of options for a variable that I could choose from when running workflow.

i.e. Define «typeoftrip::overseas::domestic»

Release notes from today’s r259359 build:

OmniFocus 2.14 TestFlight — April 15, 2016

  • Add URLs — Added parallel, autocomplete, completed, repeat-method and repeat-rule parameters to the URL scheme. Also added an optional reveal-new-item=true parameter which navigates to show you the new item.
  • Add While Busy — Updated yesterday’s “add while busy” logic to stop sending you in the Inbox.

OmniFocus 2.14 TestFlight — April 14, 2016

  • Add Attachments — The /add URL action now supports attachment and attachment-name parameters, making it possible to build workflows like this Send File to OmniFocus action extension. Multiple attachments are supported.
  • Add While Busy — The /add URL action will no longer be ignored when the app is busy (e.g. when editing an item or displaying a list of search results). Instead, the app will attempt to automatically stop whatever it’s doing so it can display the Quick Entry dialog for the /add; if it’s not allowed to automatically stop the current operation (e.g. when prompting for the user to cancel or save a new item), it will wait until the current operation finishes and then prompt for the /add.
  • Autodone Crash — Fixed a crash encountered whenever an @autodone tag was present.
  • App Info — The new /app-info URL action can be used by automation workflows to detect which version of the app they’re talking to.

OmniFocus 2.14 TestFlight — April 13, 2016

  • Callback URLs — Callback URLs are now supported for navigation URLs, not just for /add and /paste URLs.
  • TaskPaper — Copying to/from the TaskPaper format now supports time estimates.

OmniFocus 2.14 TestFlight — April 12, 2016

  • TaskPaper — Copying to/from the TaskPaper format now supports repeating tasks.

Ken,

Two features that would help make the new automation capabilities even more fantastic:

(1) It would be really useful to also have the URL pass the estimated duration of a task.

This would make creating a Workflow that blocked out your tasks on a calendar much easier. (Current implementations require you to estimate the time for a task a second time around).

(2) It would also be useful to allow for creation of a folder via URL.

When I have a new client, I always create a folder for the OF, with client-specific projects going into that folder. I’d love to create a “New Client” workflow that creates that folder and some default projects for me (along with setting up my other, non-OF, new client requirements.


I’m very excited about all the new possibilities these changes are making possible.

1 Like

Ken thanks for great work you are doing. Two questions:

  1. As you know, Taskpaper mainly uses column (:) to indicate a project and Editorial use it to fold projects. Is there any way to make it work with OmniFocus URL scheme?
  2. Could you create a reference webpage of the evolution of the URL scheme, as your team update it?
    Thanks

Thanks, Ken, for the Workflow help and the bug fix. I’ve updated to this morning’s test build, and now I’m encountering a bug of different sorts related to the “Add While Busy” logic. I’ve created a new project “NewProject” with a single action “NewAction”… After running the “Follow Up” workflow from the Share screen, OF it no longer reverts me to the Inbox, but when I click on the original “NewAction” task for editing, it reverts me back to the “NewProject” screen. Strangely, I’m also unable to do a “Search” after running the workflow.

Lastly, for some reason, even though I’m using the updated Workflow you provided, it is not yet creating a new action based on the original action. Could there be any other issues with the Workflow that I’m missing?

Agree with @Roseofwolf… thanks for the great work!

That would indeed be very useful !
For example, I have a workflow to create an action for YouTube videos I want to watch later. In the current form of my workflow, I put the duration of the video in the name of the action. Would be more useful to use the duration of the action instead (filtering, ordering etc…).

Is there a listing of all the supported URL actions?

@kcase Yea, I’d like to know this.

The biggest thing needed for release: A really well written set of instructions so that people can use it (both on iOS and OSX!)

I’ve been following this from first posting, and I’m finding myself increasingly confused…

Can you now use Drafts to add items to a specific project? What would that look like?
I’ve tried but can’t it working.

For example here is my grocery list URL action in Drafts:

omnifocus://x-callback-url/add?name=[[draft]]&defer=sunday&project=Groceries&context=Errands&x-success={{drafts4://}}&x-cancel={{drafts4:}}

The [[draft]] adds the entire draft as the name of the task, I have it defer to Sunday as that is the day I go shopping, project and context you can change to the Project and context you want the task to be added to.

Once the task is saved the last part:

&x-success={{drafts4://}}&x-cancel={{drafts4:}}

Will send me back to Drafts whether I save the task or I cancel adding the task, so you can take that out if you want to stay in OmniFocus after adding the task.

2 Likes

Has anyone made (or planning to make) the same thing as the Editorial workflow in JavaScript?

It would be great to be able to replace the template variables in 1Writer (iOS notes app that supports JavaScript scripting), and send the template with replaced variables to OmniFocus.

2 Likes

This is a game changer. I’d really like to see the date parser fixed, but I can work around.

Is it possible to do date math in the task name as well as due/defer?

You can literally select the text in a taskpaper file, go into the OF Inbox and long press a task. Choose paste.

This pasted a project with a task and a task with a note.

AA Service:
- Some task

  • try updating existing course records with default of 1 to see if migration finishes
    Some notes

A fix for this is coming in the next build (r259425) (EDIT: make that r259430):

OmniFocus 2.14 TestFlight — April 17, 2016

  • Automation and Dates — Dates used in automation can now combine absolute and relative date forms to get at a final result. For example, TaskPaper content can now say @due(2016-07-01 -3m) to indicate that something is due 3 months before 2016-07-01. (This makes it much easier to generate dates from a template project.)
2 Likes

Thanks, I didn’t realise you have to tap and hold on an existing task to be able to paste the copied project.

It doesn’t seem to be working for me and I checked that I’m on the right build:

Test project «name» @due(«due») @defer(«due» -2w)
- this should be done 1 week before «due» @due(«due» -1w)

I entered the date as 2016-06-02

Whoops, you’re totally right! Sorry about that.

The real fix for combining absolute dates with relative dates will be in the next build (r259430).

Just upgraded to OmniFocus 2 2.14 and now the task paper documents in Editorial I created last night on the previous build crashes OmniFocus. I’ve tried it with various different .taskpaper documents, each one copied and pasted out of OmniFocus (with the URL at the top of the document removed).

Also, it seems like any task or project that has the “Complete when completing last action” checkbox checked creates a tag of “@autodone(false)” when I copy it out of the iOS version of OmniFocus. Then, when I import that same project back into OF using Editorial and the workflow you provided the task no longer completes when the subtasks are checked off. I’ve found that if I manually change the tag to “@autodone(true)” the task then does auto complete as expected.

I’m super excited to start using this update regularly. The possibilities for this seem virtually endless! Thanks everybody!