# data[].attributes.body
Follow the guide to complete your tasks.

# data[].attributes.body
Follow the guide to complete your tasks.

# data[].attributes.body
Follow the guide to complete your tasks.

# data[].attributes.attachment_link.readable_text
Use the If action (also known as a conditional) to set up a shortcut that checks for certain conditions and operates differently depending on which condition is met. If actions give you the flexibility to set up different paths that your actions can take depending on conditions that are known only when the shortcut runs.

Simply put, the If action lets you express the following in a shortcut: If a condition is true do this; otherwise do that. A different series of actions is run for each result.

You can use the If action to test whether content that's passed into the action as input meets a certain condition. For example, you could use the If action to verify that a webpage fetched from a previous action contains the word "goetta."

Once placed in your shortcut, the If action includes three markers (tags in the shortcut editor): If, Otherwise, and End If.

In the If marker, you can configure the Input and Condition parameters. Tap the Input parameter to choose a variable. (The content of this variable will be used for the If comparison.) Then tap Condition to choose a condition. (The available conditions are dependent on the type of input.) Text inputs have conditions such as "is," "is not," and "contains." Number inputs have conditions such as "is greater than," "is less than," or "is between."

Note: An If action will attempt to set the Input parameter to the output of an action placed before it.

Tap the input variable to show an editor where you can make changes to the variable. To remove the variable and choose a different input, tap Clear.

Inside the variable editor, you can choose a value to compare. For example, for a Weather Conditions variable, you can choose the High temperature. For more information, see Adjust variables in Shortcuts on iPhone or iPad.

Because the If action has two possible outcomes-the condition is true or the condition is false-you can place actions in two paths. When the shortcut runs, a true condition causes the input to be passed to the first action just after If, while a false condition causes the input to be passed into the first action after the Otherwise marker.

The last action to produce output in the If case or Otherwise case passes its content through the End If marker as output (available to retrieve as an "If Results" Magic Variable). This means that the last action in each path of the If action affects the output of the action as a whole.

Tip: You can place If actions inside each other to create a more advanced tree of decisions in your shortcut: In the shortcut editor, drag a second If action so that it overlaps the lower portion of the first If action. The second If action is nested (indented) under the first If action.

# data[].attributes.attachment_link.title
Use If actions in Shortcuts on iPhone or iPad

# data[].attributes.attachment_link.description
Use the If action (also known as a conditional) to set up a shortcut that checks for certain conditions and operates differently depending on which condition is met. If actions give you the flexibility to set up different paths that your actions can take depending on conditions that are known only when the shortcut runs.

# data[].attributes.attachment_link.readable_text
A variable is a container used to label and store content such as text, images, a webpage, or a dictionary of data.

When you create a shortcut using variables, actions in the shortcut aren't required to follow a direct linear path of inputs and outputs-content can weave in and out of the shortcut at different points. For instance, the shortcut can store content at a certain point, perform an entirely independent set of actions, and then grab the original content in subsequent steps.

Using variables is the most powerful way to expand the capability of your shortcuts, allowing you to set up dynamic templates for content that autofill each time you use the shortcut. When a shortcut runs through its sequence of actions, it looks for any variables, retrieves the appropriate content for each variable, and then places the content inline, producing consistent results.

In Shortcuts, variables are represented by blue pill-shaped tokens labeled with the name of the variable, such as Ask Each Time, Clipboard, or Current Date. You place variables throughout the shortcut to mark where you want to set and retrieve content each time the shortcut is run.

# data[].attributes.attachment_link.title
Intro to variables in Shortcuts on iPhone or iPad

# data[].attributes.attachment_link.description
A variable is a container used to label and store content such as text, images, a webpage, or a dictionary of data. When you create a shortcut using variables, actions in the shortcut aren't required to follow a direct linear path of inputs and outputs-content can weave in and out of the shortcut at different points.

# data[].attributes.attachment_link.description
Automation is a type of shortcut that's activated by an event, rather than manually. You can use the Shortcuts app to set up a personal or home automation and then have the automated shortcut run when you arrive or depart, when you change a setting on your iPhone, at a time of day, and much more.

# data[].attributes.attachment_link.readable_text
What's a shortcut?

A shortcut provides a quick way to get things done with your apps, with just a tap or by asking Siri.

Shortcuts can automate a wide variety of things-for example, getting directions to the next event on your Calendar, moving text from one app to another, generating expense reports, and more.

Based on how you use your Apple devices-your app usage and your browser, email, and messaging history-Siri suggests simple, useful shortcuts that you can quickly tap to run. Once you create a shortcut, you can activate Siri, then say the shortcut's name to run it.

The Shortcuts app

In addition to running the simple shortcuts suggested by Siri, you can use the Shortcuts app to add ready-made or custom shortcuts to your devices. The app lets you combine multiple steps across multiple apps to create powerful task automations.

After you add shortcuts from the Gallery or create your own, you can run them from:

What's an action?

