Watch the Video Tutorial

How Otto Works

You don’t have an employee on which you can hand off tedious tasks like renaming hundreds of files or resizing a folder full of images. Well, actually now you do have one. Otto will save time and he won’t make any mistakes.

automator-meet-otto

The Automator app creates documents. Each time you go File > New, it will create a new document, then ask you what type of automation you wish to create. This is what this looks like.

automator-new-document

  1. Library: These are the areas that Automator can automate.
  2. Actions: These are all the actions Automator can do.
  3. Types: These are the different types of automations.
  4. Workflow: This is where you stack actions so that they run sequentially.
  5. Description: This is where Automator describes the action you’ve targeted.
  6. Log or Variables: This area displays a log of your workflow after it has run. It’s also the variables area.

To create a workflow, drag one or more actions into the workflow pane. The order in which you stack them counts because one action feeds the next. If your workflow doesn’t work, there will be an error message in the Log pane at the bottom of the window.

Types of Automations

Workflows: These are the simplest types of automation. Simply drag actions into the workflow pane, then click the Run button.

Application: This creates a macOS application from your workflow. You double-click on its icon like any other app and your workflow will run.

Service: This makes your workflow accessible from a right-click menu in Finder.

Print Plugin: Workflows created from here are accessible from within the Print dialogue.

Folder Action: These workflows are attached to a folder so that it’s run when you add something to the folder.

Calendar Alarm: These are scheduled workflows. Create the workflow, then schedule it in Apple’s Calendar app. So, they can be recurring.

Image Capture Plugin: Workflows are applied to images from within the Image Capture application.

Dictation Command: This makes your automation workflows triggerable with speech commands.

If you discover that you've chosen the wrong type of automation, you can always change it after the fact by going File > Convert To..., then choose the type you want.

A Simple Workflow

Let’s rename a large number of files using a simple workflow. Launch Automator, then choose to create a new workflow. Save it into the provided 00-your-automator-files folder named Rename Finder Items.workflow.

automator-workflow-icon

All you need to do is drag all the provided files into the workflow pane for Automator to act only on these files. It will add its own Get Specified Items action.

automator-workflow-rename-finder-items

Do a search for rename. Drag the Rename Finder Items action into your workflow. Set it up as shown above. This means you’ll drag it in a few times. You can see that we’re going to make the file names lower case. We’ll replace all spaces and underscores with hyphens.

So, this

Text File 31.txt

will become this

text-file-31.txt.

Do you see how this could be useful for web design? All your web site pages and images should be named without spaces and all lower case. Now you don’t need to do this manually anymore. Otto can act on many files at once for you.

Save this workflow file into the 00-your-automator-files folder named Rename Finder Items.workflow.

A Finder Service

automator-finder-service-icon

The above workflow is all well and good, but it’s quite a bit of work to create such a workflow each time you want to rename files and folders. To this end, we’ll create a Finder Service.

Let’s create a Finder Service which we can envoke with a right-click in Finder. We’ll make it a workflow that we can have rename files and folders however we want.

automator-finder-service

Save this file as Rename Finder Items. You don’t choose the location where it’s saved. All Finder Services are stored in Home Directory > Library > Services. If you need to edit your service, you can find it there, then open to edit.

automator-finder-services-finder-menu

To envoke the action, simply right-click on files and/or folders in Finder. Go Services > Rename Finder Items. The beauty of this is that the action asks you how you want to rename the selected files. The action asks because you’ve checked Show this action when the workflow runs when you created the service.

A Folder Action

automator-folder-action-icon

You can create an Automator workflow, then attach it to a specific folder. When you add files to the folder, the action does its thing.

Folder Actions are stored here: /Users/*username*/Library/Workflows/Applications/

Let’s create an workflow which will resize images. The workflow is meant for really large image files which you want to make smaller to post online or send via e-mail.

automator-folder-action-resize-images

Note that this workflow is destructive. It’s going to resize the originals of any images you put in the folder. Point the action to a new folder on your Desktop. Copy the provided images into that folder, then watch the magic happen. All images copied into this folder will be resized to 1500 pixels wide. -1550px will be appended to the file names.

You can edit a Folder Action after the fact by right-clicking on the folder itself.

automator-edit-folder-action

On the left is a list of folders on your computer which have actions attached to them. On the right is a list of all the folder actions you’ve created.

A Calendar Action

automator-calendar-action-icon

You can create a workflow, then have it triggered by a calendar event. Let’s set up a backup schedule for a specific folder. This workflow will copy a folder from one place to another daily.

Calendar Actions are stored here: /Users/*username*/Library/Workflows/Applications/

automator-calendar-action

As you can see, the workflow copies the files from the original location to the folder called 03-backup-destination. Once you save the workflow, the Apple Calendar app launches. It allows you to enter the time and frequency of the backup action.

Formative Activity

A Simple Workflow

Create a simple workflow that will:

  1. Get text content of your clipboard.
  2. Convert the text to an audio file into our 00-your-automator-files folder with the voice of Alex.
  3. Add an action that will have the file open in the QuickTime app.

Save this workflow file into the 00-your-automator-files too. Name the workflow Text-to-Audio.workflow.

Copy the text below, then use it in the action.

If I die of Vanity, promise me, promise me. That if they bury me some place I don’t want to be. That you’ll dig me up and transport me. Unceremoniously away from the swollen city breeze, garbage bag trees. Whispers of disease, and acts of enormity. And lower me slowly, sadly, and properly. Get Ry Cooder to sing my eulogy. At the hundredth meridian.

Save the resulting audio file into your 00-your-automator-files folder named Hip.aiff.

A Finder Service

Create a Finder Service which will combine PDF files you select in Finder. Use the provided PDF files – all 100 of them – to combine into one file. Name it Combined.pdf. Put it in the 00-your-automator-files folder.

Note that after you’ve added an action to combine the PDF files in Finder, you’ll need an action to open that file. Once it’s opened, save it manually into your 00-your-automator-files folder named Combined.pdf.

automator-finder-service-context-menu

Take a screen shot of your context menu by using ⌘-Shift-4, then draw a marquee around the menu. The image will appear on your Desktop. Rename it Combine PDFs.png. Move it in the 00-your-automator-files folder too.

A Folder Action

Create a folder action which will apply Quartz effect to your photos. Use the images you have in your 02-images-to-1500px folder. Apply a Quartz effect of your choice on a copy of these images. So…

  1. Create a Folder Action workflow and give it the 05-quarz-effect folder to attach to.
  2. Add the required actions to your workflow add the effect.
  3. Save the workflow as the name of the effect too. So, make-images-sepia or something like this.
  4. In Finder (not in Automator), Copy the photos from the 02-images-to-1500px into the 05-quarz-effect folder.

I’ll know you’ve completed the task because there will be images in the folder with an effect on them.