I, like many other poor souls on this forum, am confined to using a Windows machine at work. However, while I’m still holding out faint hope for a web API in the future, I’ll spare everyone the feature request and offer instead a temporary solution for those who would like to batch import tasks from Windows into OmniFocus.
What’s Required
- Windows OS
- Dropbox
- Editorial app for iOS
- Workflow app for iOS (optional)
- Allows for quick launch of syncing routine on iOS
- OmniFocus iOS 2.16 or later (workflow relies on the newly expanded /paste URL)
Setup
- Get this workflow for Editorial : http://www.editorial-workflows.com/workflow/5266626807070720/yg3FZt-PbuY
- If you’re using the Workflow app, get this also: Shortcuts
- Set up Editorial app to sync via Dropbox.
- Create a blank taskpaper file in Editorial (e.g. “todo.taskpaper”) and save it to the Dropbox folder.
- If you’re using the Workflow app, open up the custom workflow listed above, and edit the two “Text” fields to point to the name of the Editorial workflow (named “OF Multi-Target Sync” by default) and the blank taskpaper file (“todo.taskpaper” by default).
How to Use
- Open up the blank taskpaper file from Windows in a plain text editor (e.g., Notepad or Notepad++)
- Enter your list of tasks using the format described under the “TaskPaper Format” heading in @kcase’s thread Implementation Details for OmniFocus 2.14 Automation with one significant exception:
- Using the custom Editorial script downloaded above, you can separate tasks into different target groups using the prefix ++, for example:
++(Name of an existing project in your database)
- Task 1 @due(tomorrow)
Note for Task 1
- Subtask 1.1
- Subtask 1.2- Task 2
++(Name of another existing project in your database)
-Task 3
Also, if the first line of your task group ends with a colon (:), the Editorial script will identify your task group as belonging to a project and will treat the name after the ++ prefix as a Folder:
++(Name of an existing folder in your database)
Project 1:
- Task 1
- Task 2
Finally, if no target name is specified (or if no matching target name is found in the database), the tasks will be added to your inbox:
++
- Inbox task 1
- Inbox task 2
Note that OmniFocus performs all matching on the backend using their “SmartSync” method. From the Implementation post linked above:
@kcase: 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).
- Finally: After you’ve filled out the blank taskpaper file with your tasks from the day, simply save the file in your text editor, and then do one of two things:
- Open up the Workflow app and launch the sync routine from there
- Open up the Editorial app, navigate to the todo.taskpaper file, and then run the Editorial workflow from inside the Editorial app.
How This Works
The short of this is that the Workflow script points to the Editorial script, which syncs with Dropbox (where the taskpaper file is saved), then splits up the taskpaper text into different groups, as separated by the ++ header. Then each group is imported separately into OmniFocus using the new /paste URL method. At the end of the Editorial script, it will clear your taskpaper file to make it ready for the next entry (this behavior can be tweaked, as discussed below).
Custom Tweaks
As may be expected when trying to splice together so many tools, there may occasionally be hiccups along the way, due to idiosyncracies with the way each of the apps communicate with each other.
-
If you don’t want the script to automatically clear your taskpaper file at the end of running, simply remove the step at the end of the Editorial workflow called “Replace Selected Text”
-
I found that it was necessary to pause the Editorial app momentarily in between adding each task group. Default pause length is a few seconds, but you may want to adjust this on your device if you are finding that Editorial completes the script before all tasks are imported into OmniFocus. This parameter can be tweaked by changing the value in the “User Input: Pause Duration” step of the Editorial workflow.
-
I also experienced issues with Dropbox not always syncing with Editorial again at the end of the workflow. I found that restarting Dropbox each time works to get over this hump (this I do with a one-click shortcut on my Windows taskbar… If you have read this far and are curious to know the process for this, just PM me, and I will be happy to assist).
That’s it! Convoluted, maybe… but it works (most of the time)! Hope this helps someone else out there. If anyone has any thoughts for improving this workflow, I’m all ears!
Here’s to hoping this process becomes obsolete in the future with newer, shinier API tools :)