Automations
Over the past year, Apple listened to feedback from the Shortcuts community and implemented what has perhaps been the most commonly requested feature: the ability to run shortcuts automatically, sometimes even in the background, using triggers. Called Automation, this feature is arguably the most powerful enhancement to the Shortcuts app this year, unlocking a new layer of personalization wherein your devices can now react to changes in conditions and perform custom tasks on their own. It is the fulfillment of Shortcuts’ vision of the programmable assistant, and I believe it inaugurates a new chapter for automation across all Apple platforms.
However, despite the anticipation surrounding it, Automation in Shortcuts isn’t launching with iOS 13.0 today: to take advantage of the best new feature in the updated Shortcuts app, you’ll have to wait until iOS 13.1.
For the past few months, I’ve been using a series of automations on my iPhone, iPad, and HomeKit hubs to perform automated tasks I’ve always dreamed of being able to execute in the background without my input. So even though automations aren’t included in today’s iOS 13 update, they’re part of a bigger story around Shortcuts and its role in the modern Apple ecosystem, and I want to explain why.
Personal Automation
There are two types of automations supported in iOS 13.1: personal and Home automations. Both can be set up in the Automation tab of the Shortcuts app; Home automations can also be created and managed in the Automation section of the Home app; all your existing Home automations will also appear in Shortcuts.
Personal automation consists of shortcuts that are run, either in the background or following your manual confirmation, after a trigger has fired off. There are three main types of triggers: Events, Travel, and Settings; the Events and Travel triggers are largely inspired by similar triggers available in the Home app for time of day or location, and they’re configured the same way in Shortcuts; everything else is all-new.
Here is the complete list of triggers so far supported by Shortcuts in iOS 13.1:
Events
- Time of Day: You can run a shortcut at a specific time of the day, down to the minute, with relative thresholds available for sunrise and sunset times (like in the Home app). You can also set repeating schedules for days of the week.
- Alarm: Run a shortcut when an alarm is stopped or snoozed. You can choose from any alarm, a wake-up alarm, or a specific alarm from the ones already configured in the Clock app.
- Apple Watch Workout: In this case, a shortcut will run when a workout recorded on your Apple Watch starts, ends, or both. You can choose from any workout or a specific workout type supported by watchOS.
Travel
- Arrive: Run a shortcut when you arrive at a specific location. Like in the Home app, you can specify a time range during which the location-based trigger will be active.
- Leave: Same as above, but for leaving a specific location.
- Before I Commute: This one is interesting. Using Siri’s intelligence, this trigger will try to predict when you’ll be commuting to work or back home. You can then choose to trigger the automation at either the predicted time, or 5, 10, 15, 30, or 60 minutes beforehand.
- CarPlay: Connecting to or disconnecting from CarPlay can trigger an automation.
Settings
- Airplane Mode: When turned on or off.
- Wi-Fi: Run a shortcut when connected to any or specific Wi-Fi networks.
- Bluetooth: When connected to any or specific Bluetooth devices, including Bluetooth car units.
- Do Not Disturb: When turned on or off.
- Low Power Mode: When turned on or off.
- NFC: With this trigger, you’ll be able to run a shortcut by scanning an NFC tag with your iPhone. Any compatible NFC tag is supported by Shortcuts, including NFC stickers you can buy inexpensively on Amazon or the chips embedded within amiibo figurines or contactless cards (because why not). Modern iPhones (XR, XS, 11, and 11 Pro) can scan NFC tags in the background from anywhere in the system without having the Shortcuts app open in the foreground, a capability that is not available to third-party apps yet.
- Open App: Run a shortcut every time a specific app is opened.
As you can see, Apple didn’t build automation support in Shortcuts by adding a couple of frequently requested triggers such as location and time of day: they went all-in with a full library of triggers that tap into an iOS device’s location, status, wireless connection, apps, and more. Obviously, this deep integration between hardware, user interaction, and software is something that only Apple can do in a secure, high-performance environment. The triggers supported by Shortcuts are infinitely more reliable, secure, and integrated with the system than anything Launch Center Pro or Launcher could ever ship, making those apps’ custom implementations of schedules and routines to run shortcuts instantly obsolete in iOS 13.1.
There’s an important distinction to be made regarding the different kinds of personal automations you can create. Not all personal automations can run in the background without user confirmation, which is likely going to be a contentious point of debate in the Shortcuts community. Here’s a basic rule to keep in mind: if a trigger depends on an environmental condition outside of your direct manipulation, you’ll have to confirm running a shortcut by tapping a notification.
However, if an automation’s trigger is the result of an action you have physically performed outside of Shortcuts, you can disable an ‘Ask Before Running’ toggle in the automation editor, which will allow the automation to run in the background without requiring user confirmation (but you’ll still see a notification when a shortcut runs automatically).
So how can you tell whether or not a trigger supports background execution? It comes down to whether the trigger is based on something that happened to your device or that you made physically happen with your actions.
For example, shortcuts based on a schedule will always require an extra confirmation step before running: as far as I know, humans can’t directly control the passing of time; a specific time of day is an environmental condition that happens at some point during the day, and Apple wants to ensure you’re aware that an automation is about to run by confirming it. The same is true for other conditions that are not the result of a direct user action: if your phone connects to a Wi-Fi network or Bluetooth accessory in the background, you’ll have to manually confirm an automation; if your location changes because you’re on the move and not necessarily paying attention to your iPhone, Shortcuts will require you to confirm an automation too.22
With this in mind, here are the triggers that support confirmation-less mode in iOS 13.1:
- CarPlay
- Airplane Mode
- Do Not Disturb
- Low Power Mode
- NFC
- Open App
- Apple Watch Workout
- Alarm
With the exclusion of CarPlay, all of these triggers are based on actions the user has to physically perform on a device’s screen, by running another shortcut with Siri, or by tapping an iPhone against an NFC tag.
I understand Apple’s position regarding triggers and background execution. The company likely didn’t want to introduce a feature that made it possible for automations to run unfettered in the background, particularly in the first release of an app that just got pushed to the Home screens of millions of people. The current limitations, though tedious for power users, are reasonable boundaries for the masses.
That said, I wonder if Apple could have found ways to mitigate the annoyance derived by confirming automations for expert users who know what they’re doing. There’s a larger discussion about Apple’s security concerns and permission dialog obsession here (more later); in the case of automations, I would have liked to see an “expert mode” to outright disable confirmation steps. Or perhaps Shortcuts could learn from my usage: if I manually confirm an automation enough times each week, maybe the app could prompt me to disable the extra step the next time it runs.
Despite these minor criticisms, I’ve been taking advantage of automations to great effect on my iPhone and iPad. My automation setup is still a work in progress, but I’d like to share some examples that should give you an idea of the power and flexibility of triggers combined with Shortcuts.
You don’t need to craft complex series of actions for an automation to be useful. In fact, some of my favorite automations run shortcuts made of 2-3 actions that perform something consistently and quickly, so I don’t have to. For example, whenever I finish a workout with my Apple Watch, Shortcuts adds a reminder due in 5 minutes to remind me to drink at least three glasses of water. It’s easy for me to get lost in stats measured by my heart rate sensor and forget to hydrate properly after a run; with this automation, a reminder will be created without confirmation, and all it takes is two actions.
In the Shortcuts app, you can set up an automation by either creating a new shortcut from scratch, or you can use the ‘Run Shortcut’ action to run one of your existing shortcuts. You can, of course, mix and match both techniques in the same shortcut as well. A good example of this approach is the automation that runs when I start a workout: first, Shortcuts sets the playback destination to my AirPods; then, it brings up a menu that lets me choose whether I want to listen to some podcasts or shuffle my Workout playlist. While the workout playlist is fetched using a single Music action, podcasts are based on an external shortcut (which I will share below) that is called via the ‘Run Shortcut’ action. This way, I was able to recycle an existing shortcut without setting it up again inside the automation editor. Even though this automation has been set up without confirmation, because the shortcut requires me to pick from a menu, the Shortcuts app will automatically launch on my iPhone and bring up the menu as soon as a workout starts.
One of my most used automations is a single-action shortcut: whenever I open Podcasts on my iPhone, the volume is set to 100%. I always want to listen to shows at full volume, especially because Apple’s Podcasts app doesn’t have an Overcast-like voice boost mode; this automation maxes out the volume every time I open it without having to do anything else. I just need to make sure I don’t open the app while my iPhone is streaming to the HomePod.
Another automation based on the ‘Open App’ trigger is the one I have for the TV app. I never watch shows or movies with the TV app on my iPhone, which means that if I open it, it’s because I need to buy a movie or TV show episode I’m about to watch on the big screen. Thus, when the TV app on my iPhone launches, the Apple TV wakes up and opens its own TV app.
Speaking of simple automations: another favorite of mine is the one that, when I arrive at the supermarket, opens my Grocery list in the Reminders app:
Since I discovered that Apple added proper NFC support to Shortcuts for triggers, I’ve started placing compatible stickers around the house, as well as in my car, to execute automations with a single tap of my iPhone.23
In the past, I played around with NFC triggers in Launch Center Pro, but due to system limitations, the app could only bring up a notification upon a successful scan, forcing me to tap it to launch a URL scheme, which could potentially open the Shortcuts app and execute a shortcut. In iOS 13.1, as I mentioned above, Shortcuts’ NFC triggers require no confirmation and you can scan tags from anywhere, including the Home and Lock screens (if authenticated).
In the Shortcuts app, any empty NFC tag works as an automation trigger: Shortcuts doesn’t need to read any data off the tag, nor does it need to write data to it – it only uses NFC as a trigger to run other actions.
One of the first NFC-based automations I set up was a simple shortcut that sets my playback destination to a specific HomePod, sets the volume to a certain level, and starts playing an Apple Music playlist on shuffle. This way, when I tap the NFC sticker next to the kitchen table, music starts playing at a relatively low volume through the HomePod in the kitchen, providing some nice background music if we have guests over. This automation takes about three seconds to run and Shortcuts performs every action on its own without having to launch the main app or request my authorization to run. It’s a great way to start playing music for those times when I don’t want to talk to Siri, and I especially appreciate the ability to set the output volume beforehand.
I have a similar setup with the NFC sticker I attached to my nightstand (it’s an anti-metal one that works with my metal nightstand from IKEA). This one, however, also turns on my ‘Red Bedroom’ light scene via the ‘Control My Home’ action. With this automation, in addition to shuffling our favorite before-bed playlist on the bedroom HomePod, Shortcuts also dims the lights and turns them red, which helps us fall asleep.
For the NFC sticker I attached next to the window control buttons in my car on the left side of the driver’s seat, I reused the same approach of the ‘Workout starts’ automation. There are two kinds of actions I typically want to perform when I’m in my car: if I’ve just gotten home, I want to let my girlfriend know by sending her a text message; or, if I’m about to drive somewhere, I may want to put on some music or play a podcast. Because I don’t have a CarPlay-enabled car, and because this automation can’t rely on car Bluetooth as a trigger (if I just arrived home, it means my iPhone has been connected to the car’s Bluetooth system for a while), it made sense for me to use a sticker as a trigger in the car.
To accommodate both use cases, the shortcut associated with the ‘Car’ NFC trigger uses a ‘Choose from Menu’ action that lets me pick between sending a message to Silvia or running another shortcut to pick between music and podcasts. As soon as I tap the sticker with my iPhone, the Shortcuts app instantly launches and the menu comes up. The message to Silvia is pre-filled and has the ‘Show When Run’ toggle disabled, so it can be sent in the background without having to tap ‘Send’ in an iMessage composer window. Alternatively, the playlist shortcut that runs as a function displays another menu with options to shuffle a playlist or play one of my podcasts.
I have a lot more ideas for NFC I’d like to experiment with. I want to place a sticker on my microphone stand, so I can prepare my desk for podcasting just by tapping my iPhone on it; I want to explore the idea of scanning the NFC chip built into the Sony headphones I use with my TV to wake up the television and open a specific app or channel through HomeKit (and homebridge); I may even consider creating a set of NFC stickers, each with a different color or icon on it, that invoke specific timers for time tracking via Toggl.
I see incredible potential in blending the physical world and Shortcuts via NFC and automation; playing around with all of this has been a lot of fun, and it made me appreciate the time savings granted by Shortcuts even more.
Home Automation
Apple’s other automation initiative in iOS 13.1 is the ability to run custom shortcuts as HomeKit automations directly on HomeKit hubs that work for everyone in the home. This is going to be a big deal for advanced home automation, and it shows how Apple now considers the Shortcuts app a proper framework to be shared across different areas of iOS.
When you create a home automation in iOS 13.1 in either the Home app or Shortcuts, in addition to controlling scenes and individual accessories, you’ll be able to execute custom shortcuts once a trigger fires off. But there’s a twist: unlike personal automations, shortcuts for home automations are completely separate from the Shortcuts app – they run directly on HomeKit hubs (iPads, Apple TVs, and HomePods) as they must be able to execute actions even when you’re not home.
This means a few things. First, parts of the Shortcuts app have been integrated with platforms capable of managing HomeKit automations: you’ll find a Shortcuts UI to create custom home automations in macOS Catalina, for instance, even though there is no official Shortcuts app for Mac. Second, because these shortcuts are entirely separate from the Shortcuts app as they need to run on HomeKit hubs, they don’t have access to your Shortcuts app’s library, nor can they present actions that require user interactions. For similar reasons, these shortcuts can’t use actions from third-party apps and they can’t fetch files from iCloud Drive.
Therefore, when creating a home automation that runs as a custom shortcut (in both Home and Shortcuts: Automation ⇾ New ⇾ (select trigger) ⇾ Convert to Shortcut), you will only have access to a subset of Shortcuts actions, which can run independently and without user input. Additionally, you will not be able to reuse existing shortcuts with the ‘Run Shortcut’ action: you’ll have to create shortcuts from scratch choosing from a smaller selection of actions.
With this in mind, the potential opened up by the ability to execute custom shortcuts as part of a HomeKit environment is immense, and I’m still wrapping my head around all the possible combinations of HomeKit accessories and conditions paired with shortcuts. But I have some fascinating examples to share.
Over the past year, I’ve purchased a handful of Eve buttons, which are programmable buttons that can be assigned different automations in Home depending on whether you perform a single press, a long press, or a double press. Before iOS 13.1, I only used these buttons to turn my lights on and off.
With the ability to run shortcuts in home automations, I’ve rethought the role of my Eve buttons, which now serve as physical switches to make my lights a certain color and start specific timers via the Toggl API. The most powerful aspect of custom home automation in iOS 13.1, in fact, is the ability to use the ‘Get Contents of URL’ action to have HomeKit hubs interact with any web API even while you’re not around. When I discovered that this was possible, I refactored my existing Toggl shortcuts, configuring them again inside the Home app as automations; as a result, the Eve button in the kitchen can now turn the lights green and start the ‘Writing’ timer on the Toggl web service whenever I press it once.
I spent the summer setting up these web-based automations inside HomeKit; I think it’s incredible that with the press of a physical button, my home can now issue requests to web APIs and combine those with other home-related actions. But I’ve also gone beyond the Toggl API and the Eve buttons.
Earlier this year, we set up a HomeKit security system based on the Aqara hub combined with a separate (and very loud) siren I bought from Amazon, which is hooked up to HomeKit via a smart plug. There are, obviously, multiple window/door contact sensors around the house that trigger the security system when it’s armed. Thanks to custom shortcuts in Home automations with iOS 13.1, I’ve been able to add SMS and Pushover notifications to the security system. Now if a window/door sensor triggers when nobody’s home, in addition to triggering the siren and Aqara hub simultaneously, HomeKit will contact the Twilio API to send SMS alerts to my girlfriend and me with a custom message and timestamp; in addition, the automation will turn on all the lights, and perform a second web API call – this time to Pushover, which will send us a second batch of emergency push notifications about a possible intrusion.
I was happy with the security system I set up earlier this year, but I was missing the built-in integration with SMS and push notifications that other proprietary services offer. Thanks to custom shortcuts in home automations, my DIY solution is now more powerful – and likely more reliable – than third-party alternatives as it can send all the notifications I want and perform any arbitrary number of actions via custom shortcuts. I control every part of the experience, and everything is based on the combination of HomeKit and Shortcuts.
These are just two examples of the versatility of custom home automations powered by the Shortcuts framework in iOS 13.1, but I think they should give you a good idea of what’s coming. As with personal automation, I’m still experimenting with all of this, and I will have more to share later this year – especially once HomePods and AirPlay 2 speakers will be able to join in on the fun.
I always hoped that Apple would allow users to run shortcuts automatically, and I knew that the Shortcuts app could be well-suited for advanced home automations. For both personal and home automations, iOS 13.1 goes beyond my wildest expectations for either feature, allowing for a greater degree of freedom than I anticipated. It’s too bad that automations aren’t launching today alongside iOS 13, but it’s important for Apple to get these functionalities right before shipping them to millions of customers.
I’m convinced that automations will play a fundamental role in the future of the Shortcuts app and system framework; they’ll be worth the wait.
Sharing and Privacy
With iOS 13, Apple has imposed tighter security restrictions on custom shortcuts. This doesn’t come as a surprise following some examples of shortcuts accessing hidden system data that were shared on social networks last year (which I will not link), and I understand Apple’s underlying concerns; for most people, especially considering the influx of new users in iOS 13, I think Apple’s privacy and security restrictions are reasonable. For longtime users of the app – the folks who have advocated in favor of iOS automation and Shortcuts for years – there are, however, some unfortunate downsides worth mentioning.
iOS 13 brings a fundamental change to how permissions are granted to shortcuts that want to access personal user data. In the new Shortcuts app, permissions are scoped to individual shortcuts: if you download a shortcut shared by another user, you’ll be asked to authorize access to personal data (such as Reminders, Files, Health, and, new in iOS 13, actions from third-party apps) for the first time on a per-shortcut basis. If you create a shortcut yourself, permissions are implicitly granted and you won’t be asked to authorize access to a certain feature with a permission prompt: after all, you have to drag actions manually into the Shortcuts editor; Apple uses that action as an implicit signal of trust.
The exception to these rules is the ‘Get Contents of URL’ action: even if you create a shortcut yourself, you’ll be asked to grant the shortcut access to the Internet with a permission prompt. Additionally, the ‘Get Contents of URL’ action requires you to grant access on a per-domain basis; if you have multiple shortcuts that work with the same web APIs, you’ll have to grant access to every shortcut and every website the first time you run each one – even if you created them.
With this new system based on granting permissions to individual shortcuts, Apple has changed how you can review permissions granted to the app. In addition to checking which system features the Shortcuts app has access to under Settings ⇾ Privacy, you can now review permissions for individual shortcuts in a shortcut’s Details screen. Here, you’ll find the features and apps each shortcut has access to, and you’ll be able to revoke those permissions with the flick of a switch.
Let me be blunt: as someone who knows what he’s doing with Shortcuts and always checks the actions of shortcuts shared by others, these permission prompts annoy me. In what has become a trend with macOS Catalina too, I feel like I’m being constantly asked to grant permission to something I’ve already authorized; even though that is not technically true, the barrage of similar prompts for someone who has hundreds of shortcuts in their library results in inevitable frustration and lack of attention. It’s the Windows Vista problem all over again: when everything brings up a permission prompt, the easiest solution ends up being a mindless tap on the ‘Okay’ button to get the computer out of your way.
But here’s the thing: I can’t blame Apple for implementing these permission prompts and making them the default behavior in iOS 13. I pay close attention to the Shortcuts community, both on Twitter and Reddit, and over the past year I’ve seen some questionable uses of the ‘Get Contents of URL’ action to call remote servers and install .shortcut files on a user’s device without going through iCloud.com. I’ve always fought against the idea of adding these kinds of external dependencies to my shortcuts, and it bothers me to see folks sharing shortcuts that contain hidden web API calls or actions masqueraded as one thing, yet performing something else entirely. In some ways, Apple cracking down on permissions and access to remote URLs was the only possible outcome. I feel like we should be grateful that Apple didn’t outright remove certain actions following some of the shortcuts that have been shared over the last 12 months.
Which brings me to sharing. In iOS 13, installing custom shortcuts shared by others is disabled by default. It is still possible to install shortcuts shared by other people – such as the shortcuts in the MacStories Shortcuts Archive – but you’ll have to enable a setting called ‘Allow Untrusted Shortcuts’ first. And for the setting to even appear, you need to have run one or more shortcuts already – either from the gallery, via an app’s ‘Add to Siri’ UI, or one that you created yourself. After that, ‘Allow Untrusted Shortcuts’ will become available under Settings ⇾ Shortcuts ⇾ Sharing Security, and you’ll be able to install shortcuts made by others.
As someone who’s been advocating for iOS automation and sharing hundreds of workflows, then shortcuts, with readers for years, my perspective on this is obviously biased. I get the sense that folks at Apple must have gotten seriously concerned about the security implications of sharing shortcuts; like I said, I can understand where they’re coming from. But I also can’t shake the feeling that disabling installation of shared shortcuts by default, paired with the menacing wording chosen by Apple, may do more harm than good to the Shortcuts community in the long run. And I hope I’m wrong.
Let’s take a look at the measures implemented by Apple. First, as I mentioned above, the ‘Allow Untrusted Shortcuts’ option isn’t listed in Settings by default; it has to be enabled after running a shortcut for the first time. Once the setting is available, enabling it requires typing in your device passcode – not even Face ID or Touch ID are supported. If you don’t enable untrusted shortcuts, tapping on an iCloud link to a shortcut (which is now the only way to install shortcuts) displays a message with no actionable information. In that case, you’ll only be able to install shortcuts from Apple’s gallery.
If you have enabled untrusted shortcuts and tap a link to a shared shortcut, you’ll be presented with a window that features a scary red ‘Add Untrusted Shortcut’ button. If the button wasn’t enough to make it look like you’re about to do something terrible to your device, some helpful explanatory text reminds you that untrusted shortcuts “can put your personal data at risk”. Except that’s not technically true because every personal action is gated by permission prompts on a per-shortcut basis now, but I digress.
When looking at these limitations on sharing, it’s hard not to get the feeling that some people at Apple regret having allowed the Shortcuts app to continue installing shared shortcuts last year. And that, over the past year, others have fought and debated internally to find an acceptable compromise to keep installation of shared shortcuts available, albeit in a limited, semi-hidden form.
As I argued for personal automation, and as others have suggested regarding the permission prompt fever of macOS Catalina, I wish there was an “expert mode” to give advanced users the peace of mind of using a computer as they always have, with fewer roadblocks that get in the way of using an app they’ve learned to master over the course of five years since Workflow originally launched. I believe that expert users – the people reading this very paragraph – will learn to live with Apple’s tighter restrictions, and they’ll continue to install shortcuts made by others, but one thing’s sure: this whole process doesn’t spark joy.
Looking at the big-picture motivation behind these changes, I’ll say this: Apple knows better than us users when it comes to security and privacy, and we trust them to do what’s best for us, even if we don’t understand their decisions right away. My only hope is that Apple remembers that the creativity of Shortcuts users is not the enemy. Part of what made Workflow special, which is still true for Shortcuts today, was the community – the people who advocated for automation, helped others by sharing shortcuts, and made iOS a more enjoyable operating system by enhancing it with Shortcuts. To put an end to that creativity and communal aspect of Shortcuts would be in Apple’s power, but it would also be a shame. I’m happy that sharing is still supported in Shortcuts today; I hope Apple won’t go beyond what they’ve done this year.
Now, let’s move on to a happier topic: while I still can, I have some shortcuts to share.