Previously known as Workflow, Apple’s Shortcuts app give you the ability to automate actions in an app and even between multiple apps. As a programmer, this appeals to me because it allows me to automate common actions but it’s really useful for anyone.
I’ll introduce you to a few shortcuts that might be useful but I’ll also highlight some of the actions that make shortcuts both simpler and more powerful.
Log your medication and vitamins
Creating a log of when you take your medication or vitamin supplements is easy enough in the Health app if it’s designed for single measurements rather than a bulk import. Not ideal for complex medicines and multivitamins. Shortcuts makes this really easy.
With the tap of a button, you can log as many health samples as you need, just chaining the action multiple times. Here's an example of how the actions stack up with just a handful of the ingredients of a multivitamin effervescent tablet:
Using a shortcut like this can cause problems, however if you're forgetful or make a mistake. For items you should take daily rather than multiple times a day. Read on for how to make use of if statements and how to stop a shortcut.
Clear your clipboard
I came across this Shortcut recently and thought it was a really interesting one. There aren't many use cases but the one cited was for when your phone is for both work and personal use. You may find that you sometimes copy things to share with friends that you wouldn't share with colleagues. With just a tap, you can clear your clipboard by just creating an empty variable and put that into the clipboard.
Google image search 1
This particular shortcut is designed to be accessed through the share sheet when looking at a photo that will perform a Google image search to help find similar images but with a tweak you can check if an image has been passed in and if not, prompt to select one.
As this is one of the more complicated shortcuts I use here's a quick explainer of some of the steps it takes:
- Expecting an image, the image then gets stored ready for use
- Check IF there's at least 1 image available
- If there are 0 images, prompt to select one
- Set the URL that the image will be sent to (Google)
- The next 6 steps prepare the image for Google and generate the final link you need to be able to go to the image search
- Finally, open the results page in Safari
Log your weight (St & lb to Kg)
Logging weight with the Health app is pretty easy but only if you measure in Kg so I put a shortcut together to convert stones to Kg. I grew up using stones and pounds when weighing myself so rather than trying to use multiple apps or guesstimating, I'll let Shortcuts do the hard work. I can prompt for the stones, then the pounds and convert those numbers into Kgs and pop them straight into the Health app!
This shortcut asks you to input the stones, then the pounds. Once you've done that it will convert the number of pounds into a fraction of stones, combine and convert to Kg. Download this shortcut by clicking on the image above.
Combining Shortcuts and HomeKit
You can use Shortcuts to run a Scene in the Home app as part of a shortcut but sadly that's as far as it goes. I came across a shortcut which checked the time of day before deciding to run the Scene or not2.
I mentioned both IF statements and the ability to stop a shortcut, so lets look at them in some more detail to see what kind of power they can give you.
Like in any programming language, the IF statement not only allows you to check if something is 'true', but it also (optionally) allows you to run something different if it's not.
In the logging medication example, it's very useful but I find myself wondering if I've hit the button or not today. Open the Health app and checking doesn't take a lot of energy, but with an IF statement at the top, I can check if I've logged one of the values already today and then just stop it there. If I haven't, then carry on and log all the samples.
Stop a shortcut
Sopping a shortcut takes no input and has no output. When this action is reached nothing else will happen so it's really useful, especially when combined with an IF statement. Here's how you can use them together:
Let's walk through what's happening here:
- Fetch a single health sample, in this case today's Calcium
- Take the output and IF it is greater than 0
- Exit the shortcut
You could do something different with an 'Otherwise' statement, but that's overkill for this as we just want to stop.
I find notifications in shortcuts most useful when testing, but they have real use in some cases too. Once you've got the information you need from your shortcut, at any point in the process you can send yourself a notification.
Against each shortcut you can not only assign a name, colour and icon but now you can associate a phrase that Siri can listen out for meaning you can run shortcuts with just your voice.
Workflow integrated with a few apps but with the rebrand and Apple previewing the rebranded app at the 2018 WWDC, more and more apps are rolling out support.
There are two big frustrations for me, the first is that the Home app has very limited integrations, only allowing a scene to be run. The Home app itself lacks the ability to toggle a scene, but then not being able to control a HomeKit device seems like an obviously missed piece of functionality. As we've seen with the Weather app, this could change, but it should be there now.
The second is the way you run your shortcuts. Siri is a nice addition which boosts the power of Apple's assistant, and the Today widget is very useful when the phone is unlocked. It's sometimes more temperamental when it's unlocked forcing you to unlock to finish the action. Using the share sheet has been hit and miss for me. Yes it works, but then I've found my shortcuts to be far more complicated than I'd like so I've pretty much abandoned that approach. Sadly, there's no way to schedule a shortcut to run...
Being able to automate is key to the Home app's functionality and seems like a missed opportunity for Shortcuts. Yes, with a few words or taps I can run but for something I'd like to do daily, automation is a necessity. Who knows, maybe we'll see it in a future update?
If you use Shortcuts or have been inspired to create something, let me know!
|More from 1 Thing A Week|
|« The Polestar 1||Blind smartphone camera test 2018 »|