Shortcut Examples

As with last year, the best way to understand the potential of the Shortcuts app is to download some examples, run them, and modify them to your needs.

Below, you’ll find a series of shortcuts I’ve put together specifically for this review. Most of them can be downloaded for free; the more advanced ones are exclusive to Club MacStories members and they will be shared in our newsletter later this week.

I’ve included short video demonstrations for several shortcuts shared below. Most of the following shortcuts are available – alongside 160 more – in the MacStories Shortcuts Archive.

Wake Apple TV

This is a simple shortcut that consists of two actions Apple added in iOS 13: ‘Wake Apple TV’ and ‘Show Remote Control’. Once you’ve configured the shortcut to access an Apple TV on the local network, with the tap of a button you’ll be able to wake an Apple TV and instantly display the Remote control UI on an iPhone or iPad. Perfect to start watching TV with controls on your iPhone, and best used as a widget.

Wake Apple TV

Wake an Apple TV on the local network and show the remote control for it on an iOS device. Best used as a widget for fast activation.

Get the shortcut here.

Wake TV and Set Lights

I’ve been using this other Apple TV shortcut nearly every day to wake my Apple TV when my girlfriend and I want to watch a movie or some episodes of our favorite series.

The shortcut, called Wake TV and Set Lights, wakes up my Apple TV and, if it’s after sunset, dims the lights in the bedroom by running a specific HomeKit scene that makes my lights a relaxing shade of dark blue. The shortcut takes about two seconds to run from a widget on my iPhone, but I’ve also assigned it as an automation to run when I tap an NFC sticker on my nightstand.

What’s interesting about this shortcut is the logic behind checking whether or not it’s after sunset. By default, Shortcuts doesn’t come with actions to check the time of day relative to sunrise and sunset. However, because Shortcuts is integrated with the Weather app, it is possible to use the ‘Get Current Weather’ action to get the weather forecast for your current location or any other address; the magic variable returned by the Weather action can be inspected to extract the ‘Sunset Time’ property, which can then be compared against the current time to check if the shortcut is running after sunset. Easy enough.

Comparing local sunset time against the current time of day.

Comparing local sunset time against the current time of day.

Accessing weather properties with the magic variable inspector.

Accessing weather properties with the magic variable inspector.

In terms of checking the weather for your location, my recommendation is to provide the ‘Location’ action with a fixed address rather than the ‘Current Location’ default value. If the action has to fetch your current location, it’ll have to use GPS, which takes a few seconds to run; with a fixed address, the Weather action will instantly retrieve a forecast, which is a nicer experience if you’re always going to run this shortcut at home. Thanks to the new ‘Location’ action in iOS 13, you can tap the parameter to enter a view where you’ll be able to search for any address in Apple Maps’ database – unlike iOS 12, there’s no need to use a separate ‘Street Address’ action first.

The new 'Location' action in iOS 13.

The new ‘Location’ action in iOS 13.

Once we have the location and weather forecast for it, it’s all a matter of using Shortcuts’ new conditional block to compare the current date (a default magic variable in the app) against sunset time. To do this, we just need to pick two parameters in the ‘If’ action and choose one of the new operators, the is after one, to see if we’re past sunset when running the shortcut. If the output of the conditional block is true, we can then use the ‘Control My Home’ action to select a specific Home scene to dim the lights.

Full integration with HomeKit in iOS 13.

Full integration with HomeKit in iOS 13.

Dimming the lights is just an example: perhaps you may want to turn off the AC or fan in the room, or make sure all the doors are locked while you’re watching TV at night: you can do all of this with the ‘Control My Home’ action as it brings the full power of the Home app into Shortcuts.

Wake TV and Set Lights

Wake up an Apple TV on the local network and, if it’s past sunset, dim the lights in the room.

Get the shortcut here.

Pause HomePods

Another simple shortcut that shows how automation doesn’t have to be complex to be useful: using a series of ‘Pause’ actions, this shortcut lets you pause multiple HomePods (or AirPlay 2 speakers) in one go, with the press of a button.

Pause all HomePods at once.

Pause all HomePods at once.

To configure the shortcut, you’ll need to insert as many ‘Pause’ actions as you want for all the speakers you want to control. In each action, tap the speaker name parameter, select which one to control, and that’s it. When you run the shortcut, all selected HomePods or speakers will be instantly paused at once.

I built this shortcut because I have three HomePods in my house and I wanted a fast way to pause them all. Previously, I used to rely on invoking AppleScripts on my Mac mini to control iTunes’ audio playback; with iOS 13, all I need is a ‘Pause’ action.

Pause HomePods

Pause all HomePods (or AirPlay 2 speakers) around the house in one go. The shortcut supports adding as many ‘Pause’ actions as necessary for each speaker you want to pause.

