Download as pdf or txt
Download as pdf or txt
You are on page 1of 33

Automator Guide for Mac

Automator User Guide Communities Contact Support

macOS Mojave 10.14

Table of Contents ⊕

Create a workflow in Automator on Mac


To create an Automator workflow, you choose the type of workflow you want, and then add actions to it.

Choose a workflow
A. In the Automator app on your Mac, choose File > New.

F. Select a type of workflow:

Workflow: A workflow you can run within the Automator app.

Application: A standalone workflow that runs when you open it or drop files or folders on it.

Quick Action: A workflow that you can add to Finder windows, the Touch Bar and the Services
menu. For more information about using Quick Action workflows, see Use Quick Action workflows
on Mac.

Print Plug-in: A workflow thatʼs available in the Print dialogue.

Folder Action: A workflow attached to a folder in the Finder. When items are added to the folder,
the workflow runs and the files are used as input to the workflow.

Calendar Alarm: A workflow that runs when a calendar event occurs.

Image Capture Plug-in: A workflow that‘s available in the Image Capture app on your Mac.

Dictation Command: A workflow that runs when dictation is used.

R. Click Choose.

After you choose a workflow, you add actions to it.

Add actions to a workflow


Actions in the Automator Library are grouped into categories by app or type of file or data. Each action is a
single step in a workflow.

A. In the Automator app on your Mac, find an action by doing any of the following:

See all available actions: Click the disclosure triangle to expand the Library.

See actions related to a specific category: Select the category in the Library column.

Search for a particular action: Enter a word in the search field. If you click a category in the Library
and then enter a search term in the search field, only the actions related to the category are
searched.

Record your own action: Click the Record button and complete the task you want to automate.
When finished, click the Stop button.
F. To add an action to your workflow, double-click it.

Note: If you record an action, it automatically appears in your workflow.

R. Add additional actions, as needed.

X. To save your workflow, choose File > Save.

If you created a specific type of workflow, such as an Application or Calendar Alarm, the workflow is
saved as that type. For example, if you chose the Calendar Alarm workflow, when you save it,
Automator automatically opens Calendar and creates a Calendar alarm event.

See also

Get information about actions in Automator on Mac


Run a workflow in Automator on Mac
View events performed by a workflow in Automator on Mac

Helpful? Yes No

 Support Automator User Guide Create a workflow in Automator on Mac

More ways to shop: visit an Apple Store, call 0800 048 0408 or find a retailer.
Copyright © 2019 Apple Inc. All rights reserved. Privacy Policy Terms of Use Sales and Refunds Site Map Contact Apple Use of Cookies UK
Automator User Guide Communities Contact Support

macOS Mojave 10.14

Table of Contents ⊕

Create a workflow using selected files on Mac


If you create a lot of workflows, you can set your keyboard preferences to let you quickly create a workflow
from selected files by using the shortcut menu.

Add the command to the shortcut menu


C. Choose Apple menu > System Preferences, click Keyboard, then click Shortcuts.

I. In the first column, click Services.

J. On the right, under Development, select Create Workflow.

Create a workflow from selected files


C. In the Finder, select the files you want to use in your workflow.

I. Press and hold the Control key, click one of the selected files to show the shortcut menu, then choose
Create Workflow.

A new workflow is created in Automator, and the selected files are specified in the first action.

Helpful? Yes No

 Support Automator User Guide Create a workflow using selected files on Mac

More ways to shop: visit an Apple Store, call 0800 048 0408 or find a retailer.
Copyright © 2019 Apple Inc. All rights reserved. Privacy Policy Terms of Use Sales and Refunds Site Map Contact Apple Use of Cookies UK
Automator User Guide Communities Contact Support

macOS Mojave 10.14

Table of Contents ⊕

Get information about actions in Automator on


Mac
Each action in the Automator app has its own description that tells you what it does.

In the Automator app on your Mac, click the action in the Library. A description of the selected
action appears in the bottom-left corner of the Automator window.

The description may contain the actionʼs required input, output and result. Although some actions
require no input or output, others have very specific input requirements, such as a specific type of file
from a previous action. For example, an action that requires a graphic file for input can only follow an
action in the workflow that has a graphic file as output.

