Adjust variables in Shortcuts on iPhone or iPad
The variable editor appears at the bottom of the shortcut editor, allowing you to access controls to set the content type, choose which details of the content to extract, rename the variable or reveal the action that generated the variable.
Change a variable’s content type
Shortcuts automatically detects the type of content stored in a variable and uses that content as the variable’s default content type. You can force the variable to change content types.
In My Shortcuts in the Shortcuts app on your iOS or iPadOS device, tap on the shortcut you want to modify.
In the shortcut editor, tap a variable token.
The variable editor appears. The Type row indicates the content type used by the variable. For example, the Contents of Web Page variable displays URL as its variable type.
Tap the Type row and then select a new content type for the variable in the list that appears.
Note: If you choose a custom content type, Shortcuts uses its Content Graph technology to convert the content of the variable to the selected variable type. For example, if you have a variable that stores an URL, you can change its content type from URL to Article. Shortcuts will automatically fetch details about the article at that URL.
Choose a variable’s content details
In My Shortcuts in the Shortcuts app on your iOS or iPadOS device, tap on the shortcut you want to modify.
In the shortcut editor, tap a variable token.
The variable editor appears. The properties offered by the specific content type are listed below the variable’s title and content type. This list represents all the available metadata associated with your content, allowing you to choose which property to use as the output of the variable.
For example, an Image variable offers properties such as Width, Height, Date Taken, Location and Camera Make. Each content type offers its own set of properties.
Each content type has a default property that’s automatically extracted if nothing else is chosen.
Tap a property in the list.
The variable token is updated to indicate your preference.
Tip: You can manually grab properties from any action’s output by using the Get Details actions such as Get Details of Safari Webpage or Get Details of Images. Browsing these actions is also a helpful way to explore which details you can extract for each content type.
Rename a variable
In My Shortcuts in the Shortcuts app on your iOS or iPadOS device, tap on the shortcut you want to modify.
In the shortcut editor, tap a variable token.
The variable editor appears.
Tap the Variable Name row, then enter the new name for the variable.
Tap .
All instances of the variable are renamed.
Reveal the action that generated a variable
In longer shortcuts that contain multiple variables, you can use the Reveal button to show the original action that produced a variable.
In My Shortcuts in the Shortcuts app on your iOS or iPadOS device, tap on the shortcut you want to modify.
In the shortcut editor, tap a variable token.
The variable editor appears.
Tap Reveal.
The shortcut editor scrolls up and highlights the source action of the variable.
Tap to return to the shortcut editor or tap Go Back to return to the variable editor.
Once you’ve grasped how to add, place and adjust variables, you’ll begin to see how variables make your shortcuts much more dynamic. You can reuse content multiple times, easily extract particular details from the content and place that content anywhere in your shortcut.
Variables let you make shortcuts that are capable of adapting to a variety of situations, adjusting content in a jiffy while still yielding the results you want.
Tip: If you’re just getting started with variables, it may be helpful to experiment with an existing shortcut that includes variables. Add a shortcut from the Gallery, then reorder the actions or add new variables to see how the shortcut is affected.