Run Shortcuts – Take Control of Shortcuts

Run Shortcuts

There are lots of ways to run shortcuts, and I would be remiss if I didn’t tell you how to do so! You can run shortcuts manually or automatically (with per-device or HomeKit triggers, as I explain later).

Run Shortcuts Directly in the App

One way to run shortcuts is directly inside the Shortcuts app. There are two ways of doing this. From My Shortcuts, the primary tab in Shortcuts (Figure 6), you can tap any individual shortcut and it runs. This hides the inner workings of the shortcut as much as possible during the execution. It also means you see dialogs where you can select something or input data, and you see the results of your shortcut—if it is programmed to show them to you!

Figure 6: The My Shortcuts tab.

Inside the shortcuts editor (refer back to Figure 3), found by creating a new shortcut or editing one (tap the More button in the top-right corner of a shortcut tile), you also have a Play button to let you run the shortcut. (If you have a keyboard attached, you can also press ⌘-R to run the shortcut.)

Run Shortcuts from a Widget

Widgets are a new feature in iOS 14. Many apps use them to display information on your iPhone Home screen (on iPads we still have a column with widgets on the left of the first Home screen).

To add a Shortcuts widget to your Home screen, touch and hold in a blank space, tap the plus button in the top-left corner, and scroll down to find Shortcuts.

After you choose which size to add and place it on your screen (Figure 7), tap the widget and choose a folder from Shortcuts to display. The first few Shortcuts (1, 4, or 8, depending on the size of your widget) display.

Figure 7: Widget choices for Shortcuts.

When you tap any of these Shortcuts, it runs in the background, with that icon changing to a progress bar to show you that it is working.

Put Shortcuts on Your Home Screen

You can also add any shortcut to your Home screen. In the Details view of your shortcut (refer back to Figure 4), tap Add to Home screen. Now you can set a display name—the name that appears below the icon—and tap the icon to customize it. Tap Add in the top-right corner (Figure 8) and when you close Shortcuts, you can see the shortcut on your Home screen. Now when you tap the icon of the shortcut on your Home screen, it runs!

Figure 8: Configure a shortcut to add it to your Home screen.

Run Shortcuts from Automations

An automation is a way to run a shortcut automatically. This is brand new in iOS and iPadOS 13. There are two kinds of automations, personal automations and home automations. Each automation uses a trigger—a piece of magic that tells your shortcut to run. The different triggers available depend on which kind of automation you use.

Personal Automations

A personal automation is an automation for the device you create it on. So an automation you set up on your iPhone stays on your iPhone. You can create as many automations as you like, and even use the same trigger multiple times. Depending on which trigger you use, your shortcut may run entirely automatically; or, if the trigger is passive (like when your device connects to a Wi-Fi network), then you get a notification to run your shortcut. Let’s look at the different trigger types for personal automations.

Events

Event triggers are, unsurprisingly, linked to when things happen. We can’t create a time machine with them, but there are plenty of useful options:

  • Time of Day (automatic): This works exactly how it sounds: at the times you specify on the days of the week you choose, a notification pop ups to prompt you to run your shortcut—or if you toggle off Ask When Run then it runs automatically for you. I use a shortcut at 9:30 P.M. to help me prepare for the next day.

  • Alarm (automatic): Whether you stop or snooze your alarm in the morning, it can be handy to have something happen at the same time. For example, if you snooze then you could have a HomeKit-enabled light by your bed turn itself on dimly, but when you turn off your alarm, have that same light turn on more brightly—and have your iPhone also prompt you with a list of events and reminders that are planned for today.

  • Sleep (automatic): The new bedtime feature in iOS 14 allows you to run shortcuts when wind down or bedtime begins, or when waking up. This can allow you to turn off your lights when you go to sleep—at different times on different days of the week without reprogramming separate automations each time.

Travel

