shortcuts-action-icon-stop-and-output.webp

Stops execution of the current shortcut, and outputs content. This action is useful when: • Running a shortcut from another shortcut (using the Run Shortcut action). The output will be used as the output of the Run Shortcut action. • Running a shortcut from Quick Actions in Finder on macOS. The output will be saved as a file alongside the files selected in Finder. • Running a shortcut from Services on macOS. The output will replace the selected content, if applicable. • Or, when running a shortcut from another location that supports output, like the command-line or the Shortcuts URL scheme. No more actions will be run after this action.

Score
Type
InterActivity
Expertise
4/5
Type
InterActivity
Expertise

Action Information

Parameters

Stop and Output [Result]

If there’s nowhere to output:
[Do Nothing / Respond / Copy to Clipboard]

Input

(Anything) optional

Result

File

Details

Type
Interactivity
Expertise Needed
Matthew's Score
4/5
Date Added
07/06/2021
Identifier
is.workflow.actions.output

Comments

The Stop and Output action, along with the renamed Stop Shortcut (from Exit Shortcut), brings a more traditional programming step to Shortcuts via Automator, while adding some clarity to how to end a shortcut to existing Shortcuts flows.
This lets you pick which content to pass out at the end of a shortcut, plus, if there’s nowhere specifically for it to go, you can choose from having it Do Nothing, Respond with a prompt, or take whatever’s there and Copy to Clipboard.
Especially for any sort of “subroutine” shortcuts that perform a specific function and get utilized via “Run Shortcut” inside another shortcut, this action can guarantee that the correct output gets passed along, or otherwise copy the text or respond with an error message if something went wrong.
I’ll be honest, as a non-programmer other than via Shortcuts, I didn’t immediately understand this action – perhaps Apple can provide more clarity in the action description.

Works Well With

No results found.

Shortcuts Using This

No results found.


Get more out of Shortcuts – become a member.