Run Personal Automation Shortcuts Automatically In iOS 14

With iOS 14 you can now trigger Shortcuts automatically without needing to confirm the action. You can set up personal automations to run at specific times or with actions like when you turn on Do Not Disturb or launch an app. However, many actions can't complete if your iPhone is locked, making this of limited use.
You can also watch this video at YouTube.
Watch more videos about related subjects: iPhone (334 videos), Shortcuts (70 videos).

Video Transcript

Hi, this is Gary with MacMost.com. Today let's look at automatically running shortcuts Automations in iOS 14. MacMost is brought to you thanks to a great group of more than 750 supporters. Go to MacMost.com/patreon. There you can read more about the Patreon Campaign. Join us and get exclusive content and course discounts.
So a new feature in iOS 14 is the ability to run automations in shortcuts automatically. In the past many automations required you to interact with your iPhone to have them run. So it was kind of pointless to say have an automation run at 9:00 a.m. only to have it just show a message on your screen asking you if it was okay to run that automation. iOS 14 fixes this. Well, kind of.
Here's a list of automation triggers that you should be able to setup to run automatically. For instance Time of Day. So you should be able to set an automation to run at a specific time and it should run without you having to confirm. As a matter of fact it should run without you having to even look at your phone. It should do it while the screen is locked. 
But it doesn't work as well as you'd think because while the automation can be triggered on automatically, a lot of the things automations do can't run while your phone is locked. So these will run automatically if your phone is unlocked and you happen to be looking at it. But if your phone is locked it's simply going to give an error. For instance, if you tried to grab the weather and then put that at the end of a Numbers file or a Note it's not going to work because writing to a Numbers file or a Note requires the phone to be unlocked.
You can't save a new file either. So doing something like grabbing a webpage at a certain time and saving its content that works great as long as the phone is unlocked. But you can't save the file if the phone is locked. So while automations do trigger at a time of day without you confirming they won't actually work.
However there are some things that you can do. For instance you can have your phone automatically go into low power mode at a time of day. Say you want your phone to be in low power mode all day while you're at work so it has the maximum amount of battery when it's the evening and time for you to go out. Well, let's go into the Shortcuts app and I'm going to switch to Automations at the bottom. Then let's create a personal automation for that. I'm going to set it for time of day. So let's set this up to be 9 a.m. and let's say at that time we want this to automatically trigger. We can also look at the bottom here and set it to weekly and just do that Monday through Friday. So I've unchecked Saturday and Sunday. 
Let's tap Next and now we can add an Action. So the Action we want to add is to Turn on Low Power Mode. So I'll search for power here and you can see there's Set Low Power Mode and it will turn it On at that time. I'll tap Next and now notice there's a switch for Ask Before Running. You need to turn that OFF else you will have to approve it every time it triggers. Tap Done and now that should automatically run at 9:00 a.m. everyday. Let me change it to an upcoming time so that we can see it trigger. So I'm going to change it here. Let's change it to a time in the immediate future. (I know it says 9:41 at the top of the screen but that's automatic when you do screen recording). But in fact it's 10:10 so I'm going to change this to go off at 10:11. Now that that's set we can observe this happening when the minute will change. So I'm going to lock my phone here so we can see it happen. You can see here it gives me an alert at 10:11 the shortcut ran. Now if I unlock my phone I could look at the top right and I could see the yellow battery there telling me that I'm in low power mode. So the idea here is that you would add another one and say at 5:00 p.m. have it turn off low power mode. 
Now strangely enough you would think that if you can't Save to file or Append to a file while your phone is locked you would think you wouldn't be able to send a message. But actually you can. So let's create one of those. I'll set this up for Time of Day and let's say have it do this at a 10:14 and I'm going to Add the Action to send a message to something really simple like that and select the recipient like that. Now it should send that message at that time. Now let's turn Off Ask Before Running. Now let me lock the phone to see this happen. So there we go. It sent the message. I can check here and see in my Messages app that it sent that and I actually did get it on my other machine. So you can kind of schedule a message to go out. You can even schedule it to go out on a specific date by tapping Monthly there. You've just got to remember to turn it Off before it gets to the next month.
Now instead of using Time you can use other things as well. So here's something that makes a little more sense. Let's have a trigger when we turn on Do Not Disturb. So when Do Not Disturb is turned on then we can send a message and it can be something like this and you could send it to somebody important so they automatically get a message when you turn on Do Not Disturb. We'll turn off Ask Before Running. Now that message will automatically get sent every time I turn on Do Not Disturb. I'll do it like that and you could see the message gets sent out.
There's so many combinations of personal automation triggers and things that Shortcuts can do that I certainly haven't tested them all to see which ones will work and most importantly which ones will work when your phone is locked. So the idea is to experiment. Think about what you want to do and try it out and see if it actually works. 
I'll do one more example here and that is to play a sound when I launch an app. So one of the triggers here is App and When an App is Opened. I can choose the app. So I can choose any app I want. But just for an experiment here we can say Choose Safari app. We'll say whenever we open Safari we want to play a sound. So I'll tap Next. I'll add an Action. Now to play a sound what I want to do is I want to get the file for the sound. So I'll go to Get File and then I'll get a file from iCloud Drive and instead of showing the Document Picker I'll pick the path. So I happen to have a file there just called Bell.MP3. That's stored in iCloud Drive in my Shortcuts folder. The Shortcuts app has access to everything in your Shortcuts folder so it's a convenient place to put things like this. Then I'm going to add Plus there and Play Sound. You see the line between the two of them. So it's going to take that file and put that into Play Sound. Now I can finish this off and when Safari is opened get this file and play it as a sound. I'll turn off Ask Before Running, so Don't Ask. Now when I launch Safari it triggers that automation and plays that sound.
Now I think a very useful technique is instead of adding actions here and building a shortcut for that personal automation instead look for the simple command to Run A Shortcut. Then select that and select the shortcut to run. For instance I have a shortcut here that sends out a message. The advantage to this is that you can build the shortcut, test it and make sure it works, and simply have the single action here that can then trigger it. This is important if your shortcut is longer than one or two actions. You don't want to have to recreate the entire thing, say if you want to do the same thing when you do a Do Not Disturb as a specific time of day. So you just create a simple shortcut to do whatever the action is and then you can add a quick personal automation for time of day and say run that shortcut. Then maybe add a Do Not Disturb automation and then have it run the same shortcut. It just makes development of these shortcuts a little easier.

