Excellent Automator workflows

Our Automator tutorials will show you how to create Automator actions and workflows on your Mac.

By

  • AUTOMATOR Mac What is Automator
  • Resize images Batch resize photos
  • Get the party started Triggered iTunes playlist
  • Combine PDFs Combine multiple PDFs
  • PDF contact sheet Create a PDF contact sheet
  • Create Outlook message Attach any file to an email
  • Eject drive Eject and delete SD card
  • Audio file from text Save text as audio
  • Bank statements to Evernote Bank statements to Evernote
  • Print to Evernote Print anything to Evernote
  • Filter files in Downloads folder Filter files
  • More stories
Next Prev

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.

In this tutorial we will show you how to create some Automator Actions and Workflows that will effectively get your Mac doing your work for you so you can relax and go and make a cup of coffee.

To find out more about Automator, read our What is Automator article.

Next »

Next Prev AUTOMATOR Mac

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.

In this tutorial we will show you how to create some Automator Actions and Workflows that will effectively get your Mac doing your work for you so you can relax and go and make a cup of coffee.

To find out more about Automator, read our What is Automator article.

 

Step 2 of 11: Batch resize photos

We'll start with a straightforward action, one which will take images from the Finder and resize them when you drop them onto the application icon on the desktop.

Launch Automator, either from the Applications menu, by typing its name in Spotlight, or by using the search bar in Launchpad.

When the template chooser is displayed, select Application then click Choose.

In the Library, click Files and Folders and drag Copy Finder Items into the main window.

Click on the dropdown menu next to 'To', select Other and create a new Folder in Pictures called 'Resized.'

Add a Rename Finder Items action to the workflow, choose Add Text from the dropdown and type '–resized' into the box.

Click on Photos in the Library, and drag Scale Images into the workflow.

Choose Don't Add from the warning dialog, since we already have an action to copy the files in the workflow.

Type the width of the resized image into the box if you want to resize to a specific width, or choose Percentage from the dropdown menu and type in the size of the new image relative to the old one.

Save the workflow to the desktop as an application with a  descriptive name.

Now, whenever you drop an image onto the application, it will be copied, resized and the copy placed in the Resized folder.

 

Step 3 of 11: Triggered iTunes playlist

If you're anything like us, you're so busy working that you barely notice when the end of the week arrives and it's time to pack up and go home, or head to the pub. So here's something to help remind you. It's a workflow that plays an iTunes playlist of your choice at a time you choose.

Create a new Automator workflow and choose Calendar Alarm as the type.

Go to the Music category in the Library and drag Get Specified iTunes items into the main window.

Click Add, and from the window that opens, navigate to the playlist you want to start playing automatically.

When you've selected that, drag Play iTunes Playlist into the workflow.

Save the workflow and give it a name.

Calendar will now open, with a new Automator calendar created and your workflow set as an event, with the current date and time.

Double-click it and set the date and time to Friday at 6pm, or whenever you like.

Click Repeat, and select Every Week.

You'll now have a musical reminder at the end of every week that, if you've chosen the playlist carefully, will put you in the mood for the weekend.

 

Step 4 of 11: Combine multiple PDFs

If you have downloaded multiple PDFs, say banks statements or utility bills, there may be occasions when you want to combine them into one document. Fortunately, it's straightforward to do in Automator.

Create a new action with the template Workflow.

Drag Get Specified Finder Items into the workflow window.

From PDFs in the Library, drag Combine PDF Pages to the next step in the workflow.

Leave Appending Pages selected.

We're going to drop the combined PDF on the desktop, to make it easy to find, though you can put it anywhere you like. First, though, we need to rename it – the action produces a nonsense name by default.

Drag Rename Finder Items from Files and Folders under Combine PDF Pages.

Select Make Sequential and click New Name, then type in a name. Leave everything else at its default.

Now grab Move Finder Items and drop it at the bottom of the workflow.

Choose where you want to put the combined PDF.

