Using Hazel for Mac and a little AppleScript, actions can be automatically created in OmniFocus for Mac (Pro) as files are added to specific folders.

Hazel can be configured to watch specific folders on your Mac and to perform actions based on the contents of these folders. For example, when a file named “BC Hydro Invoice.pdf” shows up in your Downloads folder, Hazel can automatically rename this file to something like “2016-01-07 – BC Hydro – Invoice” and then move it to a folder called “2016” within your “BC Hydro” folder. This automation provides a high level of convenience and ensures that your files are accurately and consistently named and filed.

In addition to moving and renaming files, Hazel allows you to automatically trigger AppleScript code. This makes it possible to automatically create OmniFocus actions as files are added to specific folders. The above example could be taken a step further. In addition to renaming and filing the invoice from BC Hydro, a “Pay: BC Hydro invoice” action could automatically be added to OmniFocus to ensure that the invoice is paid, and that the lights stay on.

Other Resources

  • MacSparky Post — David Sparks wrote a post called Create OmniFocus Tasks With AppleScript that provides detailed instruction for creating OmniFocus actions using Hazel. Copy and paste the script that David provides and then modify it to suit your needs.
  • Hazel Video Field Guide — David Sparks also has an in-depth Hazel Video Field Guide that teaches you everything you need to know about Hazel. You can watch 30 minutes free of charge and then purchase the full guide if you want to delve deeper.
  • Hazel Articles & Reviews — Noodlesoft, the developers of Hazel, have a page on their website that references a growing collection of Hazel-related articles and reviews.