Run Automator workflow
Runs an Automator workflow, a Quick Action or an application workflow, with the system's automator tool, optionally passing it input and capturing its output.
Run the Automator workflow path
Details #
Runs the workflow at path with /usr/bin/automator and waits for it to finish. If you give input, it is handed to the workflow as its input, one item per line (a list is one item each). Whatever the workflow ends with becomes the step's output ({"output": "..."}), one item per line, and goes into into when it is set.
This is how the Automator import keeps every workflow working: one that Switchboard can't turn into steps still runs, unchanged, through this step. The import keeps a copy of the workflow in the Library, so the macro doesn't depend on the original file.
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
path | text | Yes | Required. A .workflow or an application workflow. ~ is expanded. A relative path is read from the Library folder, which is where an import keeps its copy (assets/<macro id>/Name.workflow). | |
input | any value | Text or a list to give the workflow. Leave it out to run with no input. | ||
into | text | The variable that receives the workflow's output. | ||
sample | any value | What into holds during a dry run. |
Every step also accepts label, onFailure, timeout and dryRunSafe.
Examples #
- Run Automator workflow “Send to Claude”
- Show “Done: {{result}}”
Gotchas #
Dry run. The workflow does not run;
intogetssampleor an empty string.Timeout. The step is cancelled after 10 s unless you set
timeouton the step. A workflow that waits on a dialog or a slow app needs more.Input is text. Each line reaches the workflow as a text item. Actions that expect files take a path as that text.
A path that isn't a workflow folder fails the step with
no workflow at <path>.Actions that control other apps ask for permission the first time, under System Settings › Privacy & Security › Automation.
See also #
Run Shortcut, Run shell script, Coming from Automator and Shortcuts