Shortcuts on iOS
One of the things that I've started to use more and more lately is the Shortcuts app on iOS. This was a 3rd party app called "Workflow" a few years ago, but in 2018 Apple bought it out and introduced "Shortcuts" as part of iOS 12. The idea is that it introduces a bunch of different automations to iPad/iPhone, including integration with third-party apps that support it.
Since I just spent the morning playing around with various shortcuts and creating a few new ones to streamline my blogging workflow on the iPad, I thought I'd write up a few words on how I use it.
Overview of Shortcuts
There are more words and subreddits about Shortcuts out there, so I'm really only going to talk about the stuff that I've been playing with.
Use Cases
I have 5 main use cases for shortcuts:
- Home Automation - this is a mix of interacting with Home Assistant and HomeKit1.
- Deep-linking into specific sections of apps, such as playing a particular podcast in Overcast, or creating a new entry with a specific template in Day One.
- Saving content from the web either in Drafts or in Dropbox, for later linking / reading.
- Changing device settings, like turning brightness + volume down and setting Do Not Disturb in the evening.
- Playing with apps that interact with Shortcuts that I think will make me more productive with Shortcuts. This has not really panned out yet. See Launchcuts and Toolbox Pro
Of course there's the chaining of several of these things together - and that's where shortcuts really opens up some cool stuff, but at the same time, can be quite a frustrating tool to use.
Building and Developing
In many ways shortcuts is a continuation of Apple's user-automation journey, building on the legacy of Hypercard, Applescript, and Automator as a simpler way of building up simple programs + scripts.
The entire interface is drag + drop actions, that allow some things to be passed between them, along with some basic flow-control actions like if
, repeat
, and choose from …
, as well as actions for setting variables. This is great in that it's really easy to quickly pull together different pieces to build a shortcut, but it can be quite frustrating when you need to restructure your "code", like when you want to move a chain of actions to a different part of the workflow2.
One of the ways I try to mitigate this, and a pretty awesome feature of Shortcuts, is to build up individual shortcuts to do a specific task. For example, I have a shortcut called "⚀ Schedule" which takes an (optional) date as the input, and then displays a summary of all the calendar items on the given day (or today if no date is provided). Sounds trivial, but what it means is that I can then have another simple shortcut called "⚀ Tomorrow", which takes the current date, adds one day, and then calls "⚀ Schedule" with tomorrow's date as the input.
This then lets me build up nested workflows like "Master Control Program", which is a shortcut designed to live on my home screen, and give me 2-tap access to many different functions - all implemented as separate Shortcuts that get called based on a menu choice.
One cool action that both allows a lot more powerful workflows from the iPad / iPhone, but is also cheating a bit, is "Run Script over SSH". This is an Apple-provided action that does exactly what it says on the tin - you enter hostname, port, username and ssh key or password, and then a series of commands you want it to run. Bonus points - this also includes an interface for generating a new SSH key directly in Shortcuts, and then copying out the public key to configure your remote server. This turned out to be the final piece of the puzzle for my iPad blogging workflow - and has eliminated a "manual" step of connecting back to my mac mini at home (that "builds" the static site for the blog and uploads it), replacing it with the "RAMB: Deploy" shortcut.
My Go-To Shortcuts
So the shortcuts that I've either downloaded or written and use extensively?
- Bart - this is a "meta-shortcut" that can backup and restore shortcuts. Super helpful right before you try some funky new menu system and totally hose one of your main daily shortcuts ...
-
Daily Shutdown Procedure
- This shortcut I've written uses several nested shortcuts to run through stuff right before I put my phone away for the night. It turns off all the lights and aircon in the house via HomeKit, turns the brightness on my phone down low, sets the volume to 03, shows me the next day's schedule (mostly so I know if I need to wake up earlier for morning meetings), and if I haven't already made a daily "mood" entry in Day One, prompts me for a mood rating from 1-5, and then opens up Day One with a custom template and my mood score pre-entered for me to capture some thoughts on the day. -
Do Not Disturb Until Time
- This shortcut lets me specify a time of day, defaulting to the top of the next hour, so minimum 60 minutes, and set DND for that duration. Particularly useful when I have several back to back meetings and want DND to last for all of them, where the default options in the OS are only until the end of current/next meeting. -
App Store: Updates
- Since Apple moved updates out of their own tab and into a part of the user profile screen, I made a shortcut that could live on the home screen and take me quickly to the update view. Since I don't have automatic-updates turned on, and have 328 apps on my iPhone (144 on the iPad), I end up using this almost daily.
And then there's the blogging shortcuts:
-
RAMB: New Entry
- This will prompt for a title, and then generate the metadata for the post, and open up a new post in 1Writer using x-callback-url (essentially used as the predecessor to Shortcuts on iOS). The nice thing about this method is that 1Writer interfaces directly with Dropbox, and if I'm offline when I start a new post, the file will just get sync'd across next time I'm online. -
RAMB: Open Halcyon Build
- This only works on my local network, but opens up a Safari window with the auto-built version of the blog. Could just be a bookmark in Safari, I guess, but I was in a Shortcuts mood when I wrote it. -
RAMB: Deploy
- What it sounds like - gives me the option to deploy to either the staging site or "prod", or both. This uses the "Run Script over SSH" action, and is much nicer than firing up an SSH client manually.
I'm sure there's some photo-management shortcuts in my future - I think that's the next thing I'll take a run at, and see if I can find a better workflow for sharing some of the myriad photos I've been taking of my son ...
-
Home Assistant is the "master", but I keep all the basic devices and a small subset of scenes available in HomeKit to allow for easy automation, since it's much better integrated with Shortcuts. ↩
-
The technique I use here is to add a
repeat
block right at the start of the chain of actions I want to move, move them all into the repeat block, drag the repeat block to where I want it - thus taking all the actions with it - and then delete the repeat block, keeping the actions as I do. Hacky, but gets the job done much more reliably than individually dragging each action in the chain. ↩ -
Usually. Volume control in shortcuts seems to be a particularly buggy thing in iOS 13. Sometimes it just stops working until a reboot of my phone. It's just like Windows 95! ↩
Comments
Comments powered by Disqus