See also

Create a workflow in Automator on Mac

Helpful? Yes No

 Support Automator User Guide Get information about actions in Automator on Mac

More ways to shop: visit an Apple Store, call 0800 048 0408 or find a retailer.
Copyright © 2019 Apple Inc. All rights reserved. Privacy Policy Terms of Use Sales and Refunds Site Map Contact Apple Use of Cookies UK
Automator User Guide Communities Contact Support

macOS Mojave 10.14

Table of Contents ⊕

Copy actions in Automator on Mac


You can copy and paste one or more actions in the same workflow, or from one workflow to another.

@. In the Automator app on your Mac, select the action that you want to copy in the workflow.

C. Choose Edit > Copy.

G. Click in the workflow where you want to add the action.

H. Choose Edit > Paste.

You can also copy actions by dragging them from one workflow to another.

Whenever you rearrange actions, you should compare the input and output of the actions in the workflow
to ensure they work together.

See also

Change the order of actions in an Automator workflow on Mac


Create a workflow in Automator on Mac
Get information about actions in Automator on Mac

Helpful? Yes No

 Support Automator User Guide Copy actions in Automator on Mac

More ways to shop: visit an Apple Store, call 0800 048 0408 or find a retailer.
Copyright © 2019 Apple Inc. All rights reserved. Privacy Policy Terms of Use Sales and Refunds Site Map Contact Apple Use of Cookies UK
Thank you. The survey is available under your current browser window. Please wait
until after you have completed your visit to take the survey.

Close

Automator User Guide Communities Contact Support

macOS Mojave 10.14

Table of Contents ⊕

Use results from a previous action in


Automator on Mac
In Automator, an action may require information from a previous action in the workflow to perform its task.
The input required by the action and the output the action passes on are listed in the actionʼs description.

In the Automator app on your Mac, do any of the following:

Find out what input is required by the action: Click the action In the Library.

A description of the selected action appears in the bottom-left corner of the Automator window. The
type of input required is listed in the description.

Choose whether to use input from the previous action: In the action, click Options, then click “Ignore
this actionʼs input”.

See also
Get information about actions in Automator on Mac
View the results of an action in Automator on Mac

Helpful? Yes No

 Support Automator User Guide Use results from a previous action in Automator on Mac

More ways to shop: visit an Apple Store, call 0800 048 0408 or find a retailer.
Copyright © 2019 Apple Inc. All rights reserved. Privacy Policy Terms of Use Sales and Refunds Site Map Contact Apple Use of Cookies UK
Automator User Guide Communities Contact Support

macOS Mojave 10.14

Table of Contents ⊕

Change the order of actions in an Automator


workflow on Mac
You can change the order of actions in a workflow by dragging an action to the new location.

In the Automator app on your Mac, do any of the following:

Drag the action to the desired location.

Select the action, press and hold the Command key, then press the Up Arrow key or the Down Arrow
key.

Whenever you rearrange actions, you should compare the input and output of the actions in the workflow
to ensure they work together.

See also
Copy actions in Automator on Mac
Delete actions from an Automator workflow on Mac

Helpful? Yes No

 Support Automator User Guide Change the order of actions in an Automator workflow on Mac

More ways to shop: visit an Apple Store, call 0800 048 0408 or find a retailer.
Copyright © 2019 Apple Inc. All rights reserved. Privacy Policy Terms of Use Sales and Refunds Site Map Contact Apple Use of Cookies UK
Automator User Guide Communities Contact Support

macOS Mojave 10.14

Table of Contents ⊕

Delete actions from an Automator workflow on


Mac
You can delete actions as easily as you can delete text in a document. Whenever you delete actions, you
need to compare the input and output of the actions remaining in the workflow to ensure they work
together.

In the Automator app on your Mac, do any of the following:

Click Delete (x) in the actionʼs title bar.

Select an action or group of actions, then choose Edit > Delete, or press the Delete key.

See also
Copy actions in Automator on Mac
Change the order of actions in an Automator workflow on Mac
Disable or enable actions in an Automator workflow on Mac

Helpful? Yes No

 Support Automator User Guide Delete actions from an Automator workflow on Mac