I find I have to do multiple things when I leave the house or arrive home—control my lights, play or pause music, check reminders, and more. With travel triggers and shortcuts I can make these things happen mostly automatically! Here is a summary of the different travel triggers available in Shortcuts:

  • Arrive & Leave: These are two separate triggers that allow you to be prompted to run a shortcut when you arrive at or leave a location. You can also limit these triggers to time rangesfor example, your office triggers might be best limited to 8 A.M.–6 P.M., reminding you to start and stop tracking time.

  • Before I Commute: Most of us follow some kind of routine. Siri can guess when things will happen—and it uses these to prompt us to run shortcuts through automations. So for example, if you usually leave to go to work at 8:30A.M., a notification from Shortcuts can pop up on your screen to prompt you to run it.

  • CarPlay(automatic): If you have a car with CarPlay then you can use connecting to it or disconnecting from it to run a shortcut automatically, ideal for starting your navigation and favorite playlist.

Communication

These triggers link into our interactions with our contacts to offer automations:

  • Email: You can choose to use the sender and/or subject, and even filter for a specific account and a specific recipient when creating an email trigger. You could use this with actions from an app like OmniFocus to look for related tasks.

  • Message: This trigger allows you to look for messages from a specific sender, or ones that contain a specific word or phrase. As well as using it the same way as the Email trigger, you can use it to offer additional contact options for a person.

Apple Watch

The Apple Watch has a whole series of actions, but it can also trigger Shortcuts for you:

  • Apple Watch Workout (automatic): Starting your playlist and a workout from your Apple Watch involves more than a few taps. With the Apple Watch Workout trigger, you can set up a shortcut to automatically start a particular playlist when you begin your workout. You can also run actions when you stop a workout—which lets you log your workout straight to a Day One Journal, for example.

Connections

These triggers allow us to run a Shortcut based on what our device is connected to:

  • Wi-Fi: Wi-Fi networks can be used similarly to a location trigger, but usually with more accuracy—for example, if you live in an apartment then when you connect to the Wi-Fi network there, you will usually be closer to home than a GPS trigger would indicate. I like to use this for triggers I should run when I get home rather than in the vicinity of my home.

  • Bluetooth: If you have ever wanted Music to open when you connect your AirPods to your device, you can use the Bluetooth trigger to prompt you to do just that.

  • NFC (automatic): NFC (Near Field Communication) is a passive data storage system that uses the proximity of specially designed objects to trigger sending and receiving data. NFC is commonly used for wireless payment systems (including Apple Pay), but has many other uses as well. NFC stickers, which you can apply to any object, are an easy way to use this technology as a trigger for Shortcuts. (In general, it should be possible to use any kind of NFC tag, or even card such as a work ID, debit or credit card with contactless payment, or even some car keys.) For the best experience you want an empty tag—one that doesn’t prompt your iPhone to do something when you scan it. Shortcuts does not write to the tag; it just scans it and registers the ID on your device to know which automation to run.

    To use an NFC tag of any kind, scan or hold your iPhone near the tag and it recognizes the ID of the sticker, which triggers the automation. You don’t need to tap your iPhone on the NFC tag. (Note that the reader is right next to the camera at the top of your device.)

    This trigger is available only on the iPhone XR, Xs, XS Max and 11, 11 Pro, and 11 Pro Max (and presumably later models). Earlier iPhones from the iPhone 7 and onwards are capable of reading NFC tags, but as you must use an app to read them; those models cannot use tags as triggers.

    NFC triggers work only when your screen is awake, but your iPhone does not have to be unlocked for them to be read.

Device State

This collection of triggers allows us to use changes to our device to make things happen:

  • Open App (automatic): Have you ever wanted Do Not Disturb automatically enabled when you open Books or Kindle? Or screen brightness and volume set to 100% when opening something to watch a video? These are all possible if you use the trigger Open App to run a shortcut. Even if you toggle off “Ask Before Running,” Shortcuts sends you a notification to inform you that your Shortcut is running (Figure 9). If you leave “Ask Before Running” on, the notification looks the same, but you must tap it to confirm that you want the shortcut to run.

    Figure 9: A prompt to ask if you want to run your automation—in this case when 1Password opens.
  • Airplane Mode (automatic): Everyone who travels a lot and has a plane routine can take advantage of this—you might want to set your playback destination to your headphones, start a playlist, and be reminded to change the time on your phone.

  • Do Not Disturb (automatic): Turning Do Not Disturb on or off can run a shortcut. You can use the Bedtime mode, or the Schedule feature found in Settings to toggle Do Not Disturb on and off automatically, or control it manually. All these events trigger your shortcut.

