Help automation to add tasks to specific projects in Omnifocus

I asked this on a separate thread that was revived so I thought I’d stand a better chance of a reply if I created a new thread.

I’m trying to create an automation that will allow me to add tasks to specific projects in Omnifocus (and bypass the inbox).
I have several catch-all projects in Omnifocus (like “Work Follow up”, “Admin” etc) that I always use.
I am dreaming of a situation where I write the tasks out in Drafts (like a template) under a project name (“Admin”), press a button, and the task then appends under its corresponding project in Omnifocus. Each time should use the existing project in OF.

Is this doable? I’m really not a programmer. I’ve been playing around with Taskpaper but I think there’s a script that needs to be created to do this.

Any ideas? Many thanks!

Most OmniFocus actions are based on their URL schemes, which support a great number of parameters for things like specifying a project. Details in their documentation.

The default Task in OmniFocus example action uses the URL:

omnifocus://x-callback-url/add?name=[[title]]&note=[[body]]

(The [[title]] and [[body]] are Drafts’ template tags that fill-in values from the current draft when the action is run)

You could duplicate that action, and change the URL to include the “project” parameter. Per the docs, this URL in the action would send it to the project “My Project”:

omnifocus://x-callback-url/add?name=[[title]]&note=[[body]]&project={{My Project}}

Where you can edit “My Project” to be whatever project you want to target.

Thank you so much for your response and help.

Would [[body]] capture a list (ie multiple tasks for The same project) or just a single line?

Can I run the action with multiple URLs for multiple projects?

I’m a newb- but I’m trying to learn!
Thank you again