Implementation Details for OmniFocus 2.14 Automation

I too would love to see the /autosave parameter added - It would be the final step required for me to create the fully automated workflows that I crave!

1 Like

It doesn’t seem to like this format:

@due(July 7th)

How can I specify a date like this? (each time I run it, the next instance of July 7th is used)

@murkee That’s odd. Maybe try without the “th”? i.e. @due(July 7). That works for me.

ScottyJ

Will try thanks. As a workaround, I have a variable with -254 days and things like that (it’s an annual template for a long term project).

Similarly, how would I say ‘3rd of next month’ ?

FYI: We’ve added an &autosave=true option to the omnifocus:///add URL action for our next TestFlight build.

Looks like “next month 3” will do this right now, though that might be fragile as we improve date parsing in the future.

4 Likes

In an upcoming release (it’s committed to trunk, but probably too late for 2.15 at this point—so likely in version 2.16) the /paste URL action will accept more specific targets of the form target=/folder/FOLDERNAME or target=/task/PROJECTNAME (or even target=/task/TASKIDENTIFIER).

As part of building this, I ended up extending our OmniFocus reference URLs to support name lookups, rather than just identifier lookups, so you can use URLs of the form:

  • omnifocus:///folder/FOLDERNAME
  • omnifocus:///task/PROJECTNAME
  • omnifocus:///context/CONTEXTNAME

The name lookups support our usual “SmartMatch” completion matching, so if you have a project named “My Project” you’ll be able to use “omnifocus:///task/mp” to get to it (or whatever the first match for “mp” turns out to be).

9 Likes

That worked! Thanks (and sorry for the long-delayed response!)

Is there any news on how to specify a folder in a taskpaper/editorial template, please? (coping with a space in folder name)

2 Likes

You should be able to use URL encoding for the space (e.g. “My Project” becomes “My%20Project”), or you could just leave the space out (“MyProject”) since that’s likely to be the best SmartMatch hit (unless you actually do have a “MyProject” project as well).

Thanks for that, but how do I specify this in the taskpaper template to be picked up in the editorial script?

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

It’s not there yet: that’s coming in 2.16 TestFlight builds, after 2.15 ships.

Hi @kcase,

Thanks for all this awesome work on improving OmniFocus!

Two quick questions:

  1. Is there a way to use taskpaper via Maildrop (ie. by sending an email to username.secret@sync.omnigroup.com)?
  2. This is a Pro feature on iOS, correct?

Thanks again!

With today’s release of OmniFocus 2.15, the autosave=true parameter is now in the shipping app.


  1. Not yet, though we’ve been thinking about how to add that to MailDrop in the future.

  2. Automation URLs to add tasks don’t require Pro. We wanted them to be available to everyone.

1 Like

[EDIT : just saw this thread]

With today’s awesome update (2.15), we have gained more power with the autosave=true parameter. Thanks for that addition !
However, we can’t get enough of those new abilities and this one makes me want another one.
@kcase, what would you think of the ability to edit an existing action ?
I have a pretty useful Workflow that allows me to create an action from an existing one. The existing action would be :

Mail Ken RE: add a new URL action to modify an existing item

My workflow is launched from this action and I would like to do the following :

  1. (this is already done in the current version of my workflow) Create and save (thanks to the new autosave parameter) a new action with the Waiting For context set, and the following modified title :

Waiting for Ken RE: add a new URL action to modify an existing item

  1. Automatically mark the current action to done (this step is done manually in the meantime) like so :

omnifocus:///task/abc123/edit?completed=now&autosave=true

I think there would be a lot more of use cases which could benefit from this edit URL action.

Thanks !
Seb

2 Likes

@context(Context : nestedContext) does not work for me. Only non-nested context does. I work with the german version of OmniFocus. Could this be the reason? Thanks! Moritz

great idea!

OmniFocus 2.16 for iOS is now in TestFlight, with support for using specific folders or projects as targets for /paste URL actions. Enjoy!


Yes, I totally agree: right now, the iOS app only supports automating the “Create” part of the traditional set of database operations (unlike the Mac’s support for AppleScript, which can Create, Read, Update, and Delete). We want to flesh that out completely eventually, but it’s not at the top of our roadmap yet. (There’s only so much harm someone can do with Create, but we might want a stronger security model in place before allowing those other operations.)

The separator is actually a synced database setting that used to be controlled by a visible preference in OmniFocus 1. Is it possible you customized it in your database at some point?

Have you tried copying a task which has the nested context assigned to see what it looks like on your device? You can do this by editing the task, using Share > Copy, then pasting the text into a plain text context (such as a note in OmniFocus, or a text editor in another app).

1 Like

I am way behind on this feature. Are there any tutorials on using the new template system in iOS? Only reason I keep my air is because of applescript.

The first that comes to mind is David Spark’s OmniFocus field guide that he has updated to include a section on TaskPaper templates.

4 Likes

Thank you. I don’t know much about programming so the thread is intimidating. However I love David Sparks so I am sure it will be beneficial. Thanks again!