Editorial Workflows

New OmniFocus Project in Folder

public workflow

Install Workflow...

This workflow contains at least one Python script. Only use it if you trust the person who shared this with you, and if you know exactly what it does.

I understand, install the workflow!

This is a workflow for Editorial, a Markdown and plain text editor for iOS. To download it, you need to view this page on a device that has the app installed.

Description: This Workflow accepts TaskPaper text with «placeholder» tokens and prompts for you to enter final values, then creates a project in a folder in OmniFocus 2.14 for iOS using those tokens.

For example, given this input:

- «project_name» @parallel(false) @due(«due»)
- This task needs to be done at least 1 week before «project_name» is due @due(«due» -1w)
- This task needs to be done at least 2 days before «project_name» is due @due(«due» -2d)

You'll be prompted to enter values for «project_name» and «due». If you enter "Phonewave 1.2" and "next Thursday", it will create a new "Phonewave 1.2" project in OmniFocus that is due next Thursday, and has two tasks already filled with due dates of this Thursday and next Tuesday.

This is based on the original workflow shared by OmniGroup, modifications have been made to ask for the target folder and to place the project appropriately.

Shared by: Rosemary Orchard

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Selected Text ?
Entire Line(s)
Empty Selection Output
  • No Output
  • All Text
  • Closest Word
Folded Text
  • Include
  • Replace with:
Run Python Script ?
Source Code
#coding: utf-8
import workflow
import dialogs
import re

action_in = workflow.get_input()

# Find placeholders
known_placeholders = set()
placeholders = []
fields = []
for placeholder_match in re.finditer(u"«(.+?)»", action_in):
	placeholder = placeholder_match.group(1)
	if placeholder not in known_placeholders:
		fields.append({'type': 'text', 'title': placeholder, 'key': placeholder})

action_out = action_in

# Substitute the placeholders
if len(placeholders) == 0:
	if dialogs.alert(u"No template placeholders were found.", u"""
If your project text has placeholders (that look like «this»), this script will prompt for values you'd like to substitute for them.
""", u"Continue") != 1:

	values = dialogs.form_dialog(title='', fields=fields, sections=None)
	if values:
		for key in values:
			action_out = re.sub(u"«" + key + "»", values[key], action_out)

URL Escape ?
Set Variable ?
Variable Name
Request Text Input ?
Folder Name
Initial Text
  • Single Line
  • Multiple Lines
Keyboard Options:
URL Escape ?
Set Variable ?
Variable Name
Folder Name
Open URL ?
Open in
  • In-App Browser
  • Default App / Safari
omnifocus://x-callback-url/paste?target=/folder/Folder Name&content=encodedContent
  • Last-used Tab
  • New Tab
  • Tab with ID:
Unique identifier
Wait until Loaded
Reveal Browser Automatically