Run a shortcut using a URL scheme on iPhone or iPad
The Shortcuts URL scheme supports running a shortcut that’s saved in your shortcuts collection. This functionality may be useful in automation systems that extend beyond Shortcuts itself, so that other apps can run a shortcut in your collection. Or you could use the Shortcuts URL scheme in a task manager for running a shortcut as one step in a project. URL schemes can be used anywhere a URL can be used—your own app, in a web browser, or in the command line.
Run a shortcut from a URL
Open a URL with the following structure:
shortcuts://run-shortcut?name=[name]&input=[input]&text=[text]
Use the following parameters in the URL:
name: The name of the shortcut to run.
input (optional): The initial input into the shortcut. There are two input options: a text string or the word
clipboard
. When theinput
value is a text string, that text is used. When theinput
value isclipboard
, the contents of the Clipboard are used.text: If input is set to text, then value of the text parameter is passed as input to the shortcut. If input is set to clipboard, then this parameter is ignored.
By using a text string, you can provide your own URL-encoded text as input to the shortcut. For example, a URL that uses the text “
goetta is great
” as input to a shortcut named Lookup Goetta would look like this:shortcuts://run-shortcut?name=Lookup Goetta&input=text&text=goetta is great
A URL to transfer the most recently copied text into a shortcut called Add to Notes would look like this:
shortcuts://run-shortcut?name=Add to Notes&input=clipboard
Tip: If you’d like to run one shortcut from another shortcut, use the Run Shortcut action instead of a URL scheme. You should only run shortcuts with a URL if you’re integrating from another app outside of Shortcuts.