More ways to shop: visit an Apple Store, call 0800 048 0408 or find a retailer.
Copyright © 2019 Apple Inc. All rights reserved. Privacy Policy Terms of Use Sales and Refunds Site Map Contact Apple Use of Cookies UK
Automator User Guide Communities Contact Support

macOS Mojave 10.14

Table of Contents ⊕

Allow action options to be selected at runtime


in Automator on Mac
Sometimes a workflow can be more useful if some of the information is provided at runtime. For example,
a workflow that processes images could be more useful if you allow the user to select the type of image
processing at runtime.

Some actions have an option allowing the user to select the settings when the workflow is running. When
the user runs the workflow, the choices are displayed in a dialogue.

D. In the Automator app on your Mac, in the action, select the settings you want. The settings you
select appear as the default settings.

H. Click Options at the bottom of the action.

If Options is dimmed, the settings canʼt be selected at runtime.

K. Select “Show this action when the workflow runs”.

See also

Change the order of actions in an Automator workflow on Mac

Helpful? Yes No

 Support Automator User Guide Allow action options to be selected at runtime in Automator on Mac

More ways to shop: visit an Apple Store, call 0800 048 0408 or find a retailer.
Copyright © 2019 Apple Inc. All rights reserved. Privacy Policy Terms of Use Sales and Refunds Site Map Contact Apple Use of Cookies UK
Automator User Guide Communities Contact Support

macOS Mojave 10.14

Table of Contents ⊕

Use Quick Action workflows on Mac


If you have a workflow you use frequently — for example, adding a watermark to large sets of images —
and you want to make it easy to get to, you can create a Quick Action workflow. It will then be available
from Finder windows, the Services menu or the Touch Bar (on a Mac with a Touch Bar).

Create a Quick Action workflow


L. In the Automator app on your Mac, choose File > New.

O. Select Quick Action.

P. Specify any of the following:

Workflow receives input: The type of data that will be used as input to the workflow. If you choose
Automatic, Automator guesses the type of input you want to use in your workflow.

Note: Only Quick Actions that receive files as input are available in Finder windows.

Application: The app(s) you want to use to process your workflow. The app must be open for the
workflow to be available.

Input is: If the workflow receives input from URLs, addresses, phone numbers, dates or email
addresses, you can specify different input options.

Output replaces selected text: When the workflow receives input from Text or Rich Text, you can
specify that the output replaces the selected text.

Image: An image for your Quick Action. You can select an image on your Mac or choose an image
from the menu.

Colour: A colour for your Quick Action (visible in the Touch Bar only).

W. Click Choose.

Y. Add actions to your workflow.

Z. To save your workflow, choose File > Save.

After you create a Quick Action, it automatically appears in the Action pop-up menu at the top of a
Finder window, at the bottom of the Finder window preview pane in Column or Gallery view, and in the
Services menu. You can also access Quick Actions in the Touch Bar by adding a Quick Actions button.

Add the Quick Actions button to the Touch Bar


To access Quick Actions from the Touch Bar, you must add the Quick Actions button. You only have to do
this once.

L. Choose Apple menu > System Preferences, then click Extensions.


O. On the left, click Touch Bar.

P. Click Customise Control Strip.

W. Drag the Quick Actions button to the bottom of the screen until it appears in the Touch Bar.

Y. Click Done.

Choose which Quick Actions appear in the Finder and


Touch Bar
By default, all Quick Actions workflows appear in Finder windows, the Services menu and the Touch Bar.
You can change which Quick Actions appear in the Finder and Touch Bar.

L. Choose Apple menu > System Preferences, then click Extensions.

O. Click Finder.

P. Select the tickbox next to each action you want to be available from the Finder.

W. Click Touch Bar.

Y. Select the tickbox next to each action you want to be available from the Touch Bar.

Set preferences for Quick Actions in the Touch Bar


You can set the Touch Bar to show only Quick Actions, or have Quick Actions appear only when you press
the Function key.

L. Choose Apple menu > System Preferences, then click Keyboard.

O. Do one of the following:

To make the Touch Bar show only Quick Actions, click the “Touch Bar shows” pop-up menu, then
choose Quick Actions.

