How to use the Shortcuts app on your iPhone

Week 57 was posted by Charanjit Chana on 2018-11-26.

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.

Example shortcuts

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:

logging health samples with the Shortcuts app

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.

logging health samples with the Shortcuts app

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.

Google image search with the Shortcuts app

As this is one of the more complicated shortcuts I use here's a quick explainer of some of the steps it takes:

  1. Expecting an image, the image then gets stored ready for use
  2. Check IF there's at least 1 image available
  3. If there are 0 images, prompt to select one
  4. Set the URL that the image will be sent to (Google)
  5. 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
  6. 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!

logging weight with the Shortcuts 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.

Actions

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.

IF statements

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:

Combine the

Let's walk through what's happening here:

  1. Fetch a single health sample, in this case today's Calcium
  2. Take the output and IF it is greater than 0
  3. Exit the shortcut

You could do something different with an 'Otherwise' statement, but that's overkill for this as we just want to stop.

Notifications

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.

Siri

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.

More apps

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.

Frustrations

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!

  1. Computer World's 12 Siri Shortcuts
  2. Reddit comment by squandre

Tags: apple, apps, automation, life hack, shortcuts, apple, apps, automation, life hack, shortcuts


Tweet WhatsApp Keep Upvote Digg Tumblr Pin Blogger LinkedIn Skype LiveJournal Like