An action is the building block of a shortcut. Each shortcut comprises a series of actions, and each action is a single step that performs a particular function. For example, a shortcut that shares an animated GIF might contain three consecutive actions: Get Latest Photos grabs the latest photos that you took on your device, Make GIF uses those photos to build an animated GIF, and Send Message automatically sends the GIF to your recipients.

Actions represent the best features of the apps on your Apple devices, broken out into smaller parts. With hundreds of actions, there are a variety of individual steps you can chain together to build shortcuts.

See Intro to how shortcuts work on iPhone and iPad and Navigate the action list in Shortcuts on iPhone or iPad.

Where are shortcuts stored?

In the Shortcuts app, shortcuts are organized in collections in the Shortcuts screen (iOS) and Shortcuts sidebar (iPadOS):

All Shortcuts: Contains all of your shortcuts and shortcuts available in apps.

My Shortcuts: Contains all of your shortcuts.

Share Sheet: Contains shortcuts that are available in the share sheet of another app.

Apple Watch: Contains shortcuts that are available on your Apple Watch.

App Shortcuts: Contains all of the shortcuts available in apps.

When you tap a collection name, all shortcuts in that collection are shown in a grid array. Each shortcut is represented by a rounded rectangle that has a title, an icon, and a color. Tap a shortcut once to run it, or tap to see the actions contained inside.

Not all apps, services, and content are available in all countries or regions.

# data[].attributes.attachment_link.description
A shortcut provides a quick way to get things done with your apps, with just a tap or by asking Siri. Shortcuts can automate a wide variety of things-for example, getting directions to the next event on your Calendar, moving text from one app to another, generating expense reports, and more.

# data[].attributes.attachment_link.readable_text
1. In the Shortcuts app on your iOS or iPadOS device, Tap in the upper-right corner of the screen.

An empty, untitled shortcut appears in the shortcut editor.

2. Tap New Shortcut, tap Rename, type the name of your shortcut, then tap Done.

3. Tap Add Action.

A list of action categories appears.

4. Tap a category (such as Media or Web), then tap an action in the list to add it to your shortcut.

Note: You may have to scroll to see all the available actions in a category.

You can also touch and hold an action in the list, then drag it to the position you want in the shortcut editor.

5. To add another action, swipe up on the search field at the bottom of the screen, then choose an action.

Tip: When you add another action, the action category you previously chose from opens. To return to the list of all action categories, tap Done.

6. When you're finished adding actions to your workflow, tap Done.

The shortcut is added to your shortcuts collection, in both the All Shortcuts and My Shortcuts categories.

For information on customizing the appearance of your new shortcut (the rectangle in your shortcuts collection), see Modify shortcut colors and icons on iPhone or iPad.

7. To test your new shortcut, tap on the shortcut to open it in the shortcut editor, then tap .

To stop the shortcut, tap .

Tip: You can also create a new shortcut by touching and holding the Shortcuts app icon on the Home Screen of your device and then tapping Create Shortcut.

For information on rearranging your shortcuts collection, see Reorder shortcuts on iPhone or iPad.

# data[].attributes.attachment_link.title
Create a custom shortcut on iPhone or iPad

# data[].attributes.attachment_link.description
In the Shortcuts app on your iOS or iPadOS device, Tap in the upper-right corner of the screen. An empty, untitled shortcut appears in the shortcut editor. Tap New Shortcut, tap Rename, type the name of your shortcut, then tap Done. Tap Add Action. A list of action categories appears.

# data[].attributes.headline
Free Shortcuts collection by Matthew Cassinelli

# data[].attributes.subject
Free Shortcuts collection by Matthew Cassinelli

# data[].attributes.attachment_link.description
Start exploring Shortcuts with the free set of beginner-friendly tools.

# data[].attributes.body
Follow the guide to complete your tasks.

# data[].attributes.attachment_link.readable_text
The Repeat action and the Repeat with Each action allow you to run a group of actions in a shortcut multiple times in a row.

Using the Repeat action

When you add a Repeat action to your shortcut, the action includes two markers: Repeat and End Repeat. Place the actions that you want to repeat between the Repeat and End Repeat markers, then specify the number of times you want the action to repeat. When the shortcut runs, the actions placed between the markers loop the number of times that you specify.

For example, a repeat loop that contains a Vibrate Device action set to Repeat 3 Times vibrates your iOS device three times when the shortcut is run.

You can place unlimited actions inside of a repeat loop. The actions run in order (from top to bottom), and when the last action is reached, the shortcut loops back to the first action, then runs again (the specified number of times).

Tip: You can place Repeat actions inside each other in your shortcut: In the shortcut editor, drag a second Repeat action so that it overlaps the lower portion of the first Repeat action. The second Repeat action is nested (indented) under the first Repeat action.

About data flow in a Repeat action

For each iteration of a repeat loop, the last action's output is gathered into a list, and that list becomes the output of the Repeat action as a whole.

For example, a Repeat action that runs four times and contains a Get Latest Photos action outputs the most recent photo saved to Photos in each iteration of the loop. After all four iterations run, the outputs are gathered together, and a list of four identical photos is created. The four photos become the output of the Repeat action as a whole, and are then passed to the next action after the repeat loop.

