Using Automator

Hazel rules can use Automator to process matched files if you choose the “Run Automator workflow” action. (Unlike AppleScript, JavaScript, and shell scripts, Automator cannot be used in a rule  condition , only in an action.) The file or folder that was matched is passed to the Automator workflow as input.

Using Automator to create actions enables you to extend Hazel’s built-in capabilities without having to write any code. Automator workflows can, for example, rotate or resize images, send files as attachments to email messages (see example below), make changes to your Contacts or Calendar data, or save text to an audio file—all things Hazel can’t do on its own.

To create an Automator workflow and use it in a Hazel rule:

The following example workflow (shown here as Workflow document type, rather than Service) sends an email message (with whatever address, subject, message, and account you fill in), with the processed file as an attachment:

SEE ALSO

Using AppleScript or JavaScript

Using Shell Scripts