Power State

New in iOS 14, you can run Shortcuts based on the power state of your device:

  • Low Power Mode (automatic): Usually when we get into low power mode, it’s at the most inconvenient of times—when we need to stay in touch with people. I like to use the trigger of low power mode being enabled to send a message to those who usually need to know, so they are aware that if I stop answering messages it’s because I ran out of battery!

  • Battery Level (automatic): If you want to enable low power mode at 30% instead of 20%, you can use this trigger to do so, or to send a trusted contact a message when your battery level reaches a specific number.

  • Charger (automatic): Want to disable low power mode as soon as you put your device on charge? Or pause your music playback when you it off charge? This trigger can let you do either of those.

Accessibility

These triggers for automation are not found in the Shortcuts app—they’re accessibility features which you can also use to run a shortcut if you so choose. To find them look inside Settings > Accessibility.

AssistiveTouch

In addition to the triggers in the Shortcuts app, there are several accessibility features that can run Shortcuts too. You can access the Touch options and enable AssistiveTouch. If you then customize the top-evel menu you can choose shortcuts to appear here and then run them easily. On a device with a pointing device attached, this menu usually appears when you right-click (or Control-click), which puts them right under your fingers.

Back Tap

Imagine, you tap the back of your iPhone three times and it gets you directions to your next calendar event, or two taps opens up an input for you to add to your grocery list. At the bottom of the Touch settings, you can enable Shortcuts or a variety of other options to run when you tap the back of your device.

Get Automation Recommendations

The Gallery tab in Shortcuts contains a whole new section called Automation Suggestions. These are based on the activities you do on your device—for example, mine recommends running a Shortcut that I use every morning at 7 A.M. every day. Tap any of the suggestions to add the automation to your device, and if possible with the automation trigger, toggle off Ask When Run for a fully automated solution.

Make Your First Shortcut with a Personal Automation

It’s time to have some fun! Here’s how to create your first personal automation:

  1. Open the Automation tab. If you’ve already created at least one automation, you’ll see a plus button in the top-right corner—tap it.

  2. Tap Create Personal Automation.

  3. Tap Time of Day and change the time to a few minutes after now.

  4. Tap the Search box, and search for Speak Text. Tap this to add it to your shortcut.

  5. Tap Text in the Speak Text action and type Rosemary says hello (Figure 10).

Figure 10: The speak text action set up for our automation.

Now, at the time you selected, a notification (similar to the one shown in Figure 9) will pop up and ask if you want to run your shortcut. If you open the notification, your device will say “Rosemary says hello”!

Home Automations

The purpose of a home automation is to control your home—lights, thermostat, and other HomeKit devices. Home automations are available to anyone in your family via iCloud Family Sharing, and even if they never use the app themselves, automations you create will be available to them. Like automations in the Home app, home automations in Shortcuts let you automate your home—but you have more control over what actions happen and if they happen. If you want to learn more about home automation then I highly recommend Take Control of Apple Home Automation by Josh Centers.

When you first create an automation with a Home trigger, it prompts you with the same things you see in the Home app—buttons to toggle lights on and off, temperature and fan controls, and more (all of this requires you to have the right devices in your house). Besides buttons you also have scenes, which control multiple accessories. We won’t use these; instead, scroll to the bottom of the screen and tap Convert to Shortcut (see Figure 11). The shortcut pre-populates with an action to set a HomeKit scene for you. You can delete this action and search through the available actions to build a shortcut that meets your needs.

Figure 11: Convert a Home automation into a shortcut.

Home automations, just like the home automations in the Home app, run entirely automatically.

There are five triggers available in this section:

  • People Arrive

  • People Leave

  • A Time of Day Occurs

  • An Accessory is Controlled

  • A Sensor Detects Something