Get the shortcut here.

Set Playback Destination and Shuffle Playlist

My girlfriend and I often like to relax at night by dimming the lights in the bedroom and shuffling our favorite playlist via the bedroom HomePod at low volume. Before iOS 12, I created a shortcut to do this using AppleScripts for iTunes (running on my Mac mini server) and HomeKit scenes; now, I can set the playback destination and adjust the volume directly from my iPhone with Shortcuts.

The shortcut is comprised of four actions:

  • Set Playback Destination
  • Set Volume
  • Play Music
  • Control My Home

Everything is configured via parameters: the HomePod to set as the playback destination device is picked from a list of AirPlay speakers in my home while configuring the shortcut; similarly, you can pre-assign a volume level, a playlist from the Music app, and accessories or scenes to control in HomeKit. When the shortcut runs, it won’t ask to confirm any of these steps again – it’ll just go ahead and execute them, using your actions as a template to control your home.

In theory, this shortcut will become even more flexible once Apple adds the ability to control HomePods directly through Home automation. Still, this type of shortcut is already useful today, particularly when combined with personal automation. I, for instance, have configured this shortcut to run every time I tap my iPhone against an NFC sticker on my nightstand.

Shuffle Playlist on HomePod

Shuffle a playlist on a specific HomePod, with a specific volume level, and dim the lights. The shortcut needs to be configured based on speakers and HomeKit devices in your home.

Get the shortcut here.

Toggl Project Stats

Exclusively for Club MacStories members, I’ve built two new API-based shortcuts for Toggl, the popular time-tracking service. Called ‘Project Stats’ and ‘Project Task Stats’, these shortcuts allow you to check how much time you’ve spent on a specific Toggl project, as well as individual tasks contained in a project.

Here’s what they look like in the Shortcuts app and Siri:

Checking stats for specific Toggl projects with Shortcuts and Siri.


Replay

This summer, I’ve used both shortcuts to check on my progress for this review, which I found useful to get a sense of the (massive) scope of the project as time went on. They’re especially nice when used with Siri, as the assistant can respond with statistics returned directly by the Toggl web API.

These shortcuts will be released exclusively for Club MacStories members in a special issue of the MacStories Weekly newsletter later this week.


Apple Podcasts

I’ve built three shortcuts that take advantage of the new Podcasts actions in iOS 13. The first one is called ‘Subscribe to Podcast’ and, as the name suggests, it allows you to quickly subscribe to a new show in the Podcasts app by letting you search the Apple Podcasts directory from Shortcuts.

First, you’ll be asked to enter a podcast name to search for in an ‘Ask for Input’ action, whose output is passed to the ‘Search Podcasts’ action. This action is reminiscent of the existing ‘Search iTunes Store’ and ‘Search App Store’ actions in iOS 12 in that it lets you enter a search term, define what criteria to search by, and filter results by podcast or author name. In my case, I’ve set the search action to return five podcast results filtered by podcast name.

Searching for podcasts in Apple's catalog.

Searching for podcasts in Apple’s catalog.

After querying the Apple Podcasts directory, the shortcut uses the new If block in iOS 13 to check whether search results have any value or not. If they don’t, it means no show was found for the search query, so an error is displayed.

If results were returned, a ‘Choose from List’ action lets you pick one of the shows found in the Apple Podcasts directory. Podcast results are “rich” objects in Shortcuts featuring a title, artwork, and author information, which you can see when presenting the ‘Podcasts’ variable in a list:

Rich results for podcasts.

Rich results for podcasts.

Once a podcast has been selected, you can use the ‘Subscribe to Podcast’ action to add the show to your library. You don’t have to do anything else: after the new podcast has been added to the library, you’ll see a success message in Shortcuts, and you’ll find the new show in the Podcasts app, waiting for you to start listening. I don’t subscribe to many new shows these days due to personal time constraints, but when I added a couple new entries to my library this summer, I used this shortcut to speed up the process, and it worked well.

My second Podcasts shortcut is a picker to resume (or start listening to) an episode without opening the Podcasts app at all. At the beginning of the shortcut, the ‘Set Playback Destination’ action is used to select the audio output device.

Selecting a playback output device in Shortcuts.

Selecting a playback output device in Shortcuts.

Building a picker around Podcasts is easy enough: first, we can use ‘Get Podcasts from Library’ to retrieve a list of all the shows the user is currently subscribed to in the Podcasts app (including those based on an RSS feed instead of iTunes); then, we can use ‘Choose from List’ to pick one of the shows from the app’s library. Once the shortcut has a single podcast from the Podcasts app to deal with, we can pass the ‘Selected Item’ magic variable to the ‘Get Episodes of Podcast’ action, which will return a second list – this time, a list of individual episodes for the selected podcast. It may take a few seconds for the shortcut to assemble a list of recent episodes for a show (in my tests, it appears the app loads the 10 most recent episodes from the Apple Podcasts directory), but once that’s done, you can implement a second ‘Choose from List’ action to pick an episode you want to listen to.

