Sending Tasks to Omnifocus from Dropbox and Simplenote

I never miss an opportunity to learn more about Applescript and extending my applications in ways the developers never considered. I also work in text files for all of my notes.

Background

At home I'm on my Mac with Notational Velocity and Omnifocus close at hand. However, at work, I use a windows machine with Resophnotes. Resophnotes is a wonderful Simplenote client that is as close as you can get to Notational Velocity on Windows.
On the ipad, I primarily use Simplenote but I also love some of the new text editor apps that are available.
Lucky me! I have a lot of options for taking notes when away from my Mac. However, I have limited options for creating tasks when I'm on Windows. The only real option I have had is to email myself a task and wait for my Mac to process it. That's fine, but I wanted something even more simple. That's where Applescript comes in.

Power of Applescript

Omnifocus provides some great integration with Applescript. In fact, the most powerful method available is the "parse tasks with transport text" command. This little gem allows you to add tasks to Omnifocus with natural language date processing and tag recognition for projects, contexts and start/finish dates. That's powerful!
I decided to create a Hazel script that watches my Dropbox notes folder for notes that begin with a "--" prefix which is similar to the notation used by the Omnifocus email processor. Once the note is identified, the title is used to create a task in Omnifocus. If the note is plaintext or markdown then the body of the note is added to the task as an Omnifocus note.

Dropbox Access

If the task note is not plain text, then the file is moved to my Dropbox public folder (it's actually a sub folder of my public folder to distinguish from other public files). A link that points to the file is added to the Omnifocus task as a note. The great thing here is that now I can access the original file from Omnifocus on my iPad. Click the link and iOS Safari launches and opens the file.

Adding a task from Notational Velocity

Task from Notational Velocity

Task added to Dropbox folder

 

Adding a task file through Dropbox

Powerpoint File in Dropbox

 

Powerpoint Task in OF

 

There's an additional benefit by having Simplenote sync with Dropbox. I can add tasks to Omnifocus from Resophnotes on Windows. No email required. I have not yet switched to the native Dropbox Simplenote syncing, which means I need to have a mac running with Notational Velocity open and syncing to a Dropbox folder.

At the end of the entire process the file is removed from my Dropbox notes folder so that my Notes are not cluttered with tasks. For good measure, there is also Growl notification when tasks are added.

Growl Notification

How it works

 

So the basic workflow goes something like this:

  1. Add a note with the title "--Check out the post on leancrew @Mac #saturday"
  2. The task is automatically added to Omnifocus back on my Mac with the context of "Mac" and a due date of saturday

 

Here's another workflow

  1. Rename a pdf to "--Read the new iOS developer guidelines @work >iOS development #friday #next monday"
  2. Add the file to my Dropbox notes folder
  3. A new task is added to Omnifocus in the iOS development project, with a context of "Mac. It has a start date of friday and a due date of next monday.
  4. The task also gets a note that is a url link to the pdf in my public dropbox notes folder.

 

If you are interested in using this workflow, just download this Applescript and hook it up to a Hazel script that monitors your Dropbox notes folder.

 

References

I've read a lot of other posts to create this script and workflow. Nothing is original. Here are a lot of the references I used.

 

http://www.leancrew.com/all-this/2008/07/jott-and-omnifocus/

http://web.appstorm.net/roundups/data-management-roundups/the-ultimate-dropbox-toolkit-guide/

http://alan.petitepomme.net/blog/2008/08/eaglefiler-to-omnifocus-apples.html

http://www.macstories.net/tutorials/how-to-add-tasks-to-omnifocus-or-things-using-dropbox-and-plaintext/

http://lists.apple.com/archives/applescript-users/2005/May/msg00302.html

http://www.cerquant.com/omnifocus_scripts

http://rainer.4950.net/wordpress/blog/2010/12/07/creating-omnifocus-tasks-in-entourage-take-4/

http://judismith.wordpress.com/2009/10/04/productivity-with-omnifocus-and-devonthink-pro-2/

http://simplicityisbliss.com/2010/12/16/top-5-omnifocus-applescripts/

http://forums.omnigroup.com/showthread.php?t=18447&highlight=parse+tasks+transport+text&page=2

http://forums.omnigroup.com/showthread.php?t=4208

http://forums.omnigroup.com/showthread.php?t=7769&highlight=script+file+link&page=3

http://web.mac.com/robinfrancistrew/Site/OmniFocus_%26_DEVONthink.html

http://rainer.4950.net/wordpress/blog/2009/09/10/creating-omnifocus-tasks-from-entourage-take-3/

http://discussions.apple.com/thread.jspa?messageID=9801376

http://brettterpstra.com/launchbar-actions-for-url-encoding-and-decoding/

Related Posts on Macdrifter.com

Hazel Workflow for Ripping DVD's

Emailing files to Dropbox