Example Workflows: Desktop Mailers


Here are three easy-to-create workflows that will allow you quickly mail the items selected on your desktop. All three workflows are accessed from the Finder's contextual menu that can be displayed by clicking on selected items with either the Control key held down or by right-clicking your two-button mouse.


Workflow 01: Attach Selected Items to New Mail Message


This workflow contains a single action that will open a new mail message that includes the selected Finder items as attachments.

In a new Automator window, locate the Open Finder Items action by clicking on the Finder application group in the Library list on the left side of the window to reveal the available Finder actions in the adjacent Actions list. Drag the Open Finder Items list item from the Actions list ot the workflow area and release. The action view for this action will now appear in the workflow list.

This action will open any Finder items passed to it using the indicated application. Choose the Mail application from the list of applications in the popup menu in the action view.

Note that the text indicating the data types accepted by the action, is displayed as red in action input control. This indicates that the action is missing required input, in this case references to files and folders.

Normally, this action is preceded by another action that passes references to Finder items, such as Get Selected Finder Items, or Get Specified Finder Items. However, since this workflow will be saved as a Finder plug-in, it is not necessary to precede it with another action.

IMPORTANT: A workflow saved as a Finder plug-in will automatically have references to the currently selected Finder items passed to it when the workflow is triggered from the Finder's contextual menu.

The same rule also applies to workflows saved as Image Capture actions, Folder Actions, and PDF Print Services.

To save the workflow, choose Save as Plug-in... from the File menu in Automator. In the drop-down sheet attached to the document window, select Finder from the popup menu and title the saved workflow: Add Selection to New eMail

Close the workflow and switch to the Finder desktop. Select one or more items to add to a message and click on one of the selected items with the Control key held down. From the contextual menu, choose Automator > Add Selection to New eMail.

A new outgoing message will be created in Mail with the selected items added as attachements.


Workflow 02: Mail the Selected Items


Like the previous workflow, this workflow is triggered from the Finder's contextual menu. When executed, it will attach the selected Finder items to a new mail message, and prompt you to enter the subject, message, and recipients of the email. After you have entered the information, the message will be sent.

NOTE: This example requires the Create Mail Message action be installed on your system. If you haven't installed it, click here to download the installer before preceding.

In a new Automator window, locate the Create Mail Message action by clicking on the Mail application group in the Library list on the left side of the window to reveal the available Mail actions in the adjacent Actions list. Drag the Create Mail Message list item from the Actions list to the workflow area and release. The action view for this action will now appear in the workflow list.

This action will be used to send to create a new mail message, with the passed Finder items as attachments to the newly create outgoing message. It's action view contains controls for entering recipients, subject, and content. Do not enter any information at this time, instead you'll set the action to prompt you for the necessary information when the workflow is executed.

To set the action view to display at runtime, click the small disclosure triangle at the bottom left of the action view (labeled "Options") to expose the action options panel.

Select the Show Action When Run checkbox. Click the Options disclosure triangle again to close the action options panel.

Next, locate the Send Outgoing Messages action from the Mail actions list, and add it to the workflow by dragging the list item to the end of the workflow, after the Create Mail Message action.

To save the workflow, choose Save as Plug-in... from the File menu in Automator. In the drop-down sheet attached to the document window, select Finder from the popup menu and title the saved workflow: Mail the Selected Items

Close the workflow and switch to the Finder desktop. Select one or more items to add to a message and click on one of the selected items with the Control key held down. From the contextual menu, choose Automator > Mail the Selected Items.

The workflow will start and the action view from the Create Mail Message action will be presented. Enter the addresses, subject and message in the dialog and click the Continue button to send the message. The items selected in the Finder will be automatically added as attachments to the outgoing message.

TIP: Click the Address Book card icon in the action view to access your entire library of Address Book entries.


Workflow 03: Archive and Mail the Selected Items


This workflow is the same as the previous workflow except a zip archive is created using the selected Finder items, and the archive is included in the outgoing email.

In a new Automator window, locate the Create Archive action by clicking on the Finder application group in the Library list on the left side of the window to reveal the available Finder actions in the adjacent Actions list. Drag the Create Archive list item from the Actions list to the workflow area and release. The action view for this action will now appear in the workflow list.

This action will create a zip archive of the selected Finder items and then pass a reference to the archive to the next action. Name the archive whatever you like (be sure to add ".zip" to the end of its name) and choose a locatation for the archive. Also, select the checkbox labeled Ignore unreadable items.

As you did in the previous workflow, add the Create Mail Message and Send Outgoing Messages actions to the workflow and set the Create Mail Message action to display when the workflow is run.

Save this workflow as a Finder plug-in named Archive and Mail the Selected Items. It will now be available from the Finder contextual menu.