Comments: 27 Comments

    Joe Quinn
    5 years ago

    Is there a shortcut to insert current date in notes or similar apps?

    Timothy Childers
    5 years ago

    Great little lesson. I love how you slipped in the idea of composing actions that can be reusable actions in longer, more complex actions. Without even realizing it, people will be grasping and using one of the key concepts of programming.

    5 years ago

    Timothy: Unfortunately no. You can easily set up a shortcut to get the date, format it, and copy it to the clipboard. Then you need to paste it. You can't paste inside a Shortcut, probably for security reasons, maybe?

    Karl
    5 years ago

    How about turning on/off WiFi when Ieave/return home automatically, how would I set that up?

    5 years ago

    Karl: Choose the trigger "Arrive" and set the location to "Home." Then set the action to "Set Wi-Fi" and use "On." Then the opposite for the second automation to turn it off.

    Karl
    5 years ago

    Gary, I did that, but it requires me to hit Run every time. I was hoping to have it do it automatically.

    5 years ago

    Karl: Ah, well unless Apple makes it a Run Without Asking automation, there's nothing you can do. What's the need for that anyway? Just trying to get a little extra battery life?

    Ron
    5 years ago

    Can I automate the task of changing a specific word in the notes field of several contacts in iCal?

    5 years ago

    Ron: So, not a personal automation, but a script that runs through your contacts, reads them, and makes changes? No. Something like that would be more appropriate for Automator on the Mac, but I think even there you are better off just making the changes manually then trying to script it.

    Adam
    5 years ago

    Great video Gary.
    I tried this with a simple daily text automation. I wasn't impressed over the last week as it didn't work. I figured I had not done something right.
    However today I was on my iPhone when 0900 rolled around and the shortcut notification come up and let me know it was running my automation.
    Question: Do I have to have my iPhone opened up when the clock changes from 0859 to 0900 for the automation to run?
    Thank You ahead of time for answering.

    5 years ago

    Adam: Maybe that's it. Maybe it needs to be unlocked, or it prompts for you to unlock. You could always experiment with that.

    Joey J
    5 years ago

    is it possible to set an automation like this: if phone is at 10% before 9:00am, set a timer for 1 second.
    i have an issue where my phone may die before i wake up resulting in my alarms not ringing.

    5 years ago

    Joey: That might be possible. Use the Battery automation for recognizing if it is below 10%, and then grab the time and use an IF statement to check it. Then only show an alert and maybe vibrate if it is earlier than 9.
    But WHY? Why would you need it? Don't you have your phone plugged in at night? So how could it run out of battery?

    Thanks Gary
    5 years ago

    Gary, we appreciate your answers, but asking "WHY" to some of those questions is pointless and - in my opinion - rude. Anyone can create whichever automation they want, and if I am "just trying to get a little extra battery life" then so be it. Also, who's to say I like/don't like to have my "phone plugged in at night". It's up to me. Please don't question anyone's motives for any automation, just keep doing the great job of helping users. Cheers

    5 years ago

    To the person named "Thanks Gary": You misunderstand why I am asking why. I ask why because of the XY Problem (https://en.wikipedia.org/wiki/XY_problem), something those of us in tech support commonly run into. I ask "why" because I want to provide better solutions to people, and that usually means I need to know why they want to do something, not just what they say they want to do. In this case, for instance, it could be that the asker has read somewhere they should not keep their iPhone charging at night, a common myth. If that is the reason "why" then the better solution is to understand that it is a myth, and not look for the automation they require. Could be other things too. By asking about the reason they want to do something (X) instead of just blindly giving instructions on how to do what they ask (Y) I can often provide better solutions.

    Deena
    5 years ago

    Day late and a dollar short but here goes. I saw a shortcut that you could run based on an automation triggered by time of day that you chose. Essentially put your phone into low power mode regardless of the batteries charge. Can’t find my charging cords half the time and if I can’t do much else… At least I can save my battery until I find it ;-) maybe that might help?

    Errol
    5 years ago

    The “Ask to run” switch screen does not appear after selecting the “Set airplane mode” automation and clicking “Next” on my iPhone 12 Pro Max running iOS 14.4. What am I missing?

    5 years ago

    Errol: Not sure. Try creating it again from scratch.

    Errol
    5 years ago

    Solved:. BOTH "events" & "actions" can prevent an automation from being automatic. Any ONE event or action that can’t be automated stops the shortcut’s auto-run. In my case, the "events" to run the "Action" (Set Airplane Mode) were "Leave" and "Wi-Fi". Apple states that the action "Set Airplane Mode" CAN run automatically. The "events" I chose PREVENT that from happening. The automation helps remind me, but it’s not efficient. I can turn Airplane Mode on or off manually with less interaction.

    Joseph
    4 years ago

    So I created an animation to send a text to the girl I was talking to every time I plugged my phone in. How can I go in and delete that animation so it stops showing up when I plug in my phone. Have a iPhone 8 with iOS 14

    4 years ago

    Joseph: I'm not sure what you are describing. What sort of animation? Do you mean "automation?" If so, just go into the Shortcuts app, tap Automation at the bottom, Then swipe right to left across the automation you want to delete.

    Ash
    4 years ago

    After working through 2 days, I have been able to set a shortcut that has HomePod announce the appointments for the day. The problem is that i need to manually trigger that shortcut (tapping the said shortcut and everything works as expected). I did an automation of time of day (say 8 AM), "run the specified shortcut". I get an alert on the phone - shortcut running, but nothing happens except a silent HomePod.

    Any suggestions would be welcome.

    RMSe17
    4 years ago

    Trying to do the following automation that I can start with a shortcut: enter loop, put phone in airplane mode, wait 10 min, airplane mode off, wait 20 sec. this needs to keep running while the phone gets locked, but it seems to stop as soon as the phone locks…

    4 years ago

    RMSe17: Looks like that won't be possible then. You'll have to find another way to accomplish whatever it is you are trying to do.

    Jake Winograd
    4 years ago

    The lack of a control to schedule a text message *just once( is a huge oversight.

    Michael
    4 years ago

    Can I create an automation that turns airplane mode on when I leave and off when I arrive? I can't use the leave function because cell data is off. Thxs!

    4 years ago

    Michael: Yes, but you'd need to confirm. Leave/Arrive isn't a trigger you can use automatically.

Comments are closed for this post.