To make Quick Actions appear when you press the Function key, click the “Press Fn key to” pop-up
menu, then choose Shows Quick Actions.

See also

Use the Touch Bar on Mac


Create a workflow in Automator on Mac

Helpful? Yes No

 Support Automator User Guide Use Quick Action workflows on Mac


More ways to shop: visit an Apple Store, call 0800 048 0408 or find a retailer.
Copyright © 2019 Apple Inc. All rights reserved. Privacy Policy Terms of Use Sales and Refunds Site Map Contact Apple Use of Cookies UK
Automator User Guide Communities Contact Support

macOS Mojave 10.14

Table of Contents ⊕

Run a workflow in Automator on Mac


After you add your actions and configure the settings, you can try out your workflow by clicking Run.

B. In the Automator app on your Mac, if the Log area is not displayed, choose View > Log.

H. Click Run.

As the workflow runs, the following occurs:

The workflow executes from the top, running each action in sequence.

Status messages appear in the Log area at the bottom of the window, telling you which action is
running and when it is complete.

As each action completes, a green tick appears in the action.

If problems occur, warnings and error messages appear in the Log area.

See also

Create a workflow in Automator on Mac

Helpful? Yes No

 Support Automator User Guide Run a workflow in Automator on Mac

More ways to shop: visit an Apple Store, call 0800 048 0408 or find a retailer.
Copyright © 2019 Apple Inc. All rights reserved. Privacy Policy Terms of Use Sales and Refunds Site Map Contact Apple Use of Cookies UK
Automator User Guide Communities Contact Support

macOS Mojave 10.14

Table of Contents ⊕

Expand or collapse actions in an Automator


workflow on Mac
If you want to see more actions in a workflow, you can collapse the actions. Collapsing an action hides the
contents of the action, but leaves the name visible. If you want to see details of the action you can expand
it again.

In the Automator app on your Mac, click the disclosure triangle by the actionʼs name to collapse the
action; click the triangle again to expand it.

You can also collapse or expand all actions in a workflow by holding down the Option key and clicking
the disclosure triangle in the title bar of an action.

See also

Disable or enable actions in an Automator workflow on Mac


Delete actions from an Automator workflow on Mac

Helpful? Yes No

 Support Automator User Guide Expand or collapse actions in an Automator workflow on Mac

More ways to shop: visit an Apple Store, call 0800 048 0408 or find a retailer.
Copyright © 2019 Apple Inc. All rights reserved. Privacy Policy Terms of Use Sales and Refunds Site Map Contact Apple Use of Cookies UK
Automator User Guide Communities Contact Support

macOS Mojave 10.14

Table of Contents ⊕

Disable or enable actions in an Automator


workflow on Mac
If you want a workflow to run without a particular action, you can disable it. Any information usually passed
to it is passed to the next action. When you want to use the action in the workflow again, simply enable it.

E. Press and hold the Control key, then click the action to display the shortcut menu.

H. Choose Disable or Enable from the shortcut menu.

Note: If you disable an action that generates data required for the workflow, or is otherwise necessary for it
to run, the workflow will fail.

See also

Delete actions from an Automator workflow on Mac


Expand or collapse actions in an Automator workflow on Mac

Helpful? Yes No

 Support Automator User Guide Disable or enable actions in an Automator workflow on Mac

More ways to shop: visit an Apple Store, call 0800 048 0408 or find a retailer.
Copyright © 2019 Apple Inc. All rights reserved. Privacy Policy Terms of Use Sales and Refunds Site Map Contact Apple Use of Cookies UK
Automator User Guide Communities Contact Support

macOS Mojave 10.14

Table of Contents ⊕

View the results of an action in Automator on


Mac
You can view the details of a single action in the Results area of the action. This allows you to see what is
happening when you run a workflow, and helps in troubleshooting any problems that may occur.
Automator also includes a View Results action that displays the results of the previous action.

In the Automator app on your Mac, do any of the following:

View results for a single action: Click Results in the bottom-left corner of the action, then click Run.

View results for the previous action: Drag the View Results action from the Utilities category to the
workflow, placing it after the action you wish to check, then click Run.

See also

