How to Automate Repetitive macOS Tasks with Automator

Do you find yourself performing the same monotonous tasks over and over again? In this tutorial, I'll show you how to use automator to automate 5 of those frustrating, repetitive tasks that are taking up far too much of your time in macOS.

Also read: How to Use Automator in macOS

1. Convert PDF to plain text

PDFs are essentially images of text, but what if you need to separate text from image? Don't waste time and effort manually copy/pasting each and every paragraph into a separate text document! You can create an application that automatically extracts every line of text from a PDF, and then saves this text as a separate file.

1. Launch Automator, by opening your Mac's Finder, navigating to "Applications" and then selecting the Automator app.

2. We're creating an application, so select "Application -> Choose."

When you launch the Automator app, you'll have the option to create various document types, including workflows, applications and services.

3. You should now see the main Automator editor, where we'll build all of our applications. Make sure the “Actions” tab is selected.

4. In the “Library” column, select “PDFs.”

In Automator's left-hand menu, select the "PDFs" action.

5. Find “Extract PDF text,” and drag and drop this item into the editor. The “Extract…” action will now be added to the editor, ready for you to customize.

Drag and drop the PDF action into Automator's editor area.

6. You can now specify whether Automator should save the extracted text as a rich text document or as a plain text document.

7. Open the “Save output to” dropdown and choose where the resulting text file should be stored.

8. Specify whether the resulting text file should have the same name as the original PDF, or you can assign it a unique name using “Output file name: Custom Name.”

9. In the Automator toolbar, select “File -> Save…” and give your application a name.

That it's! Now, you can extract all the text from a PDF, simply by dropping that PDF onto the application you just created.

2. Create a “Quit All” switch

If you have a habit of leaving multiple applications running in the background, then this can have a noticeable impact on your Mac's performance.

While you could close every application manually, why not save yourself the time and effort, and create a dedicated “quit all” application?

1. Launch Automator, or select “File -> New” from the Automator toolbar.

2. Select “Application -> Choose.”

3. In the “Library” column, select “Utilities.”

4. Find the “Quit All Applications” item, and drag it onto the editor.

You can create a "quit all" application, in macOS' Automator.

5. Are there some applications that you want to exclude from your “quit all” switch? To make an application immune, click “Add” and then select that application from the list.

6. When you're ready to create your “quit all” application, select “File -> Save…” and give this application a name.

Now, the next time you want to “quit all,” simply run this application and it'll close all currently-running applications for you!

3. Rename hundreds of files

There's plenty of situations where you'll need to rename multiple files, but my least favorite is renaming a bunch of photos I've just downloaded to my Mac, following a big event such as a holiday, wedding, or birthday party.

In these situations you'll want to use a similar name for every file.

1. In the Automator toolbar, select “File -> New.”

2. Select “Application > Choose.”

3. In the “Library” column, select “Files & Folder.”

4. When launched, this application should ask which files you want to rename, so find “Ask for Finder items,” and drop it onto the editor section.

5. Since we want to rename files en masse, click the “Add Multiple Selection” checkbox.

6. In the left-hand menu, find “Rename Finder Items” and drop it onto the editor.

You can rename files en-masse, with this simple Automator app.

7. At this point a popup will warn that this action may change the original files, and you'll have the option to apply these changes to a copy of the original file. Since we're only changing the file's name, I'm not going to create a copy.

8. Next, select the "New Name" checkbox and let Automator know how it should rename your files. You can use whatever naming structure you prefer, but I want to add a sequential number to each file, so I'm selecting “Make sequential” followed by “Add number to: existing item name.”

9. When you're happy with the information you've entered, click “File -> Save...”

Now, whenever you launch this application it'll open a new Finder window where you can specify all the files that you want to rename.

Also read: Easily Download All Images from Web Pages in Safari with Automator

4. Rotate any image From Landscape to portrait

If you have a large number of photos, screenshots, PDFs or any other files that you want to rotate, then you can use Automator to rotate those files without having to open each file, rotate it manually, and then exit the file.

1. Either launch Automator, or select “File -> New” from the Automator toolbar.

2. Select “Application > Choose.”

3. In the “Library” column, select “Photos.”

4. Find “Rotate Images” and drop it onto the editor area.

5. At this point you'll see a popup warning that this action may change the original files. Since we're only changing the angle, I'm going to apply this change to the original file.

6. Tell Automator how it should rotate the file in question - left, right or 180 degrees.

7. You can now create this application, by selecting “File -> Save…”

Now, whenever you want to rotate a file, simply drag and drop that file onto your application. Note that unless you specified otherwise, the file will remain in its original location.

5. Text-to-audio: Turn any piece of text into narration

Sometimes, it's easier to listen rather than read. You can use Automator to create a service that converts text into audio. To give you the flexibility to convert any text into audio, I'm implementing this workflow as a service that you can access directly from macOS' context menu.

Automator can create services, that you can access directly from macOS' context menu.

1. In the Automator toolbar, select “File -> New.”

2. Select “Service -> Choose.”

3. In the “Library” column, select “Text.”

4. Select “Text to audio file,” and drag it onto the editor section.

5. Open the “System Voice” dropdown and choose your narrator. You can preview any system voice, by selecting it from the list and then clicking “Play.”

6. In “Save As,” enter the name that the generated audio file should use.

7. In the Automator toolbar, select “File -> Save...” and then assign this service a name, which will represent this service in the macOS context menu.

You can now use this service to convert any piece of text into an audio file:

  • Drag to highlight the text in question.
  • Control-click the highlighted text and select “Services…” followed by the name of the service that you just created.

Automator will now generate an audio file from this text.

Using this service, you can convert any word, sentence, paragraph or document into an audio file, complete with the system voice of your choice!

To play this file, give it a click and macOS will start playing the audio in your default media player.

Other than automator, you can also add custom options to the Services menu. You may also want to find out how to make application window "always on top" in macOS.

Jessica Thornsby

Jessica Thornsby is a technical writer based in Derbyshire, UK. When she isn’t obsessing over all things tech, she enjoys researching her family tree, and spending far too much time with her house rabbits.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox