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.