iOS Drafts > Omnifocus with Contexts and Projects

Dear Family,

I have something which may have come up before, so if it has, I apologise - I have just joined today and I’d be grateful for being pointed in the right direction.

In Drafts on iOS, I can write a list of tasks (separated by lines) and it will go straight to Omnifocus (not through Reminders or Workflow) and will add those items to the Inbox. That works really well but I’d like to enhance this a bit.

I would like to add something like this:

This is my task
project
context
defer

So over four lines, I have the lines 1) The task name, 2) the project, 3) the context and 4) the defer date.

I have a URL scheme created in drafts that is as follows:

omnifocus:///add?name=[[title]]&defer=[[body]]&x-success=drafts4://

If I add:

omnifocus:///add?name=[[title]]&defer=[[body]]&context=[[body]]&x-success=drafts4://

then when it goes to Omnifocus, it only processes the title and not the body but if I leave it as it is, it definitely works with adding in the defer date. I however want to add in the project, context, etc. I’m happy to use a delimeter | if I have to, but I have no idea how to achieve this.

I have even tried this:

omnifocus:///add?name=[[title]]&project=[[line|1]]&context=[[line|2]]&defer=[[line|3]]&x-success=drafts4://

but with no luck

How can I go about achieving this?

Any thoughts and help would be MEGA helpful!

Hey Amit! It looks like you were on the right track with the [[line|1]] aproach, but the lines are off by one! Drafts treats what they refer to as the title row as line 1. OmniFocus ignores parameters for those fields that do not loosely match an existing project or context, which is why you were seeing inconsistent results. The following should work…

For a note formatted like this:

action
project
context
defer date

…the following URL should do the trick in Drafts:

omnifocus:///add?name=[[line|1]]&project=[[line|2]]&context=[[line|3]]&defer=[[line|4]]&x-success=drafts4://

I hope that helps!

3 Likes

Thanks so much Steve - that helped and worked like an absolute charm! I appreciate the prompt help on this so much - it makes tracking new items on the go, much easier

Thanks again!

2 Likes