Please join me at my new location

Tuesday, April 3, 2012

OmniFocus Mail Rule Now Works with Attachments

OmniFocus comes with a rule that can take a specially formatted email message and transform it into an action. I use this feature running on a Mac Mini to allow me to add actions to OmniFocus from my Windows PC at work.

One things that has always bothered me about it is that it doesn’t do anything with attachments. If you create one of these specially formatted messages and attach a file, you would expect that the attachment would be added to the newly minted action. It doesn’t. I’m sure there are good reasons for it. I can’t claim to know them but suffice it to say I want this functionality , dammit. So I did what any self-respecting geek would do: I rolled up my sleeves and started hacking.

In the end I managed to modify the mail rule that comes bundled with OmniFocus to attach all mail attachments to newly created actions. You can download the modified MailAction.applescript and try it out for yourself.

With this script installed, any mail messages that OmniFocus would normally pick up will also have their attachments added to the OmniFocus action that is created.


Installing this modified mail rule requires a little bit of hacking on your part.

  1. Locate the bundle in your /Applications folder.
  2. Right click on the bundle and select Show Package Contents
  3. Navigate from the root of the bundle into Contents/Resources
  4. Locate the file called MailAction.applescript and rename it to OldMailAction.applscript1
  5. Copy the modified MailAction.applescript into the Contents/Resources folder.

If you already have the mail rule set up through OmniFocus the next time the rule gets run the new script will be used.


I’d like to thank The OmniGroup for creating such an awesome product, for creating something that’s even remotely hackable, and lastly, for giving me permission to share this with you.

  1. The actual name doesn’t matter here. What’s important is that a backup copy of the file MailAction.applescript is created. In the event that something goes wrong you can just restore this file by renaming it and you’ll be back up and running. ↩