Use results from a previous action in Automator on Mac


View the values of variables in Automator on Mac
View events performed by a workflow in Automator on Mac

Helpful? Yes No

 Support Automator User Guide View the results of an action in Automator on Mac

More ways to shop: visit an Apple Store, call 0800 048 0408 or find a retailer.
Copyright © 2019 Apple Inc. All rights reserved. Privacy Policy Terms of Use Sales and Refunds Site Map Contact Apple Use of Cookies UK
Automator User Guide Communities Contact Support

macOS Mojave 10.14

Table of Contents ⊕

View events performed by a workflow in


Automator on Mac
As a workflow runs, each action can trigger a series of events. There are several ways you can observe the
events being performed by the actions in a workflow. This can be useful in editing and troubleshooting
your workflows.

In the Automator app on your Mac, do one of the following:

Look at the log at the bottom of the workflow window. Choose View > Log to open it.

Place the View Results action (from the Utilities category) in the workflow. The View Results action
displays the results or output passed from the previous action. By placing the View Results action in
the workflow between two actions, you can see the data that is flowing through the workflow at that
point.

See also
View the results of an action in Automator on Mac
View the values of variables in Automator on Mac

Helpful? Yes No

 Support Automator User Guide View events performed by a workflow in Automator on Mac

More ways to shop: visit an Apple Store, call 0800 048 0408 or find a retailer.
Copyright © 2019 Apple Inc. All rights reserved. Privacy Policy Terms of Use Sales and Refunds Site Map Contact Apple Use of Cookies UK
Automator User Guide Communities Contact Support

macOS Mojave 10.14

Table of Contents ⊕

About variables in Automator on Mac


A variable is a named container that is used to temporarily store information to use when needed.
Variables can contain all types of data, such as text, a reference to a file or a list of object references. You
can refer to the same variable from action to action or workflow to workflow, although the information
within it may be different. For example, the date may change, although the variable Todayʼs Date remains
the same.

You can add a variable to an action or to a workflow.

Some variables in Automator are constant values — for example, “Todayʼs date” or “My name”. Automator
temporarily holds a value while a workflow runs.

Some actions may allow you to choose a declared variable from a pop-up menu. Other actions give you
the option to create a new variable from a pop-up menu.

For more information about adding variables to an action, see Add variables to an action.

For more information about adding variables to a workflow, see Add variables to a workflow.

See also
View the values of variables in Automator on Mac

Helpful? Yes No

 Support Automator User Guide About variables in Automator on Mac

More ways to shop: visit an Apple Store, call 0800 048 0408 or find a retailer.
Copyright © 2019 Apple Inc. All rights reserved. Privacy Policy Terms of Use Sales and Refunds Site Map Contact Apple Use of Cookies UK
Automator User Guide Communities Contact Support

macOS Mojave 10.14

Table of Contents ⊕

Add variables to an action in Automator on


Mac
You can add a variable to a compatible field or pop-up menu of an action. The value of the variable is
evaluated and used by the action when the workflow runs.

B. Click Variables in the top-left corner of the Automator window, then select a category from the Library.

The variables related to that category are displayed.

I. Drag the variable you want to use onto the field or pop-up menu of an action.

A green plus sign (+) appears if the variable is compatible.

When you use a variable in a text field, the variable may be used in-line with other text. When the workflow
runs, the variable is evaluated and the value of the variable appears as a part of the text in the field.

See also

About variables in Automator on Mac


Add variables to a workflow in Automator on Mac
View the values of variables in Automator on Mac

Helpful? Yes No

 Support Automator User Guide Add variables to an action in Automator on Mac

More ways to shop: visit an Apple Store, call 0800 048 0408 or find a retailer.
Copyright © 2019 Apple Inc. All rights reserved. Privacy Policy Terms of Use Sales and Refunds Site Map Contact Apple Use of Cookies UK
Automator User Guide Communities Contact Support

macOS Mojave 10.14

Table of Contents ⊕

Add variables to a workflow in Automator on


Mac
You can drag a variable to a workflow and have the value of the variable used by the actions that follow.
The value of the variable is evaluated when the workflow runs.

A. Click Variables in the top-left corner of the Automator window, then select a category from the Library.

