This afternoon, @kcjokes asked for a shortcut that can play a podcast based on the time of day:
@mattcassinelli Hey Matt! I’m creating a shortcut to add when connecting via Bluetooth. If time is before 8 pm, play podcast A, if after 8 pm, play podcast B. I’m stuck, can you help? I’m here after 50 iterations. Thank You pic.twitter.com/WfSnEPYgnx
Takes the current time, converts it to 24-hour time, then grabs just the Number value and uses it in an “If” conditional – if before 8pm (or 20), play podcast “A”, otherwise if after 8pm play podcast “B.”
Includes Import Questions for pre-selecting the podcasts.
This is a helpful example of using the “If” action to create conditionals in your shortcuts, letting something different happen each time you run the shortcut depending on how the condition is met. In this, the shortcut uses the current Time values inside “If” conditionals so that something different happens depending whether the shortcut is run before or after a certain time of day.
To be more specific, formatting the Time into a single 24-hour value lets the “If” action’s conditions utilize “less than” or “equal to”-type math to check against the current hour – in iOS 13, the “If” action’s conditions change depending on the type of content used.
Here’s a Personal Automation for Apple Watch that I’m running automatically at the start of my Walking workouts – Log UV index:
Gets the current weather at the current location and logs the UV index for the hour into the Health app, then displays it or speaks it back when run via Siri.
Includes “Get Device Name” and an “If” action to account for being run on the iPad, which does not have the Health app and would otherwise fail.
I built this because I wanted to track the UV levels I am being exposed to on a daily basis, whether it be too much during the summer or not enough during the winter.
I use this inside a Personal Automation for Apple Watch set to the “Walking” workout type – the Run Shortcut action runs the Log UV Index when the trigger is met as my workout begins. That way, any time I go on an outdoor walk and I begin a Workout, this will log the sun exposure I’m getting into the Health app.
Since having an Apple Watch and seeing the UV index on my watch faces, I have realized just how strong the afternoon sun in California can be in and, conversely, how little I was actually getting outside during the winter. I also included the “X out of 14” bit to help with the context, since I doubt many people know the bounds of UV index scores 🤓
Since I already use the Outdoor Walk feature every day, it’s an easy and automatic way to trigger a shortcut reliably – why not log the UV index every time? Some day in the future I might be able to make an interesting insight from having the data saved.
Plus, I may stack on other shortcuts using the “Run Shortcut” action, treating my daily walks as a human-powered hamster wheel for all my Shortcuts Automation needs.
Self-search is a handy shortcut I built for Twitter users:
Using a Twitter username inputted on import and a keyword entered when the shortcut is run, this shortcut takes the info, URL-encodes it into a Twitter link, and opens into the app to show the results.
Use this to search your own tweets for something you’ve said in the past instead of scrolling through all the way through your own tweets or entering the fiddly search operators yourself.
If you love The Office and want to have a random episode picked for you, this shortcut is for you:
Using a dictionary filled out with the season numbers and corresponding episode counts for each, this picks a random season, then episode, then displays it in an alert as Netflix opens on the Apple TV.
Works aloud when run from Siri; good for HomePod.
After watching every season of The Office too many times, my girlfriend and I started picking random episodes to watch.
At first we just asked Siri for a random number between 1 and 9, then would find the episode counts and then ask for a random number again; so, I built this shortcut to make it faster each time and easier to try again if we wanted a different option.
This can easily be recreated for any show too – add in the seasons and episode counts, change the name, and you’re good to go!
Gets sheets from a group in Ulysses, asks which one to use, then adds it into iA Writer via their URL scheme. Only accepts text, so you’ll have to move over any images.
I’ll be using this to move my iMore articles out of Ulysses and into iA Writer when I want to edit them, add images according to iMore’s file naming system, and prepare them for uploading to the web.
Ulysses doesn’t allow the actual filenames of images to be renamed, so I have to use iA Writer near the end. Ulysses does allow for adding titles to images, but I want the actual file itself renamed for SEO purposes – so I built this shortcut to move my pieces over.
For the past several months, I’ve been working on a shortcut designed to be the ultimate assistant for Apple Music.
Called MusicBot, the shortcut encompasses dozens of different features and aims to be an all-in-one assistant that helps you listen to music more quickly, generate intelligent mixes based on your tastes, rediscover music from your library, control playback on AirPlay 2 speakers, and much more.
I poured hundreds of hours of work into MusicBot, which has gained a permanent spot on my Home screen. Best of all, MusicBot is available to everyone for free.
MusicBot is yet another one of Federico’s shortcuts that turns a vast number of functions into a single Siri Shortcut for you to use. Plus, look at that custom icon!
I quite literally have over 50 music-based shortcuts that this will be replacing.
Plus, Federico is releasing a “Pro” version for Club MacStories subscribers that takes advantage of Toolbox Pro integrations, and comes with more custom icons! An annual subscription to Club MacStories is $50 – anyone who reads my site should probably be a subscriber.