You can use the Automator app that comes pre-installed on your MacBook to automate an almost endless array of everyday tasks – including those repetitive, monotonous and time-consuming tasks that everyone hates!
Simply boot up Automator, grab some items from its various menus and drop them into Automator’s built-in editor. You can then tweak, customise and combine these items to create exactly the workflow you had in mind. The possibilities are pretty much endless!
Despite all its potential, Automator is probably one of the most underused and under-appreciated Mac applications. So in this article I’m going to show you how to get started with Automator by creating 5 applications that’ll automate some of the seriously irritating and time-consuming tasks that your typical MacBook user spends way too much time on.
But before we get started, let’s take a quick look at how Automator works.
Using Automator 101
To launch Automator, navigate to your MacBook’s ‘Applications’ folder and double-click the Automator app. The first thing Automator does is ask what kind of program you want to create. In this tutorial I’m going to be concentrating on applications, so make sure you select ‘Applications’ from this window.
Once you’ve made your selection, you’ll be taken to the main Automator user interface, which is split into two halves:
- Menus. On the left-hand side, you’ll find a menu containing all the different Automator categories. Select a category and a new menu will appear listing the various items that you can incorporate into your workflow. To create a workflow, grab an item from this menu and drop it into the second part of the Automator user interface, which is…
- The editor. This appears on the right side of the Automator UI. Depending on what items you drag into the editor, you’ll be able to make different tweaks to your workflow, for example if you drag ‘Copy Finder Items’ into the editor, the next step is specifying where you want Automator to copy these Finder items to. Keep dragging items from the different menus and dropping them into the editor, until you’ve created your perfect workflow.
One of the most important things to note about Automator, is that there’s usually multiple ways of accomplishing the same goal. To give you the best overview of what Automator is capable of, I’m going to explore as many different techniques as possible throughout this article. Some of these techniques will be interchangeable, so if there’s something you like about a particular workflow, then you can always try incorporating it into other workflows. Automator is all about choice and experimentation!
1. Bulk rename your files
There’s many situations where you might want to rename multiple files at once, but one of the most common has to be when you’ve attached your digital camera to your computer after taking a bunch of photos – and realise just how many files you have to sort through!
If you’re anything like me, then you love taking photos but hate organising them. One of the most effective ways of quickly bringing order to a large number of photos, is to use a consistent naming convention, for example you might name your holiday snaps Tenerife, 2016-1, Tenerife, 2016-2, and so on. However, working your way through potentially hundreds of photos and renaming them one by one definitely isn’t my idea of fun!
So why not let Automator do the hard work for you? Let’s use Automator to create an app that can rename a large number of files in one fell swoop.
Create a new Automator app, and then complete the following steps:
- Make sure the ‘Actions’ button is selected (towards the upper-right of the Automator window).
- Select ‘Files and Folders’ from the left-hand menu.
- Drag ‘Ask Finder for Items’ into the editor. Whenever you include ‘Ask Finder for Items’ in your workflow, double-clicking the finished Automator app will launch a Finder window where you can select the files you want to edit.
- Since the whole point of this workflow is to rename multiple files at once, make sure the ‘Add Multiple Selection’ checkbox is selected.
- Find ‘Rename Finder Items’ in the side-menu and drag it into the editor.
- At this point you’ll see a popup warning you that this action may change the original files. Automator will then prompt you to preserve the original files by adding a ‘Copy Finder items’ to your workflow. This action will create a copy of each file, and then apply any subsequent edits to the copy only. Since our app is only going to rename our files, I’m not going to bother preserving the originals, so select ‘Don’t Add.’
- You can now set some rules about how Automator should rename your files. Let’s imagine I really am creating an Automator app to rename my holiday photos – in this instance, I’m going to select ‘Make sequential’ from the dropdown menu and then specify how I want each number to be separated from the filename (you can choose from space, forward slash, dash, underscore, or none).
- Next, I’m going to select the ‘New Name’ checkbox and let Automator know how it should rename my photos – continuing with my holiday example, I’m going to go with‘Tenerife, 2016.’
And that’s it – your workflow is now complete! Save it by selecting ‘File > Save,’ from the menu bar, give your app a descriptive name, and then click ‘Save.’
To take your Automator app for a spin, simply navigate to wherever you saved it and then double-click it. This will launch a Finder window where you can select all the files you want to rename. Your newly-created app will then automatically rename all these files for you in one fell swoop.
2. Easily Resize Multiple Images
While we’re on the subject of photos, another common tweak you may want to make is resizing your photos. If you have a large number of images you want to resize, or you find yourself regularly resizing photos, then it may make sense to create an Automator app that can make resizing photos easy.
In our previous app, we selected photos using the Finder (by adding ‘Ask Finder for Items’ to our workflow). Let’s try something different this time around, and select files by dragging them onto our finished application. For most Automator applications you create, these two selection methods are interchangeable, so use whichever method works the best for you.
Create a new Automator app, and let’s get started!
- Select ‘Files and Folders’ from the left-hand menu.
- This time around I’m going to create a workflow that preserves the original files – because resizing a photo is a much more drastic change than simply renaming it. I’m going to grab the ‘New Folder’ item and add it to this workflow, so Automator will know to create a new folder containing copies of the original files.
- Specify the name of the output folder and where it should be created, using the ‘Name’ field and ‘Where’ dropdown, respectively.
- Drag the ‘Get Folder Contents’ item into the editor.
- Select ‘Photos’ from the left-hand menu.
- Grab ‘Scale Images’ and drag it into the editor.
- Automator will once again warn you that this action could change the original files. However since we’ve already added a ‘New Folder’ item to our workflow, our app will automatically create a copy of each image and store that copy in the output folder. This means we don’t need to worry about overriding the original image, so select the ‘Don’t Add’ button.
- After dropping ‘Scale Images’ into your workflow, you can specify exactly how Automator should resize your images.
Save your workflow and test your finished application by dragging the image(s) you want to resize, onto your application. Your app will generate a new folder in the location you specified – open this folder and you’ll find resized versions of all your images.
3. Rotate multiple images
When you’re rushing to capture an image, it’s inevitable that you’re going to tilt the camera at whichever angle delivers the best shot. However, when it comes to sorting through your snaps, this can result in a bunch of photos that are orientated at the wrong angle.
While technically you could open and rotate each image in turn, that’s going to take some time (plus it’s probably going to be really boring) so why not create an Automator app that rotates your images for you?
- As always, create a new application and make sure the ‘Actions’ button is selected in the left-hand menu.
- Select ‘Files and Folder.’
- This time around, I’m going to create a copy of the original images, and then rotate these copies. To create a copy of each selected file, drag ‘Copy Finder Items’ into the editor window, and then specify where you want Automator to store these copies.
- Select ‘Photos’ from the ‘Actions’ menu.
- Drag the ‘Rotate Images’ item into the editor.
- Tell Automator how it should rotate your images – whether that’s left, right or 180 degrees. If you know you’re not particularly consistent about how you orientate your camera, then you may want to create multiple ‘Rotate Image’ applications for each possible angle.
And that’s it! Save your workflow, then drag and drop the image (or images) you want to rotate onto your newly-created application. Your application will create a rotated copy of each image in the location you specified.
4. Quit All Applications
Do you ever have so many apps running, that you completely lose track of what’s even open? It’s easy to leave apps running in the background, but it’s also bad news for your laptop’s battery, memory and overall performance.
If this sounds familiar, then it’s time to close some apps! But manually closing each and every app that’s running on your MacBook can be a time-consuming task. Wouldn’t it be nice if you could just quit all your applications in one fell swoop? Once again it’s Automator to the rescue!
To create a ‘Quit All’ application, create a new Automator app and then:
- Select ‘Utilities’ item from the left-hand menu.
- Drag ‘Quit All Applications’ into the editor.
- Depending on what applications Automator is quitting, you may lose some unsaved work. To make sure this doesn’t happen, you may want to select ‘Ask to save changes’ at this point.
- If there’s certain applications you don’t want Automator to close, you can create an “exclude” list. Even when you run your ‘Quit All’ app, the applications on this list won’t be affected. To create this list, give the ‘Add…’ button a click and then select the application(s) you want to exclude.
Save your application. If you plan on running this application on a regular basis, you may want to place it in your Dock so it’s always within easy reach.
5. Extract text from a PDF
There’s several reasons why you might need to extract text from a PDF – maybe you like the PDF’s content but are finding its layout distracting (or just plain painful to look at!) or perhaps you want to quickly share the text with a friend.
If you’ve ever tried to copy/paste blocks of text from a PDF into a text document, then you’ll appreciate how fiddly, frustrating and downright time-consuming this process can be.
In this section, I’m going to show you how to create an Automator app that pulls every last piece of text out of a PDF and deposits it in a text document for you.
Create a new application and then complete the following steps:
- Select ‘PDFs’ from the left-hand menu.
- Drag ‘Extract PDF text’ into the editor.
- Specify whether Automator should save the extracted text as a plain text or rich text document, and then use the dropdown menu to select where Automator should save this file.
- Decide whether the generated file should have the same name as the original PDF, or a custom name.
Save your application, then test it out by grabbing a PDF and dropping it onto your application. A new text document should appear in the location you specified, containing all of the PDF’s text content.
How To Speed Up Your Mac Easily With CleanMyMac 3There is no better tool for cleaning your hard drive from junk than CleanMyMac 3. While some speed issues on the Mac simply cannot be resolved but using an app, many that can are covered in this comprehensive cleaning utility.
But that's not all CleanMyMac 3 can be also clean up after uninstalling app and can remove temporary files, plugins, redundant files and offers better management of start up items and much more. It’s a utility that should have been built into macOS from the beginning.