Most of us who work on our Macs every day have several tasks we perform repeatedly and which are both time consuming and tedious. Isn’t the whole point of using a computer that it’s supposed to do the boring stuff for you? Of course it is. And with a little preparation, you can make your Mac do exactly that as easily as dragging and dropping elements onto a window, using Automator.
What is Automator?
Automator is a tool included with OS X which allows you to build custom workflows to perform both simple and complex tasks, such as renaming files in a folder, combining multiple PDF documents, or converting movies from one format to another using QuickTime.
What is an Automator Workflow?
Workflows are often described as ‘recipes’ and with good reason. Like recipes for food, they take a defined list of inputs (the ingredients), perform a series of actions on them (the preparation and cooking) and then distribute the results. To create a recipe, all you need to do is tell Automator what ingredients it needs and where to get them, and then what to do at each stage. And, most of the time, it’s done by dragging and dropping from a list of available options.
Excellent Automator workflows
What are the benefits of Automator?
There are two key benefits to Automator — it removes the need to perform repetitive tasks manually and it allows you to create workflows by dragging and dropping, so you never need to write code (although you can make it even more powerful by triggering AppleScripts).
How to use Terminal on the Mac
How to fix a broken internet connection
Automator allows you to create eight different types of action. Workflow, the simplest type, is a document which is run from within the Automator app. More useful is Application, which allows you to create a standalone app onto which you can drop a file in order to trigger the action. Service creates a recipe which lives in the Services menu. Print plugins take a PDF version of a document being printed in the Print Dialog of any application and perform a workflow on it. Folder actions execute workflows on files placed in the folder to which they are attached, so, for example, you could use one to rename files as they are added to the folder. Calendar Alarms are triggered by an event created in the Calendar app, and Image Capture Plug-ins take an image from that application as an input and perform an action on them.
The final type of action is a recent addition, added in
OS X Yosemite, Dictation Commands. Using this action type you can associate any verbal command with an action or workflow, allowing you to ‘tell’ your Mac what to do. So, for example, you could create an action that printed the top most Microsoft Word document when you said the words ‘Print this.’ (Read:
How to use System Preferences on a Mac)
The type of action you create will dictate the next step, the input for the action. Automator tells you if an action must take a specific type of input, so, choosing Print Plug-in displays a message telling you that it takes as input a PDF of the document being printed. Other actions, such as Services, prompt you to choose the input.
When you’ve chosen a type of action you’ll be taken to Automator’s Library. This hosts all the Actions and variables available for you to add to your Automator workflow. Actions are categorised by type and, in some cases, by application. The categories are listed in the left most pane of the Library when the Actions tab is selected. When you click a category, the actions in that category are listed in the next pane. You then drag the action you want into the main window.
Actions are performed sequentially, in the order they are arranged in the main window, with the output from one step passed as an input to the next. So you need to break your workflow down carefully and make sure you put the steps in the right order. You can test workflows by stepping through them one stage at a time using the Step button on the toolbar. To test a complete action, use the Run button. In many cases you’ll need to add a step at the start of a workflow, Get Specified Finder Items, to test the workflow, but Automator will warn you of that when you click Run.
Workflows can be set up to run without any input at all from you once they’ve been triggered, and, if you want, to remain invisible as they run, or you can create a workflow which prompts you for input as it runs.
If that were all Automator was able to do, it would be pretty powerful, but there’s a great deal more to it. The Variables tab, for example, allows you to specify a variable from one step to be stored so it can passed to a step further down. An example would be to take text copied from a web page and pass it to an email message as the body of the email. Or you could take the URL from a web page and pass that, instead of or in addition to, the mail message, or a text document.
Automator can also run AppleScripts making it even more powerful. The fact that so many popular OS X apps support AppleScript means that you can use them in your workflows by writing, or downloading, a suitable script. An example would be to set up a folder on the desktop so that when you dropped a document onto it, it created a new note in Evernote. You write a short AppleScript to create the note and add it to a notebook, and then use Automator to create a workflow with that as the output.
Third Party Automator Actions
To save you even having to do that, however, some OS X developers, like Microsoft have created Automator actions of their own which are installed when you install the app. If, for example, you have the new version of Outlook on your Mac, you’ll see that there are lots of Outlook-specific actions available in the Mail category in the Automator Library. The same is true of Word and Excel.
Now you’ve read the theory, it’s time to get started creating a few workflows. Visit our
guide to creating workflows for some ideas.