To test the workflow, drag multiple PDFs onto the box under Get Specified Finder Items and press Run.

If you want to use the workflow more than once, choose Application instead of Workflow from the template chooser and leave out Get Specified Finder Items at the start, then save the application to the Desktop.

 

Step 5 of 11: Create a PDF contact sheet

This workflow creates an application that takes multiple images as its input and creates a contact sheet in PDF format.

Open a new Automator workflow and choose Application from the template chooser.

Click on the toolbar and give the workflow a name, such as Contact Sheets, and move it to the Desktop.

Click on PDFs in the Library and drag New PDF Contact Sheet into the main window.

Opposite 'Where:', click the dropdown menu, choose Other, navigate to your Pictures folder.

Click New Folder and create a new folder called Contact sheets.

Set the paper size to A4, and the columns to whatever you want.

Now click on Files and Folders and drag Rename Finder Items below the New PDF Contact Sheet action.

You can choose how you want to name your contact sheet yourself, the important point is to ensure that each time you run the application, the PDF created has a different name, otherwise it will overwrite the previous one.

We've appended the date and time to the beginning of the file name, to make sure it has a unique name.

To test the application, drag Get Specified Finder Items to the top of the workflow and drag some photos from your Pictures folder onto the empty box in that action.

Click Run and watch as your PDF contact sheet is created.

 

Step 6 of 11: Attach any file to an email

If you work in an office where Outlook is the default email client, or if you just prefer using it to Mail, this workflow provides an easy way to grab any file and create a new message with the file as an attachment.

It's a Service, so you right-click on the file in the Finder and select the workflow from the Services menu.

Create a new workflow and select Service from the template chooser.

Save it and give it a name that will make sense when you see it in the Services menu.

