This week's sponsor

Agenda

Date-Focused Note Taking


Shortcuts Corner: Search YouTube, Preview Folder Contents, and Play Recent Music Albums

As I explained in today’s issue of MacStories Weekly for Club MacStories members, we’re bringing the newsletter’s Shortcuts Corner section to the site, with a twist: in this series, you’ll find simpler shortcuts that you can download for free, and which will be added to the public MacStories Shortcuts Archive; you’ll also get a preview of an exclusive shortcut available today for Club MacStories members.

In this week’s Shortcuts Corner, I share shortcuts to quickly launch a search query in the YouTube app, preview the contents of a folder in iCloud Drive, and start playback for one of your recently played albums in the Music app. Let’s dive in.

Search YouTube

Since I created this simple, three-action shortcut a few weeks ago, it’s become one of my most used automations: with this shortcut, you can type a search query in an ‘Ask for Input’ dialog, then tap ‘OK’, and the selected search will open in the YouTube app for iPhone or iPad.

Searching YouTube from Shortcuts.

Searching YouTube from Shortcuts.

As you can see from the screenshots above, the YouTube app can do this by adding youtube:// before a standard youtube.com URL – in this case, the URL to open a search results page. You can search for both videos and channel names with this shortcut, and results will be displayed in the YouTube app. Thanks to conversational mode in iOS and iPadOS 13.1, you can also ask Siri to search for videos, and the assistant will launch the YouTube app.

I’ve been using this shortcut to quickly launch searches in YouTube so often, I’ve added it to my iPhone and iPad Home screens using MacStories Shortcuts Icons. You can read more details on MacStories Shortcuts Icons here and buy them directly here.

The top section of my iPadOS Home screen, featuring MacStories Shortcuts Icons.

The top section of my iPadOS Home screen, featuring MacStories Shortcuts Icons.

You can download the ‘Search YouTube’ shortcut below and find it in the MacStories Shortcuts Archive.

Search YouTube

Type a search query and open search results in the YouTube app. The shortcut supports both keyboard input and conversational mode in Siri.

Get the shortcut here.

Preview Folder Contents

I originally created this shortcut to more easily search the contents of the MacStories Shortcuts Icons folder, but it can be repurposed to work with any folder stored in iCloud Drive/Shortcuts.

Here’s the idea: if you have a folder containing documents you want to quickly search or preview, you can use this shortcut to bring up a preview for all the items in the selected folder. You can filter items by name beforehand; if you leave the search dialog empty, the shortcut will preview all the files contained in the folder.

All the contents of a folder (left) can be previewed inside the Shortcuts app.

All the contents of a folder (left) can be previewed inside the Shortcuts app.

Due to sandboxing limitations in the Shortcuts app, the folder has to be placed in Shortcuts’ own documents directory in iCloud Drive. As I argued in my iOS and iPadOS 13 review last week, Apple should get rid of these limitations, but we’re stuck with them for now. For this reason, I recommend this shortcut to preview the contents of folders you frequently access, and which you wouldn’t mind storing as sub-folders inside the Shortcuts directory (such as MacStories Shortcuts Icons).

Shortcuts can return the full contents of a folder thanks to the ‘Get File’ action: if the action does not point to an individual file, it’ll pass back a list of all files contained in a folder instead.

Reading the contents of a folder with Shortcuts.

Reading the contents of a folder with Shortcuts.

Furthermore, the rich preview generated by the ‘Choose from List’ action changes depending on the files you’re previewing: if it’s a folder of images, ‘Choose from List’ will display a grid of image thumbnails; if they are text files or .zip archives, you’ll get a plain list instead. At the end of the shortcut, you’ll be able to preview a single selected file with Quick Look or share it with other apps via the share sheet.

You can preview or share a selected file.

You can preview or share a selected file.

I’ve been using this shortcut to preview the contents of different folders I store in iCloud Drive/Shortcuts; ideally, Apple should allow Shortcuts to read the contents of any folder in any file provider regardless of its location, but this will do for now.

You can download the ‘Preview Folder Contents’ shortcut below and find it in the MacStories Shortcuts Archive.

Preview Folder Contents

Preview the contents of a folder stored inside iCloud Drive/Shortcuts. The shortcut lets you filter items by name; if no name is entered, all files contained in the folder are returned. You can choose to preview a selected file with Quick Look or share it with extensions.

Get the shortcut here.

Play Recent Music Albums

This shortcut is exclusive to Club MacStories members and has been published in today’s issue (#193) of the MacStories Weekly newsletter.

The Shortcuts app doesn’t offer built-in Music actions to find your recently played albums, mirroring what the Music app shows in the ‘Recently Played’ section of the For You page. So I built my own custom shortcut to work around this limitation and start playing albums I’ve recently been listening to. With a couple of taps, I can now get a list of songs I listened to and immediately play the full album.

Playing recent albums with Shortcuts.


Replay

There were some decisions I needed to make when building this shortcut to work around other limitations of the Shortcuts app. To download this shortcut and read my technical explanation of how it was built, subscribe to Club MacStories and check out Issue 193 of MacStories Weekly, either in your email inbox or the Newsletter Archive.


Unlock MacStories Extras

Club MacStories offers exclusive access to extra MacStories content, delivered every week; it’s also a way to support us directly.

Club MacStories will help you discover the best apps for your devices and get the most out of your iPhone, iPad, and Mac. It’ll also give you access to advanced iOS shortcuts, tips and tricks, and lots more.

Starting at $5/month, with an annual option available.

Join the Club.

A Club MacStories membership includes:

  • MacStories Weekly newsletter, delivered every week on Friday with app collections, tips, iOS workflows, and more;
  • MacStories Unplugged podcast, published monthly with discussions on what we’re working on and more;
  • Monthly Log newsletter, delivered once every month with behind-the-scenes stories, app notes, personal journals, and more;
  • Access to occasional giveaways, discounts, and free downloads.