9 Useful Automator Workflow to Improve Your Productivity in macOS

Automator Macos Automate Quit All Resize Rename Repetitive Task

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.

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.

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. Batch Rename Hundreds of Files

There are 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.

6. Word Count

Curiously, not many apps have a built-in word count, which is odd as with a lot of situations you have a limited amount of words, or worse still characters, that you can use for your text. You would think more apps would have this feature, but since they don’t, let’s add it with Automator.

Open Automator and choose to create a Service workflow.

Open Automator and create a Service workflow.

Add a “Run Applescript” action, leave the “Output replaces selected text” box unchecked, and type or cut and paste the following script into the action:

on run {input, parameters}
    set theWords to count words of (input as string)
    display dialog (“There are " & theWords & " words in this selection." as string)
end run

Save as “Word Counter MTE,” and the next time you want to count words in any app, select the words and go to the “Application -> Services” menu, and one of the selections will be “Word Counter MTE” (in supported apps).

Create a service to count words in any app.

Some apps don’t recognize the text is selected for various reasons, but many apps will. If they do, you will get something like the following output:

View word count for selected text.

7. Make Desktop NASA Image of the Day

This is a great one if you get easily bored with your desktop image. Using RSS feeds and Automator, you can make an application to seek out the RSS feed for NASA picture of the day and set the top one as your desktop image.

The desktop image settings you have will remain, so set the image to cycle through all the images in your new directory every thirty minutes for a background slideshow.

Do as you did just now and open Automator, but this time choose to create an Application workflow.

Create an Application workflow.

Add a “Get Specified URLs” action and give it the URL: https://www.nasa.gov/rss/dyn/image_of_the_day.rss

Add a Get Specified URLs action and give it the URL.

Next drag in a “Get Image URLs From Articles” action and select “linked from the articles” from the drop-down.

Drag in a Get Image URLs From Articles action.

Choose a “Download URLs” action and drag that to the workflow. Choose a new directory, like for example Pictures -> NasaPictures.

Choose a Download URLs action.

Add a “Set Desktop Picture” action.

Save it to the desktop and run it. The folder will fill with fresh NASA pictures and begin cycling through them as you work.

8. Convert Graphics by Dropping Images onto an Icon

This is a really neat one. This creates an icon you can drop files onto and convert them to jpeg, even resize them.

1. Create an Application workflow.

2. Drag in a “New Folder” action and type in the name CONVERTED FILES (type a space after the words) and a location for the folder to be created when the app is run from the drop-down.

Now click the variables button on the left-hand side next to actions, and you get some variables to drag in. Select “Date & Time” and drag “Current Time” to the space after CONVERTED FILES. Type another space after it, then drag “Today’s Date” after it.

Select Date & Time and drag Current Time.

3. Use the drop-down on Today’s Date and select anything without / characters in it. This will not be tolerated by the file system.

Use the dropdown on Today's Date.

4. Add a “Get Folder Contents” action and drag this under the last action. This prepares the file for processing.

Add a Get Folder Contents action.

5. Add a “Change Type of Images” action and select JPEG from the dropdown. You can at this point add conversion options, but for now we’ll skip that and save.

Add a Change Type of Images action.

6. Save the Application to your Applications folder, then locate it in the finder and drag it to the Dock.

Now when you run it by dragging any kind of file to it, a folder will be created on the desktop, and a JPEG version of the file will be saved to it.

Run it by dragging any kind of file to it.

9. Record a Voice Memo

1. Launch Automator. Click on Workflow and then on Choose.

automator-choose-template

2. Using the search field on the left of the window, add the following actions: “New Audio Capture”, “Start Capture”, and “Stop Capture”. You can simply search for the names of the actions you want and then click on them to add them to your workflow.

In the start and stop actions, you will see check boxes. Click them. They should read, “Wait For Capture To Complete” and “Close Movie After Stopping”. Configure the top of the window to read Service Receives No Input in Any Application and then save your application with a name that you will remember, such as Voice Reminders or Remotely Nagging Kenny. It is your choice depending on your needs.

automator-add-workflow-elements-with-search

3. Close and re-open Automator. Choose “Open existing workflow”, then navigate to and open your file. You should see the same elements in your workflow as before.

automator-workflow-with-captures

4. Click on “Workflow” and then on “Run”.

automator-run

5. When a recording window appears, begin speaking. When you are done, tap on the space bar to end and save the recording of the file. The file will be saved with the name Audio Recording.mov.

automator-recording-audio-file

Now that you can record whenever you want.

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.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

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.