Go to Mail in the Library and choose Create New Outlook Mail Message (you'll only see this as an option if you have Outlook installed).

You'll need to select an email account from which to send the message, but you can leave the rest of the form blank if you want.

If you do, you'll be able to fill in the message details when the workflow runs.

Now drag Add Attachments to Outlook Messages as the second step in the workflow and save it.

Right-click on any file in the Finder, navigate to Services and you'll see the Service you just created.

Select it and a new Outlook message, with the file as an attachment, will open.

 

Step 7 of 11: Eject and delete SD card

In Yosemite, you can use Dictation commands to trigger Automator workflows.

First, open System Preferences and go to the Accessibility Pane.

Scroll down to Dictation, select it and click on Dictation Commands.

Tick the box marked Enable advanced commands.

Go to the Dictation & Speech pane and, in the Dictation tab, check Use Enhanced Dictation, this downloads a large file to your Mac so you can use Dictation without hooking into Apple's servers.

Now insert the SD card you want to eject into your card reader.

Create a new Automator workflow with Dictation Command as the document type.

Type the command you want to speak into the text box at the top of the window and tick the box beneath.

Now go to Files and Folders in the Library and drag Get Specified Finder Items into the workflow.

Click Add and navigate to your SD card in the Finder.

Drag Eject Disk from the Files and Folders category onto the main window as the second step in the workflow.

Save the workflow and give it a name.

To test it, double-click the Fn key to initiate Dictation and then speak the command you created.

The SD card will be ejected and you can pull it from its slot.

To eject other cards, USB sticks or external hard drives, you'll need to create separate workflows for each, with different spoken commands.

 

Step 8 of 11: Save text as audio

The Services menu is a treasure trove of cool features and you can create your own and add them using Automator.

Here, we'll create a Service which turns text you select in any document into an audio file, with your choice of installed OS X voices reading the text.

Create a new workflow with the type Service.

In the Library, click on Music and drag Text to Audio File onto the workflow window.

Click on the menu next to System Voice and choose a voice for the file.

Click Play to hear what the voice sounds like.

Once you've chosen a voice, choose a name for the saved file and type it into the box next to 'Save as:'

You can leave Desktop selected in the Where field, but we've created a new folder in the Music folder in our user folder and called it Audio from Text.

Now, give the Service a name in the toolbar – the name you choose will be the name that appears in the Services menu.

Save the action.

Add a Rename Finder Items step and add the date and time so that each audio file created has a unique name.

When you select text in any application, your new action should show up in the Services menu.

 

Step 9 of 11: Bank statements to Evernote

Downloading PDF bank statements is useful as far as it goes, but even more useful is the ability to automatically import the downloaded PDF to an Evernote notebook, tag it, and put the original in the trash. That's what this workflow does.

Create a new Automator workflow with the type Folder Actions and choose your Downloads folder from the dropdown menu.

Drag Filter Finder Items from the Library to the workflow window and set the parameters so that they identify the statements you want to import to Evernote, and only those.

In our example, we've said that the file name must include the word 'statement' and Kind must be a PDF. But you should change those to reflect the way your bank names statements when you download them, by, for example putting the name of your bank in place of 'statement.'

Now grab the Run AppleScript action from the Utilities category in the Library and drag it onto the workflow.

Copy and paste the following script between 'on run' and 'end run':

    repeat with this_item in the input
        set the item_info to info for this_item
        tell application id "com.evernote.evernote"
            activate
            create note from file this_item notebook {"Notebook Name"} tags {"tag 1", "tag 2", "tag 3"}
        end tell
    end repeat
    return input

Change 'Notebook Name' to the name of the Evernote notebook you want to import the note to, and 'tag1', 'tag 2' etc to the tags you want to attach to it.

Finally, from Files and Folders, drag Move Finder Items to Trash to the bottom of the workflow.

 

Step 10 of 11: Print anything to Evernote

This workflow started out as a way to send Mail messages containing receipts in the body of the email, such as those from the App Store, to Evernote for filing.

In fact, it can be used to 'print' any document to a specific Evernote notebook, complete with tags, if you choose.

Create a new workflow and choose Print Plug-in as the type. Save it and give it a name.

Select Move Finder items from the Files and Folders category and choose a folder, preferably one you create specifically for the purpose, to print to.

Now grab Run AppleScript from the Utilities category and use the same script as in Workflow 8, above.

Change the name of the Notebook if you want to file in a different Notebook, and if you intend to use it for lots of different files, delete the tags parameters.

Finally, add a step to Move Finder Items to Trash, so the folder doesn't fill up with files you don't need.

To use the workflow, select Print from the File menu (or press Cmd-P) in any app, click the PDF menu at the bottom of the window and select the name of the workflow.

The document will now be sent to Evernote and the file created in the process sent to the Trash.

 

Step 11 of 11: Filter files

If you download lots of disk images, PDFs, or other files and find them cluttering up your Downloads folder, Automator provides a simple way to move them and file them elsewhere.

This workflow uses the Folder Action template; whenever a file which matches the conditions specified in the workflow is added to the folder, the workflow runs.

In this case, we're going to move disk images and PDFs to their own folders where we can deal with them later.

Create a new workflow and select Folder Action from the template chooser.

Save it and give it a name.

In the dropdown menu at the top of the main window, select Other and choose your Downloads folder.

Go to Files and Folders in the Library and drag Filter Finder Items into the main window.

Configure the action so that it reads 'If any of the following are true File extension is dmg.'

Drag Move Finder Items underneath it and in the menu, select Other, navigate to your Documents folder, and create a news folder called Disk Images, then Choose it. 

Disk Images which land in Downloads will now be moved to that folder.

You can add steps for other file types. Just add a Get Specified Finder Item and point it at the Downloads folder, then repeat those three actions for every file type you want to move, specifying the file type and the destination folder each time.

Surface Pro (2017) vs Surface Pro 4

Surface Pro (2017) vs Surface Pro 4

20 groundbreaking 3D animation techniques

20 groundbreaking 3D animation techniques

How to mine Bitcoin on Mac

How to mine Bitcoin on Mac