These, combined with the actions available to us in Shortcuts, allow us to control our home more precisely. It is lovely when your lights turn on automatically when you get home, but imagine combining this with checking the light levels through a HomeKit sensor and turning on different lights for the first person versus when the next person arrives home.

Edit, Delete, or Disable an Automation

You probably won’t want a prompt every day to run a shortcut that speaks “Rosemary says hello.” (Though if you do, I will pass no judgement!) On the Automation tab, you can tap an automation to edit it.

At the top, you flip the toggle to disable or enable the automation, and you can tap the trigger (in Figure 12 this is When) to modify it. This gives you the same options as when you first choose your trigger.

Figure 12: The automation editor.

If you want an automation gone forever, then from the list of automations, swipe left and then tap Delete.

Run Shortcuts from the Share Sheet

You can also share something to a shortcut—such as a photo or text. In the Details view of a shortcut, you can toggle on Show in Share Sheet (Apple now calls this the share sheet, but Shortcuts hasn’t caught up yet with the new terminology). When this is enabled, you can tap Share Sheet Types and select what types of input your shortcut takes (including almost everything; files, photos, webpages, and more), which in turn determines the contexts in which it will be available.

Now, when you tap the share icon in one of the contexts you enabled, such as a photo, your shortcut is an option in the bottom half of the list (Figure 13).

Figure 13: A shortcut to share as PDF in the share sheet.

There are lots of uses for this—for example, you can make a PDF and then share the new PDF, or can take Photos and resize all of them, rotate them, zip them, and then email the archive.

A shortcut can accept one or many types of input (Figure 14). This allows it to appear in the share sheet everywhere or just in selected apps—for example “Safari web pages” means the shortcut would be accessible only through Safari’s share sheet—and not through, say, Photos.

Figure 14: Input options shortcuts can accept.

Shortcuts that can accept input can also be run with other methods—such as from Shortcuts itself, so you may want to design these to check for input and then ask for it if none is provided (see Convert and Share Image for one example).

To control whether the shortcut should appear in the share sheet (Share sheet), tap the More button in the shortcuts editor or tap and hold a shortcut and open the Details view. Here you can enable or disable the shortcut in the share sheet, as well as specify that it should accept only images, or that it can accept files and PDFs. If your shortcut accepts input, you can also adjust the types in the shortcuts editor.

Run Shortcuts from Spotlight

Spotlight search also reveals your shortcuts in the results (see Figure 16) and asks for confirmation before running your shortcut. Spotlight allows you to use fuzzy searching, so you might type document pages but your shortcut “New Pages Document” will show up too.

Figure 16: A shortcut in a Spotlight search.

Use Siri Triggers

To use Siri to run a shortcut, give Siri the shortcut’s name (for example, “Hey Siri, Daily Agenda,” where Daily Agenda is the name of your shortcut). If the shortcut requires input or selections (such as choosing from a menu), these are presented to you in the new to iOS 13 Conversational Siri format—for example, Ask for Input asks you your question and allows you to respond with your voice. Menu items aren’t read out; instead, the prompt is read and you must either read the screen or remember the options and say the name of the correct entry (Figure 17).

Figure 17: Providing input to a shortcut through Siri.

This is also how you can run Shortcuts on your Apple Watch—though this does not work on older Apple Watch models.

If you want to have multiple Siri triggers for one shortcut, create other shortcuts with the alternative names and use the “Run Shortcut” action in them to run the original Shortcut—you could duplicate your shortcut, but then if you make any changes, you have to make them everywhere.

Run Shortcuts on Apple Watch

New with iOS 14 and watchOS 7 is Shortcuts on Apple Watch. A smart folder of Shortcuts on your watch is available on your iPhone. To add a shortcut to your Apple Watch, tap the More button in the shortcuts editor, and then toggle on Show on Apple Watch. This adds the shortcut to the smart folder, and syncs the Shortcut to your watch. In the Shortcuts app on your Apple Watch, tap any Shortcut to run it, or request it by name through Siri.