Picking and playing a podcast episode from Shortcuts.

Picking and playing a podcast episode from Shortcuts.

At this point, all that Shortcuts needs is a ‘Play Podcast’ action that uses the second ‘Selected Item’ (the episode) to start playing audio on the chosen output device. If you select an episode you had previously started listening to in the Podcasts app, Shortcuts will even resume playback where you left off.

The third and final Podcasts shortcut is called ‘Play Random Podcast Episode’ and, as the name implies, it’s a fun one that plays a random episode for a random podcast currently in your library.

Playing a random podcast episode.

Playing a random podcast episode.

The shortcut relies on the ‘Get Item from List’ action with a ‘Random’ property to randomize results returned by the ‘Get Podcasts from Library’ and ‘Get Episodes of Podcast’ actions. Due to how Apple implemented these actions, it’s not possible to retrieve episodes that haven’t been played yet – Shortcuts will pick a random episode among the 10 most recent ones published by a random podcast in your library. This is a fun shortcut to use if you’re stuck deciding what to listen to and would like to try something different.

You can download my Apple Podcasts shortcuts below.

Podcast Episodes

Start playing an episode from a podcast in the user’s Podcasts library. The shortcut allows you to customize the playback destination.

Get the shortcut here.

Subscribe to Podcast

Search and subscribe to a new show in Apple’s Podcasts app. The new show will be added to your library.

Get the shortcut here.

Play Random Podcast Episode

Play a random episode for a random podcast in your Podcasts app library.

Get the shortcut here.

Safari Reader Article to Mail

This shortcut takes advantage of the new ability in iOS 13 to extract text and other properties of articles on the web using Safari Reader. Once you’ve found an article you want to share in its entirety with someone over email, you can run this shortcut, which will assemble a nicely formatted (rich text) version of the article in a Mail compose window, ready for you to share with someone.

Sharing Reader-formatted articles with Mail.


Replay

There are two ways to run this shortcut: if you’re in Safari and have come across an article to share, you can invoke the shortcut from the share sheet and run it inside the browser, as shown in the video above. Otherwise, you can run the shortcut from the app or widget by copying a link to a valid article first.

A link to an article has been turned into Reader-powered rich text.

A link to an article has been turned into Reader-powered rich text.

In either case, the Mail composer will display a formatted version of the story (including links and images); as a nice touch, I modified the subject field of the message so that, by default, it’ll include the name of the author and title of the article. Obviously, you can modify this behavior by adjusting the parameters included in the final ‘Send Email’ action.

Safari Reader Article to Mail

Share an article from Safari via Mail with a clean presentation powered by Safari Reader. You can also run the shortcut from a widget or the Shortcuts app by copying an article’s URL first.

Get the shortcut here.

Convert Historical Currencies

Originally shared in Issue 113 of our MacStories Weekly newsletter for Club MacStories members, this shortcut has been updated for iOS 13 with support for the latest actions and, once iOS 13.1 launches, conversational mode in Siri. Based on the Fixer.io API, the shortcut can convert between currencies for any date in the past, using historical currency conversion rates that are not available via regular Siri currency conversions or by using PCalc’s ‘Convert Value’ action.

Historical currency conversion rates with Shortcuts and Siri.


Replay

As you can see from the video above, thanks to integration with Siri and conversational shortcuts, you’ll be able to choose from a list of currencies or specify dates using natural language: instead of replying with ‘USD’ when asked which currency to convert, you can say “the first one”; when Siri asks you to pick a date, you can respond with a specific date, but you can also give Siri a relative date such as “two months ago” or “last Friday”, and it’ll know how to pass that along to the shortcut.

Fetching historical currency conversion rates has always been a problem I’ve tried to solve over the years by using different apps or automations. For the first time thanks to iOS 13.1 and Shortcuts, I can ask Siri to convert any amount for any currency for any date in the past, which is the best version of this shortcut I’ve ever had on my iPhone and iPad.

This shortcut will be released exclusively for Club MacStories members in a special issue of the MacStories Weekly newsletter later this week.

Choose and Toggle Alarm

Thanks to the new ‘Get All Alarms’ action in Shortcuts for iOS 13, it is now possible to get a list of all your alarms already configured in the Clock app. With this shortcut, which also works as a widget, you can choose one among your alarms from the Clock app and turn it on.

Toggling alarms with Shortcuts.


Replay