The variables related to that category are displayed.

I. Drag the variable you want to use into the workflow.

A Get Value of Variable action is added to the workflow. The value of the variable is passed to the next
action.

If the Get Value of Variable action receives text as input from the previous action, the variable is appended
to the text.

See also
About variables in Automator on Mac
Add variables to an action in Automator on Mac
View the values of variables in Automator on Mac

Helpful? Yes No

 Support Automator User Guide Add variables to a workflow in Automator on Mac

More ways to shop: visit an Apple Store, call 0800 048 0408 or find a retailer.
Copyright © 2019 Apple Inc. All rights reserved. Privacy Policy Terms of Use Sales and Refunds Site Map Contact Apple Use of Cookies UK
Automator User Guide Communities Contact Support

macOS Mojave 10.14

Table of Contents ⊕

Use the loop action to repeat parts of your


workflow in Automator on Mac
Use the loop action to run a portion of a workflow repeatedly. You can set the action to loop a specified
number of times or to have it run for a set amount of time.

The loop action repeats actions that come before it in the workflow. Actions that are placed after the loop
action in the workflow donʼt run until the conditions have been met for the workflow to exit the loop.

E. Click Actions in the top-left corner of the Automator window, then click Utilities in the Library.

J. Drag the Loop action into your workflow, then do one of the following:

To have a dialogue appear when the action runs asking the user whether to loop or continue,
choose “Ask to continue”.

To automatically repeat without asking, choose “Loop automatically”, enter a number in the “Stop
after” field, then choose the type of condition where you want the workflow to stop repeating.

See also

About variables in Automator on Mac


Add variables to an action in Automator on Mac

Helpful? Yes No

 Support Automator User Guide Use the loop action to repeat parts of your workflow in Automator on Mac

More ways to shop: visit an Apple Store, call 0800 048 0408 or find a retailer.
Copyright © 2019 Apple Inc. All rights reserved. Privacy Policy Terms of Use Sales and Refunds Site Map Contact Apple Use of Cookies UK
Automator User Guide Communities Contact Support

macOS Mojave 10.14

Table of Contents ⊕

If your workflow doesnʼt work in Automator on


Mac
When you run a workflow in Automator, events are displayed in the Log area at the bottom of the workflow
window.

You can use the log to analyse these events and diagnose problems after the workflow runs. Warnings and
error messages appear in the Log area.

You can also use the View Results action to help troubleshoot your workflow. This action shows the result
information passed from the previous action. You can temporarily place this action after any action in the
workflow to see the information flowing through the workflow at that point.

See also
View events performed by a workflow in Automator on Mac
View the values of variables in Automator on Mac
View the results of an action in Automator on Mac

Helpful? Yes No

 Support Automator User Guide If your workflow doesnʼt work in Automator on Mac

More ways to shop: visit an Apple Store, call 0800 048 0408 or find a retailer.
Copyright © 2019 Apple Inc. All rights reserved. Privacy Policy Terms of Use Sales and Refunds Site Map Contact Apple Use of Cookies UK
Automator User Guide Communities Contact Support

macOS Mojave 10.14

Table of Contents ⊕

View the values of variables in Automator on


Mac
If you are debugging a workflow that uses variables, use the Variable log to view the values contained by
the variables when the workflow runs.

B. Choose View > Variables.

The Variable log is displayed in the Log area.

H. Click Run.

As your workflow runs, the values of the variables are displayed in the log.

To run your workflow one step at a time to see the point where variables change, choose Workflow > Step.

See also

Add variables to an action in Automator on Mac


View the results of an action in Automator on Mac

Helpful? Yes No

 Support Automator User Guide View the values of variables in Automator on Mac

More ways to shop: visit an Apple Store, call 0800 048 0408 or find a retailer.
Copyright © 2019 Apple Inc. All rights reserved. Privacy Policy Terms of Use Sales and Refunds Site Map Contact Apple Use of Cookies UK
Automator User Guide Communities Contact Support

macOS Mojave 10.14

Table of Contents ⊕

Import additional actions into Automator on


