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

Yep, but it’s not a top level project, it’s in a folder.

I copied and pasted the same example project Grey posted into editorial and ran the workflow and I noticed another problem. The notes filed for the sub-task titled “sub projects” contains all of the notes from its siblings.

A new TestFlight build is now available (r259542):

OmniFocus 2.14 TestFlight — April 19, 2016

  • Partial Dates — Dates without years can now be combined with relative dates, e.g. “May 15 -3d”.
  • TaskPaper — Child tasks will no longer end up out of order when their notes aren’t indented.

This build fixes both of these issues.

2 Likes

I’ve been trying to figure out a good way to update @maddenwalker’s awesome OF to Fantastical workflow, and I was curious if there was a better option than regexing the TaskPaper-style output, since none of the 4 data options seem to have a clean JSON representation of the data…

I can almost work with option 3, which looks like this:

{
    "omnifocus:\/\/\/task\/n38LtMKjetz?name":"Name of the task",
    "project":"Name of the project",
    "due":"2016-04-19 22:00",
    "context":"Work"
}

… but the variable key for the task name makes it tricky.

I saw that, but If you do it in Taskpaper (through editorial) though, it works correctly

You bet! One of the pasteboard items is a clean URL representation, with all the task’s settings included as URL query parameters. The most reliable way I’ve found to get that representation is to loop through all the URLs and grab the last query. While you’re at it, you can hang onto the final URL as your link back to the original task.

Here’s a sample update to @maddenwalker’s Workflow:

This could be updated further to use the estimated time from OmniFocus rather than prompting for that estimate.

2 Likes

Thanks @kcase for updating this! I forgot to sign up for the next round of betas and missed the 2.14 release LOL. All signed up now. :)

Hi Ken,

Does the Date Parser recognise dates beyond due from Editorial?

e.g. @due(<> +30d) [Obviously with the correct double arrows]

Thanks so much, Ken!

I was able to customize this a bit for own use (I prefer setting dates and such on the Fantastical side of the fence): https://workflow.is/workflows/a698fa3c349349dab929ef8ea3e16ec8

Ignore me. Dates on tasks were exceeding the project end date.

Unfortunately I can’t get it to work. I installed the latest Testflight build of OF and the Editorial workflow. I tried the example project from the first post. OF opened, but no new project was created. I tried it several times, with different projects. When I route the URL to Editorial’s console, this is the result:

omnifocus://x-callback-url/uupaste?target=projects&content=%0A-%20Test%20Project%20%40parallel%28false%29%20%40due%28tomorrow%29%0A%20%20%20%20%20%20%20%20-%20This%20task%20needs%20to%20be%20done%20at%20least%201%20week%20before%20Test%20Project%20is%20due%20%40due%28tomorrow%20-1w%29%0A%20%20%20%20%20%20%20%20-%20This%20task%20needs%20to%20be%20done%20at%20least%202%20days%20before%20Test%20Project%20is%20due%20%40due%28tomorrow%20-2d%29%0A

Looks okay, doesn’t it? So what am I doing wrong?

That doesn’t look right. Can you check your workflow to see how the ‘uu’ is getting in there?

D’uh. First thing I did after downloading the workflow was inspect it. Looks like I touched the screen accidentally… It’s working now. I need a physical keyboard. :) Thanks a lot!

Edit: And the URL even plays nicely with Drafts. Great stuff!

maybe i’ve overlooked it, but is there any way to put contexts per task in taskpaper as labels and get it to work with the editorial workflow.
As an example: 1 day before a businesstrip i need to pick up suits from my dry cleaner. So the context for task “pick up suits” in subproject clothes in subproject packing in project businesstrip xyz will always be “dry cleaner”.

Would love to see this added. Sample drafts action to turn a shopping list into multiple Omnifocus tasks for those interested:

omnifocus://x-callback-url/add?name=[[title]]&parallel=true&flag=false&project=Shopping&context=errands&defer=saturday%209am&due=sunday%204pm&x-success={{drafts4://x-callback-url/runAction?text=[[line|2…]]&allowEmpty=NO&action=Shopping%20List}}&x-cancel={{drafts4://}}

Would be nice to add an auto complete flag to allow this to be 100% automated with drafts.

1 Like

I confirm that it works with top level project but not when the project is nested in one or more folders.

Create one folder named Test then inside a project named Test and run the following :
omnifocus://x-callback-url/add?name=Test%20action&parallel=true&project=Test%20:%20Test

The project won’t be set.

Have to tried omitting the path name and just calling the project itself?

&project=ProjectName instead of &project=FolderName:ProjectName

I can assign contexts by using the Editorial workflow. However, if I copy / paste the same taskpaper code from Editorial (or Drafts) into Omnifocus directly, my contexts will not be assigned (they vanish). Is it me or is @context(myassignedcontext) disappearing when doing a copy / paste of taskpaper text into Omnifocus?

It kinda works. But it has its limitations :

  • if you have two projects with the same name under different folders, which one will be set ?
  • when you copy an action from an existing project and analyze the url generated, you have something like this :
    &project=folder%20:%20projectName

What is generated is what we should be able to do : specify the full path of the project in my opinion.

FYI, I’ve posted implementation details for the URL Scheme and TaskPaper format over here:

https://discourse-test.omnigroup.com/t/implementation-details-for-omnifocus-2-14-automation/24179?u=kcase

Questions and feedback welcome!

3 Likes