With Automator you can automate much of what you do with your computer. Create and print a family directory of family members in your Contacts. Find and add images from your favorite websites to iPhoto. Print your documents to your iPad. Instantly rename dozens of files in the Finder. Even perform scheduled backups of important information. There’s no limit to what you can do, and Automator can do in seconds and minutes what could take you hours to do by hand.
"Instant snapshot" workflow sample
Have you ever wanted to take a quick snapshot of yourself to add to an email, message, or chat? As an example of how easily you can use Automator to create your own automation tools, here’s a sample workflow you can build and install as a system-wide service for using your portable Mac’s or iMac’s built-in camera to instantly take and add a snapshot of you into your iPhoto library. ("System-wide service" means you'll be able to access it from an application's menu, under Services, as shown at the end of these steps.)
Follow these steps on your computer to make the same service for yourself:
The Automator icon in Launchpad
- Open Launchpad and type Automator in the search field. Click the icon of “Otto” the Automator robot. A new Automator workflow window will appear.
- Select Service from the new window’s drop-down template sheet (as shown above) as the type of workflow document to create, and then click Choose. The template sheet will recede to reveal a new workflow document, ready for editing:
You choose the type of Automator workflow document you want to create from the template picker sheet
Elements of the Automator workflow window
An Automator window (see the image above) contains:
- (1) A Library column on the left, sorted by application or category, containing a list of all of the Automator actions installed on your computer
- (2) An Action column in the middle displaying the available actions for the selected application or category
- (3) A search field for quickly locating actions to add to the workflow
- (4) An information box on the bottom-left to provide helpful information about a selected action
- (5) A workflow pane on the right side of the window, where you drag actions to build your “automation recipe"
- (6) The "Service receives" pop-up menu
Let’s continue creating the snapshot-taking workflow:
- Service workflows are often designed to work with files or text, selected in other applications, such as image files selected in the Finder. In this example workflow, the service will generate a new photo for you, so there’s no need to accept any other files as input for the workflow. Set the service workflow to ignore any existing selected items by choosing "no input" from the Service receives pop-up menu (6) at the top of the window (see the image above).
- Now that the input settings for the service workflow have been set, let’s construct the workflow by finding and adding actions from the Actions Library to the workflow area. We’ll begin by locating an Automator action for taking a camera snapshot. In the search field (1) enter the term snapshot and any Automator actions related to that search term will appear in the Actions list below the search field (see below).
- According to its description at the bottom left of the workfow window (see above), the Take Video Snapshot action, is perfect for automating the quick snapshot of a photo using the computer’s built-in camera. Drag the action title from the Actions list (2) into the workflow area (3).
- Release the cursor to finish adding the action to the workflow:
- When an action is added to the workflow area (see above), it displays a rectangular view containing controls for setting the values of any parameters it uses. In the view for the Take Video Snapshot action, there is a checkbox, titled Take picture automatically, for indicating whether you want to require the user to click a button to take the photo snapshot. Select the checkbox (1) to have the workflow take the picture automatically. All you’ll need to do is smile.
- Using the same search and add process you used for locating and adding the Take Video Snapshot action to the workflow, search for the term import, and locate and add the Import Files into iPhoto action to the end of the workflow:
- Finally, as a bit of cleanup, we’ll indicate we want to delete the original image file taken by the camera, after it has been imported into iPhoto, by selecting the Delete Source Images… checkbox (2) in the action view (see above).
That’s all there is to creating a simple workflow for taking a camera snapshot and adding it to iPhoto! Now you’re ready to save and install the workflow.
- To save and install the service workflow, choose File > Save…. In the naming sheet, enter Instant Snapshot as the name for the service, and click the Save button. The new service workflow will automatically be installed as part of the System-wide Services architecture, and be available from any application’s Services menu. You can now close the workflow window.
Dragging an action into the workflow area
Automator actions display their parameter controls in the action’s inline view
Notice that the two actions in the workflow (see above) are linked together (1), indicating that the results of the first action, the new photo file taken by the computer’s camera, will be passed to the second action as its input. This is generally how Automator workflows function, passing information and items between each step (action) in the workflow.
Using the service
To use your new service, center yourself in front of the computer, and select Instant Snapshot from the Services menu, which is available from within any application:
Your Mac will beep three times and then take a picture, which will be automatically added to your iPhoto library:
The new snapshot is added to iPhoto
Using Automator, you have now created a useful tool for making it easy to take and add a snapshot of yourself to your iPhoto library.