Mac
In addition to the hundreds of actions in the Library, developers have posted many completed actions on
the Internet. When you find new actions you want to use, you can import them into Automator and use
them in your workflows.

D. Copy the action or actions you want to add to your Mac.

F. Open Automator.

G. Choose File > Import Actions.

J. Locate the action, select it, then click Import.

You can also double-click the .action file itself to open it and install it in Automator.

M. Quit Automator, then open it again.

The new action should be available from the Library.

See also

Create a workflow in Automator on Mac

Helpful? Yes No

 Support Automator User Guide Import additional actions into Automator on Mac

More ways to shop: visit an Apple Store, call 0800 048 0408 or find a retailer.
Copyright © 2019 Apple Inc. All rights reserved. Privacy Policy Terms of Use Sales and Refunds Site Map Contact Apple Use of Cookies UK
Automator User Guide Communities Contact Support

macOS Mojave 10.14

Table of Contents ⊕

Use a shell script action in an Automator


workflow on Mac
You can extend the power of Automator on Mac by using shell commands within a workflow. For example,
you can string several bash shell commands together to perform complex tasks, and then pass the results
to a window.

E. Choose File > New.

I. Select a document type, then click Choose.

J. Type Run Shell Script in the search field, then select Run Shell Script in the search results.

M. Drag the Run Shell Script action into your workflow.

O. Click the Shell pop-up menu, then choose the shell environment.

Q. Enter your shell commands in the command field.

The example command is cat and should be removed.

S. Test your workflow before saving it.

See also

Control Automator with scripts on Mac

Helpful? Yes No

 Support Automator User Guide Use a shell script action in an Automator workflow on Mac

More ways to shop: visit an Apple Store, call 0800 048 0408 or find a retailer.
Copyright © 2019 Apple Inc. All rights reserved. Privacy Policy Terms of Use Sales and Refunds Site Map Contact Apple Use of Cookies UK
Automator User Guide Communities Contact Support

macOS Mojave 10.14

Table of Contents ⊕

Add AppleScript scripts to a workflow in


Automator on Mac
Automator lets you create automation without scripting, but youʼre not limited to just the actions available
in the Library. You can use the Run AppleScript action to add AppleScript scripts to your Automator
workflow.

The AppleScript script can interact with the other actions in your workflow. It can receive input from the
previous action, and return results to the following action.

H. Click Actions in the top-left corner of the Automator window, then select Utilities in the Library.

L. Drag the Run AppleScript action into your workflow.

You can edit, compile and test your script right in the action, or you can develop your script in Script
Editor.

See also
Control Automator with scripts on Mac
Introduction to Automator AppleScript Actions Tutorial
AppleScript website

Helpful? Yes No

 Support Automator User Guide Add AppleScript scripts to a workflow in Automator on Mac

More ways to shop: visit an Apple Store, call 0800 048 0408 or find a retailer.
Copyright © 2019 Apple Inc. All rights reserved. Privacy Policy Terms of Use Sales and Refunds Site Map Contact Apple Use of Cookies UK
Automator User Guide Communities Contact Support

macOS Mojave 10.14

Table of Contents ⊕

Add JavaScript scripts to a workflow in


Automator on Mac
In addition to AppleScript, Automator supports JavaScript for Automation, which lets you create
automations using JavaScript. You can use the Run JavaScript action to add JavaScript to your Automator
workflow.

The JavaScript script can interact with the other actions in your workflow. It can receive input from the
previous action, and return results to the following action.

F. Click Actions in the top-left corner of the Automator window, then select Utilities in the Library.

L. Drag the Run JavaScript action into your workflow.

You can edit, compile and test your script right in the action, or you can develop your JavaScript in
Script Editor.

To learn more about JavaScript for Automation, go to JavaScript for Automation Release Notes.

See also
Control Automator with scripts on Mac

Helpful? Yes No

 Support Automator User Guide Add JavaScript scripts to a workflow in Automator on Mac

More ways to shop: visit an Apple Store, call 0800 048 0408 or find a retailer.
Copyright © 2019 Apple Inc. All rights reserved. Privacy Policy Terms of Use Sales and Refunds Site Map Contact Apple Use of Cookies UK
Automator User Guide Communities Contact Support

