Create Personal Automation in Shortcuts

Tiny Tip – Hocus Focus by Mike Price

Let’s begin with my “original” problem to be solved and some background.

When I show up to church each week, I never want to end up being “that person” whose phone or watch starts making a ruckus in the middle of mass. So for many years, I have used Do Not Disturb to keep my devices shushed and I have loved the fact that when I set DnD on the watch, it updates the phone as well. But, I never liked needing to remember to manually activate DnD.

When Apple introduced the Shortcuts app and Personal Automations on iOS, I thought I had my solution. Unfortunately, Apple has prevented location-based automations from running without intervention. I understand the potential risk of automatically executing an automation solely based on location but advanced users should be able to accept this risk for themselves.

And the real kicker is that iOS does provide an override switch to allow for exactly this operation using other automation triggers, like NFC. For the last several major and minor versions of iOS, I have been hoping that this restriction would be eliminated. But alas, even up through iOS v15.1 my location-based automation that sets DnD only gives me a popup when I pull into the parking lot. Why not let me decide, Apple?? – Ugh!!

However, all is not lost!! One of the new features of iOS 15 is Focuses (In the Settings app) and a focus can be automatically controlled based on location only! So my teeny-tiny tip is that you can modify the built-in “Do not disturb” focus to automatically turn on/off based on a particular location. So now, my DnD will automatically enable when I arrive at church without any help from me. Finally !!

Now you may be thinking….”that’s nice Grumpy, but I want to have my device automatically do something other than activate Do Not Disturb when I arrive at a location”….well, I have a little hack for that too. Since, as we have already covered, a Focus can be controlled based on location without manual intervention AND since a focus-changing state can be set as a trigger for a personal automation which also allows the user to disable the “Ask Before Running” setting….we can combine these allowing one to do pretty much anything based on location only, without manual intervention.

One downside of this trick is that a Focus does not provide an “allow ALL” for notifications from people and apps. So, my suggestion would be to just set the focus to have the default settings. The trick/hack below will use a focus to kick off an automation and, assuming you do not want the focus to alter notifications, the automation will first turn the focus off, thereby restoring normal notification behavior.

To run a general-purpose automation/shortcut automatically based on location:

  1. Create a custom focus and set the focus to automatically turn on based on the desired location. I should also note that since the focus is just a hack to get the personal automation to run without intervention, set it so that it is NOT shared on all your devices.
  2. In the Shortcuts app, create a personal automation with a trigger set to when the focus gets turned on. The actions in the automation should be:
    a. Turn the focus off
    b. Execute all other desired actions, including running complex shortcuts.

So there you go, personal automations and shortcuts can now run automatically without intervention based solely on location. Thank you, Apple, though I am not exactly sure this is what you intended.


I explained to Mike that I’m not a Shortcuts aficionado yet, and I haven’t gotten the hang of the different Focus mode options so I needed a bit more hand-holding on his instructions. Using the documentation app Folge, he took some screenshots, annotated them and added some written instructions and created step-by-step instructions for us.

Before starting his tutorial, create a focus mode and give it a name. Set it to turn on at a specific location.

Personal Automations

So there are two things bundled into the shortcuts app since iOS v14 (I think Shortcuts was introduced in v13….if only there was a way to research this…)

  • Shortcuts – the “program-like” scripting language that was formerly Workflow
  • Automations – Automations has 2 sections.
  • Home: This is where all of the automations for the Home app show up.
  • Personal: Personal automations are “on device” automations.

Shortcuts run manually. You can put them on the Home Screen or in the Share Sheet and select them when needed.

Personal Automations (like Homekit automations) will run when triggered.

1 Create a Focus

  1. Open Settings → Focus and tap the + button in the upper right.
  2. Choose Custom
  3. Choose an icon and color and give your focus a name. We’ll use Test as an example
  4. Set allowed people and allowed applications both to your desire
  5. Set to turn on automatically when at a location

Plus button on Focus

2 Create a Personal Automation

Open the shortcuts app and select Automation

select automation on Shortcuts

3 Click Plus Button

…and click the + to add a new personal automation

Plus button on automation

4 Create Personal Automation

create personal automation

5 Trigger on Focus Mode

Select the trigger source for the automation. For the purposes of the Tiny Tip, scroll down to the section for the Focus triggers. Here you will see all the focuses you have on the device.

Scroll to focus modes

6 Choose the Focus You Created

Select the focus of interest and decide if the automation will trigger when the focus turns on or off.

choose your focus

7 Specify the Actions

This is where the programming starts…

As my tiny tip indicated (poorly), the focus turning on was just a hack to get the automation to run. So the first thing we need to do is turn it back off. Then for the simple demo, I added a notification. But there are many actions I could do, including running shortcuts which can run shortcuts…..etc.

add actions e.g. show notification and turn focus off

8 Let It Go…

Don’t forget to indicate that the automation should be able to run without intervention. But be forewarned, this will do what you say simply by showing up somewhere!!

Step 7

9

The automation will default to being enabled. It can be disabled if desired.

Simply select it to edit.

Automation showing Default to enabled

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top