This Week's Sponsor:

Listen Later

Listen to Articles as Podcasts


Accessing Shortcuts for Mac with Alfred Workflows and Universal Actions

Alfred users can now access their library of shortcuts on the Mac, thanks to an official Alfred workflow by Vítor Galvão. The workflow allows users to access individual shortcuts and folders of shortcuts, as well as pass text and files to shortcuts for processing. It’s a nice approach that uses Alfred’s existing workflow system to invoke Ruby and Bash scripts under the hood.

Searching for individual shortcuts (left) and by folder (right).

Searching for individual shortcuts (left) and by folder (right).

Let’s start with the easiest approach first. Invoke Alfred with the hotkey you’ve assigned to the app, then type ‘sc’ for Shortcuts. Any shortcuts you’ve recently accessed through Alfred will appear at the top of the list for quick access. If you need a different shortcut, though, start typing its name to filter the results until you see the one you want. Press Return and the shortcut will run.

Browsing shortcuts by folder.

Browsing shortcuts by folder.

If you don’t recall the name of the shortcut you want or want to browse a folder of shortcuts before running one, type ‘scd’ instead, which lists all of your shortcuts folders. Highlight one and hit Return to see all of the shortcuts in that folder.

Providing text to Alfred that displays an alert.

Providing text to Alfred that displays an alert.


Using Universal Actions to pass the text to the Alert shortcut.

Using Universal Actions to pass the text to the Alert shortcut.

Alfred’s Shortcuts workflow also incorporates its Universal Actions feature, which was introduced last year. The simplest way to pass some text to a shortcut is to invoke Alfred, type, or paste some text into its UI. Then, invoke Alfred’s Universal Actions to display a list of commands that can be performed on the text you provided.

The list of Universal Actions includes ‘Run shortcut,’ ‘Shortcuts,’ and ‘Shortcuts Folders.’ ‘Run shortcut’ lets you pick from your list of shortcuts and then uses the text you provided to Alfred as its input. The ‘Shortcuts’ action locates any shortcuts that match the text you provided, and ‘Shortcuts Folders’ does the same searching instead for folder names that match your text. URLs and files work similarly when the ‘Run shortcut’ action is selected, passing the URL or file as input.

Picking an image to pass to a shortcut.

Picking an image to pass to a shortcut.


Displaying an image passed to a simple 'Open File' shortcut.

Displaying an image passed to a simple ‘Open File’ shortcut.

Vítor Galvão’s Alfred workflow for Shortcuts, which you can download from GitHub, is an excellent example of Alfred’s extensibility, which makes a series of Ruby and Bash scripts approachable for more users through Alfred’s simple UI. The workflow is also another of the many examples of just how well Shortcuts for Mac integrates with third-party utilities thanks to its scripting support and other integrations with macOS.

Unlock More with Club MacStories

Founded in 2015, Club MacStories has delivered exclusive content every week for over six years.

In that time, members have enjoyed nearly 400 weekly and monthly newsletters packed with more of your favorite MacStories writing as well as Club-only podcasts, eBooks, discounts on apps, icons, and services. Join today, and you’ll get everything new that we publish every week, plus access to our entire archive of back issues and downloadable perks.

The Club expanded in 2021 with Club MacStories+ and Club Premier. Club MacStories+ members enjoy even more exclusive stories, a vibrant Discord community, a rotating roster of app discounts, and more. And, with Club Premier, you get everything we offer at every Club level plus an extended, ad-free version of our podcast AppStories that is delivered early each week in high-bitrate audio.

Choose the Club plan that’s right for you:

  • Club MacStories: Weekly and monthly newsletters via email and the web that are brimming with app collections, tips, automation workflows, longform writing, a Club-only podcast, periodic giveaways, and more;
  • Club MacStories+: Everything that Club MacStories offers, plus exclusive content like Federico’s Automation Academy and John’s Macintosh Desktop Experience, a powerful web app for searching and exploring over 6 years of content and creating custom RSS feeds of Club content, an active Discord community, and a rotating collection of discounts, and more;
  • Club Premier: Everything in from our other plans and AppStories+, an extended version of our flagship podcast that’s delivered early, ad-free, and in high-bitrate audio.