macOS Mojave 10.14

Table of Contents ⊕

Control Automator with scripts on Mac


Automator is a‘scriptableʼ application and can be controlled by AppleScript and JavaScript for Automation
commands. You can execute workflows, create new workflows, add actions to workflows, get the values
that are set within actions, and much more.

To see Automator commands available to scripts, use Script Editor, included with macOS.

I. In the Finder, open the Utilities folder in the Applications folder.

Youʼll see the Script Editor icon.

M. Open another Finder window, then open the Applications folder.

Youʼll see the Automator icon.

N. Drag the Automator icon onto the Script Editor icon to open the ScriptEditor dictionary for Automator.

To learn more about AppleScript and how to use scripting terms, go to AppleScript Language Guide.

To learn more about AppleScript, go to the AppleScript website.

See also

Add AppleScript scripts to a workflow in Automator on Mac


Add JavaScript scripts to a workflow in Automator on Mac

Helpful? Yes No

 Support Automator User Guide Control Automator with scripts on Mac

More ways to shop: visit an Apple Store, call 0800 048 0408 or find a retailer.
Copyright © 2019 Apple Inc. All rights reserved. Privacy Policy Terms of Use Sales and Refunds Site Map Contact Apple Use of Cookies UK
Automator User Guide Communities Contact Support

macOS Mojave 10.14

Table of Contents ⊕

Add an Automator workflow to the Script menu


in Script Editor on Mac
You can make a workflow easier to access by adding it to the Script menu on the right side of the menu
bar.

Tip: If the Script menu doesnʼt appear in the menu bar, you can enable it in Script Editor preferences.

Show the Script menu in the menu bar


E. Open Script Editor.

F. Choose Script Editor > Preferences, then select “Show Script menu in menu bar”.

The Script menu appears in the menu bar.

Add an Automator workflow to the Script menu


E. Choose File > Save.

F. Enter a name for your workflow, click the File Format pop-up menu, then choose Application.

P. Click Save.

Q. In the Finder, open the Scripts folder in the Library folder, then copy your Automator app into the
Scripts folder.

The Automator app is added to the Script menu.

See also

Control Automator with scripts on Mac


Create a workflow in Automator on Mac

Helpful? Yes No

 Support Automator User Guide Add an Automator workflow to the Script menu in Script Editor on Mac

More ways to shop: visit an Apple Store, call 0800 048 0408 or find a retailer.
Copyright © 2019 Apple Inc. All rights reserved. Privacy Policy Terms of Use Sales and Refunds Site Map Contact Apple Use of Cookies UK
Automator User Guide Communities Contact Support

macOS Mojave 10.14

Table of Contents ⊕

Keyboard shortcuts in Automator on Mac


Use these shortcuts to save time while using Automator.

Action Shortcut

Collapse all the actions in a workflow Option-click the disclosure triangle in the title bar of
one of the actions

Hide Automator Command-H

Hide other apps Option-Command-H

New workflow Command-N

Open Command-O

Close Command-W

Save Command-S

Duplicate Shift-Command-S

Convert To Option-Shift-Command-C

Page Setup Shift-Command-P

Print Command-P

Undo Command-Z

Redo Shift-Command-Z

Cut Command-X

Copy Command-C

Paste Command-V

Select All Command-A

Duplicate Command-D
Find action (sets the prompt to the search field) Option-Command-F

Find Command-F

Find Next Command-G

Find Previous Shift-Command-G

Show Spelling and Grammar Command-Colon (:)

Check Spelling Command-Semicolon (;)

Open special characters window Option-Command-T

Show log Option-Command-L

Run Command-R

Stop Command-Period (.)

Record Option-Command-R

Show Results Command-K

Move Up Command-Up Arrow

Move Down Command-Down Arrow

Show in Library Shift-Command-J

Minimise Command-M

Helpful? Yes No

 Support Automator User Guide Keyboard shortcuts in Automator on Mac

More ways to shop: visit an Apple Store, call 0800 048 0408 or find a retailer.
Copyright © 2019 Apple Inc. All rights reserved. Privacy Policy Terms of Use Sales and Refunds Site Map Contact Apple Use of Cookies UK

You might also like