Automator Actions
Automator lets people automate time consuming and repetitive tasks by constructing workflows. A workflow consists of one or more actions, each of which performs a single, specialized task in the system or an app—such as opening a file, resizing an image, or opening a webpage. When a workflow runs, its actions execute sequentially, working together toward a common goal. For example, a workflow might include several actions that work together to download images from a webpage, resize them, and import them into Photos.
TIP: download a set of watermark images in red and blue: DRAFT, CONFIDENTIAL, EYES ONLY, and FINAL 1 The Automator workflow document. 2 The workflow input banner with controls set to accept PDF files selected in the Finder application. Now add download URLs to the bottom of the workflow and set a location you want all downloads to appear. Once done, open the webpage you want to download images from in Safari and run this workflow in this Automator app on Mac. The download will start, and it is done. Automator Loop Utility. The Automator Loop Utility will convert workflow files to workflow applets that repeat their workflow at indicated intervals. Simply drag workflow files onto the droplet and choose the loop duration and location for the new applets. Download the application. Version: 1.5. Mac OS X 10.4, 10.5.
Within a workflow, information can flow from one action to the next like an assembly line. Most actions accept information as input, and then pass information as output (result) to the next action in the workflow. Actions also often include settings, which the user can adjust to refine the action’s behavior.
The system includes actions for performing tasks in most Apple apps, including Mail, iTunes, Photos, and Safari. Your app can extend the capabilities of Automator by providing actions of its own.
Consider offering at least a basic set of automator actions. Each additional action extends the power of Automator by letting people build a wider range of useful workflows. By providing actions, you enable users to streamline their processes and integrate your app with the system and other apps in unique ways.
Create narrowly-defined actions. Keeping actions simple ensures they can be combined in a variety of useful ways.
Make actions configurable. You can’t always predict how people want to use your app. By letting people configure actions to meet their specific needs, you magnify the usefulness of your actions.
Consider letting people configure settings at runtime. Even well-defined workflows often require flexibility. For example, a user might not want a workflow that resizes images to use the same output folder every time the workflow runs. To provide versatility, many actions can be configured to appear onscreen at runtime to allow on-the-fly adjustments.
Allow an action to ignore its input whenever possible. Passing information between actions in a workflow isn't always possible or desirable. As such, create configurable actions that can accept or ignore any input they receive. When an action is set to ignore its input, the workflow should continue to operate. For example, the workflow shouldn't fail if your action can't locate a document to receive for input. Instead, the workflow skips over your action and proceeds on to the next.
Provide a conversion action when one of your actions produces nonstandard output. Most actions accept and produce common types of information, such as files, images, PDFs, and text. Automator tries to ensure compatibility between actions by performing automatic data conversions whenever possible. For example, when one action outputs files and the next inputs text, Automator automatically converts the files to text-based file paths so the workflow can proceed without fail. Some actions, however, produce more specialized content that Automator doesn’t understand, such as app-specific documents or objects. If your actions do this, you can provide a conversion action that doesn’t appear in a workflow, but runs behind the scenes whenever necessary to ensure compatibility between actions.
Communicate progress when it takes time to populate an action’s interface. Sometimes, an action must gather data to populate its interface. For example, the Get New Mail action gets a list of email accounts and displays them in a pop-up button. If it takes more than a second or two to gather necessary information, your action should show a progress indicator so the user knows that data is loading. (See Progress Indicators.) It’s also a good idea to disable interface elements while data loads so the user doesn’t try to interact with them.
Action Design
Provide a clear action title. Action titles should be short verb phrases that use title-style capitalization. They should clearly describe the action’s purpose so it’s easy to locate at a glance.
Create action titles that have between two and five words. For example, Eject Disk, New Mail Message, and Get Definition of Word.
Include your app name if it adds context. For example, Get Specified iTunes Items, Get Specified Finder Items, and Get Specified Calendar Items.
Provide sufficient descriptive information about an action. Automator includes a description area that shows detailed information about a selected action. People often use this area to learn about an action and decide whether to include it in a workflow. Each action should provide a detailed description consisting of one or more sentences that clearly describe the purpose of the action. In addition, each action should detail its input and result types, requirements, options, notes, warnings, related actions, version, and copyright information.
Minimize action height. Actions are stacked within a workflow. Since screen sizes are wider than tall, you should consider ways to minimize an action’s use of vertical space. For example, you could use a pop-up button instead of a series of radio buttons, even if there are only two choices. In general, use smaller controls and 10 pt margins. Make sure your entire action fits onscreen without requiring scrolling.
Don’t include labels that repeat the action’s title or description. Labels that repeat information available elsewhere take up space without providing value.
Don’t use boxes. An action doesn’t need to separate or group controls within boxes.
Avoid visible tab views. Instead, use hidden tab views to alternate between different sets of controls.
For developer guidance, see Automator.
Automator: Quick Actions
Beginning with macOS Mojave (v10.14), Automator Services workflows have been given new abilities and a new name: “Quick Actions”
While retaining all of the current features of its deep integration with the macOS contextual System Services architecture, Automator “Quick Actions” can now also be saved and accessed as system extensions, from within a Finder window’s Preview pane, or on the Macbook Pro Touch Bar.
The following documentation shows how to create a Quick Action (Services) workflow and how to control its integration in macOS as either an Extension or as a Service.
Services (Quick Action) Workflow Window
When the “Quick Action” workflow is chosen from the Automator template sheet, a new workflow window like this is created, displaying the workflow input controls common to all contextual system service workflows.
Mac Automator Download Urls
1 The Automator workflow document window.
2 The workflow input settings banner contains controls for identifying the data type of the workflow input, the application context in which the workflow is available, and the icon and color used to represent the workflow.
3 The workflow assembly pane where Automator actions are placed in the order in which they are executed.
4 The workflow input type menu determines the both the data and context required by the workflow. For example, if the chosen data type is “PDF files” then the workflow will only be enabled when one or more PDF files are selected. For those workflows that are not dependent upon having input, choose the “no input” option at the end of the menu.
5 The chosen item on the application context menu determines in which application the workflow will be used. Choose the “any application” setting to have the workflow always available regardless of which application in frontmost.
Beginning in macOS Mojave (v10.14) Automator Quick Actions (service workflows) have the option to be displayed and accessed from a Finder window’s Preview pane, and/or the Macbook Touch Bar. Consequentially, the workflow settings banner contains controls for assigning an icon and color to the workflow that is used in its display in the those locations.
1 You can select an icon for the Quick Action from the list of provided elements, or choose an image file. The chosen icon is displayed on eiher the Finder window Preview pane or the Macbook Touch Bar, and in the Extensions system prference pane. NOTE: a good template size for custom icon images is 36 by 36 pixels at 144 DPI resolution. Save the images in PNG format with an alpha channel. For more information, see the Custom Quick Action Icons section at the bottom of this page.
2 The selected color is used when displaying the Quick Action in the Macbook Touch Bar.
When the workflow’s input data type is set to either text, rich text, or Automatic (text), the option to replace the current application text selection with the results of the workflow, is enabled.
8 When the service input type is set to either text, rich text, or Automatic (text) the checkbox 9 for indicating replacement of the current text selection with the workflow result is enabled.
9 When this checkbox is enabled and selected, the contents of the current text selection will be replaced with the output of the workflow. If the checkbox is not selected, the current text selection will remain as is.
Option filtering of the current text selection is available when the input data type is set for text elements, such as: URLs, addresses, phone numbers, dates, or email addresses. When one of these input types is chosen, option to pass only a list of the text elements found in the current text selection, or the entire selection, to the workflow, is enabled.
4 When the service input type is set to specific textual elements, like URLs, phone numbers, or addresses, you have the option to either pass only a list of the textual elements found in the current text selection, or to pass the entire current text selection, as input to the workflow.
10 The popup menu options to either pass only a list of the textual elements found in the current text selection, or to pass the entire current text selection, as input to the workflow.
Services Folder
By default, service workflows are activated when they are saved or placed into the Services folder in your Home Library folder. If a service workflow is removed from this folder, it will no longer be available as a Quick Action.
To edit installed Automator “Quick Actions” (and other workflow types), choose “Open…” (⌘O) from the Automator File menu. In the forthcoming file chooser dialog 1 click the “Options” button 2 to reveal the workflow type popup menu 3 and select the type of installed workflow you wish to edit from the popup menu. The contents of the designated folder containing the specified type of workflow 4 will be displayed in the dialog.
TIP: to reveal a workflow file selected in this dialog in the Finder, type Command-R (⌘R) and the Finder application will come forward showing the containing folder with the item selected.
Custom Quick Action Icons
Apple Automator
Quick Action workflows may be assigned a custom icon image that you or other create. A good template size for custom icon images is 36 by 36 pixels at 144 DPI resolution, saved in PNG format with an alpha channel.
Mac Automator Download Images
An excellent resource for workflow icons is the Google Material Design Icons collection, which contain dozens of useful icons for all aspects of computer usage. The icons displayed below are examples from that collection.
Example Quick Action
Here is an example of a Quick Action workflow. This Quick Action can be displayed on either the Finder Preview pane and/or the Touch Bar when the Finder is the frontmost application. It will watermark the selected PDF files using a specified image and transparency.
TIP: download a set of watermark images in red and blue: DRAFT, CONFIDENTIAL, EYES ONLY, and FINAL
1 The Automator workflow document.
2 The workflow input banner with controls set to accept PDF files selected in the Finder application.
3 The Watermark PDF Documents Automator action will render the specified watermark image into the PDF file passed as input to the action. The resulting watermarked document will be passed to the next action.
What Is Automator On My Mac
4 The Open Finder Items action will open the watermarked file into whatever application is assigned as the default application for editing PDF files, which by default, is the Preview application.