To learn more about the flow of inputs and outputs, see Intro to how shortcuts work on iPhone and iPad.

Tip: Touch and hold the Repeat variable to set the number of repetitions to a variable. For example, if you add the Ask Each Time variable to the Repeat variable in the Repeat action, you'll be asked to choose how many times the loop should repeat when the shortcut is run.

Using the Repeat with Each action

The Repeat with Each action takes a list of items as its input and then runs the same group of actions one time for each item in the list. This is useful if you're working with multiple files or with multiple pieces of content. This type of loop repeats until every item that was passed into the Repeat with Each action iterates.

For example, if you have a Get Upcoming Events action set to retrieve the next four upcoming Calendar events and you place a Repeat with Each action after the action, the repeat loop runs four times and each iteration receives one of the Calendar events as input.

When you add a Repeat with Each action to your shortcut, the action includes two markers: Repeat with Each and End Repeat.

At the end of the repeat loop, the output passed to the End Repeat marker during each iteration is gathered together and passed as the output of the Repeat with Each action as a whole.

The Repeat Item variable

The Repeat with Each action offers a special variable for tracking the current item: Repeat Item. The Repeat Item variable updates with each iteration of the loop, containing the item passed as input for that iteration.

For example, if you pass 10 Calendar items into a Repeat with Each action, the Repeat Item variable represents one of the Calendar events in each iteration as the shortcut loops through each Calendar item.

Note: If you've placed a Repeat with Each action inside another Repeat with Each action, the variable name changes to Repeat Item 1 to represent the inner repeat item, to Repeat Item 2 for the deeper loop, and so on.

The Repeat Index variable

All repeat loops offer a special variable called Repeat Index, which is used to keep track of the current iteration of the loop. The Repeat Index variable contains the number of times a loop has been repeated so far, starting at 1 for the first iteration of the loop and incrementing by one each time. The second time a loop runs, the Repeat Index is 2. The third time a loop runs, the Repeat Index is 3, and so on.

Note: If you've placed a Repeat action inside another Repeat action (created nested repeat loops), the inner Repeat action's variable name changes to Repeat Index 2. An additional nested Repeat action would offer a Repeat Index 3 variable, and so on.

For more information, see Use variables in Shortcuts on iPhone or iPad.

Create infinite loops

Although Shortcuts doesn't offer an action to repeatedly run a group of actions forever, you can emulate this behavior by using the Run Shortcut action. The Run Shortcut action allows you to run one shortcut inside of another. Configure the Run Shortcut action to run the same shortcut that it's contained within, and the shortcut runs from start to finish repeatedly until you stop the shortcut.

Test the output

When you're learning to work with Repeat and Repeat with Each, it's helpful to test the results that are produced after the End Repeat marker to ensure that the content is what you intended. Place a Quick Look action after the End Repeat marker to preview the items that are output by the repeat loop.

You can also place a Show Alert action after the End Repeat marker and insert a Repeat Results Magic Variable in the message box to display text that has been output by the loop. If you're testing a loop that's in the middle of a long shortcut, it's helpful to use a Show Alert action to preview results, because you can include a Cancel button in the alert to end the shortcut at that point in the loop.

# data[].attributes.attachment_link.title
Use Repeat actions in Shortcuts on iPhone or iPad

# data[].attributes.attachment_link.description
The Repeat action and the Repeat with Each action allow you to run a group of actions in a shortcut multiple times in a row. When you add a Repeat action to your shortcut, the action includes two markers: Repeat and End Repeat.

# data[].attributes.body
The full Shortcuts User Guide by Apple covers a lot more than we've managed to! Take a read.

# data[].attributes.attachment_link.description
Automation is a type of shortcut that's activated by an event, rather than manually. You can use the Shortcuts app to set up a personal or home automation and then have the automated shortcut run when you arrive or depart, when you change a setting on your iPhone, at a time of day, and much more.

# data[].attributes.body
https://support.apple.com/en-sg/guide/shortcuts/apd690170742/6.0/ios/16.0

# data[].attributes.attachment_link.readable_text
Personal automation provides a way to run actions based on events such as time of day, arrival at a location, or the opening of an app. A normal shortcut requires you to run it from the Shortcuts app, the Shortcuts widget, or the share sheet, whereas personal automation actions use event triggers, travel triggers, communication triggers, or setting triggers to run.

After you create a new personal automation, when an event occurs you'll receive a notification asking you to run the automation. You can also edit a personal automation to run without asking.

Personal automation is specific to a device. The automation will be backed up to iCloud but will not sync to other devices.

# data[].attributes.attachment_link.title
Intro to personal automation in Shortcuts on iPhone or iPad

# data[].attributes.attachment_link.description
Personal automation provides a way to run actions based on events such as time of day, arrival at a location, or the opening of an app. A normal shortcut requires you to run it from the Shortcuts app, the Shortcuts widget, or the share sheet, whereas personal automation actions use event triggers, travel triggers, communication triggers, or setting triggers to run.