Unfortunately, due to a bug in the Shortcuts app, it is not possible to enable ‘Bedtime’ alarms yet – only traditional timed alarms are supported at the moment (the shortcut will give you an error if you select a ‘Bedtime’ alarm). It’s a small detail, but I’m quite proud of how the shortcut uses the ‘Alarm’ magic variable and reformats its date so that only the alarm’s time (instead of the full creation date) is presented in a success message at the end.

You can turn on an existing alarm with a shortcut in iOS 13.

You can turn on an existing alarm with a shortcut in iOS 13.

The shortcut fully supports conversational mode in Siri, and it’s an ideal candidate for automation with NFC stickers attached to your nightstand.

Choose and Turn On Alarm

Choose one of your existing alarms from the Clock app and turn it on.

Get the shortcut here.

Backup Drafts Workspace

Built exclusively for Club MacStories members, this shortcut uses new actions in Drafts 15, the latest update to the app for iOS 13, to query a specific workspace and back up its contents in two different ways to either iCloud Drive or Files.

Backing up a workspace from Drafts 15.


Replay

Given a workspace that contains notes formatted in Markdown, the shortcut will first compile them all to a single .md file and export them to a location of your choice. Additionally, the shortcut will iterate over each note contained in the workspace and back it up as an individual file. While I was writing the first half of the review in Drafts this summer, I relied on this shortcut to have continuous backups of it; I would like to see all third-party text editors adopt similar shortcuts to query their libraries and export files using the Shortcuts app.

This shortcut will be released exclusively for Club MacStories members in a special issue of the MacStories Weekly newsletter later this week.

LookUp Definition

This shortcut relies on actions offered by LookUp 6.0, the latest version of the popular dictionary app that has received a major update for iOS 13. Using the ‘LookUp Words’ action from the LookUp app, the shortcut lets you enter a word and choose what part of the definition you want to get.

Getting definitions with LookUp inside Shortcuts.

Getting definitions with LookUp inside Shortcuts.

LookUp lets you retrieve the following definitions for words found in its extensive database:

  • Meaning
  • Origin
  • Example sentences
  • Opposites
  • Similar words
  • Wikipedia
  • Rhyming words

When the shortcut runs inside the Shortcuts app, it lets you type a word and pick a definition type from a visual LookUp action. In iOS 13.1, however, you’ll be able to unlock a conversational mode that lets you go back and forth with Siri so you can speak a word and choose a definition type without ever touching the screen.

Here’s what it looks like in action:

Looking up word definitions from the LookUp app in Shortcuts.


Replay

I had to include a screenshot of LookUp's main screen because it looks so good.

I had to include a screenshot of LookUp’s main screen because it looks so good.

At the end of the shortcut, you can choose whether or not you want to save the word into one of your existing LookUp collections. This is also a new action in LookUp 6.0 that supports parameters for words and collections; in my shortcut, you’ll be able to pick a collection at runtime by choosing from a list in either the Shortcuts app or Siri.

LookUp Definition

Look up a word definition using LookUp 6.0. The shortcut lets you choose among different definition types, and it can also add a word to a collection.

Get the shortcut here.

Space Images

This is a fun new shortcut I’ve built this year for Club MacStories members: using NASA’s open web APIs, I’ve been able to integrate Shortcuts with the agency’s Astronomy Picture of the Day API, which – you guessed it – returns a different, beautiful space photo every day. But I’ve also gone beyond that by building support for conversational mode (both in the Shortcuts app as well as Siri in iOS 13.1) with the ability to get a description of the photo and the option to save an HD version to the Photos app. Here’s what it looks like:

Fetching NASA’s picture of the day with Shortcuts.


Replay

As shown in the video, you can run the shortcut from the Shortcuts app, where you’ll be able to interact with menus and read a description of the photo of the day, but you can also use it with Siri and listen to the assistant as it reads a portion of NASA’s description of a photo.

This shortcut always returns beautiful photos thanks to NASA's open API.

This shortcut always returns beautiful photos thanks to NASA’s open API.

Ideally, you should be able to download a photo from NASA’s servers and set it as your wallpaper; however, the ‘Set Wallpaper’ action that debuted with the iOS 13 beta in June has since been removed, and it’s unclear whether it’ll be coming back or not. Still, even without the wallpaper function, I’ve enjoyed asking Siri to fetch me a different NASA photo every day.

This shortcut will be released exclusively for Club MacStories members in a special issue of the MacStories Weekly newsletter later this week.


    Download OmniFocus, the professional to-do list app for Mac, iOS, and the web – and accomplish more every day.

    A
    A
    Add Bookmark
    DarkLightAutomatic

    Use this link to save your spot in the review and return to it later.
    You can add this as a bookmark or share it with friends.