Triggering Shortcuts from Alfred on macOS

For any Alfred app users who also like to dabble in Shortcuts, you might get some use from a new Alfred workflow I have published. It allows you to launch shortcuts from Alfred, optionally adding text input, open shortcuts for editing, pass text into shortcuts, choose shortcuts to run by name/folder > name, pass URLs and files to shortcuts via Alfred’s Universal Actions, and copy Shortcuts information to the clipboard. Essentially I wanted to expand on the existing Shortcuts launch options to something I was more used to on the Mac, and was ultimately more accessible for me without the addition of several dozen keyboard combinations or a depth of Stream Deck navigation I would rather not touch.

It is quite similar to the Conductor workflow I created for Keyboard Maestro that’s been mentioned a couple of times on the podcast. So if you like/use that, and also have an interest in Shortcuts I think it will be worth a look

It is an initial release, and so far, only tested by me. Certainly not extensive testing either. So if you do find any issues I need to fix, please do drop a note on this thread.

4 Likes

You are my favorite person on the internet today! I’m so happy I didn’t have to figure this out today!

2 Likes

Great workflow and super-useful. Thanks so much!

Addressing one item in your ThoughtAsylum post, I haven’t had any trouble triggering my shortcuts from Spotlight (though triggering them through Alfred is quicker and more seamless!). At first I thought it was a matter of registering the shortcut as a Quick Action or in the Services Menu via the Shortcuts Details menu, but I just tried it and I was able to trigger individual shortcuts via Spotlight even if they’re not otherwise being shared.

The category they show up under in Spotlight is “Other,” so as a test, you might un-check all other Spotlight categories except “Other” in the Spotlight preferences, and see if you have better luck. I have found that Spotlights is very picky about the shortcut title — typing the shortcut name exactly gets better results than fuzzy search.

But — your Alfred workflow’s ability to send a text input to a Shortcuts shortcut overcomes a big limitation of Spotlight, so thanks again!

Thanks. Glad you find it useful.

I guess there must be something wrong with my Spotlight index, or it’s another spurious Mac Shortcuts bug. With the “Other” option checked, and an exact Shortcuts name entered (I did try it with a capital “O” for “Of” too), it did not yield a Shortcuts result for me.

They just don’t show for me; at least not right now.

I have not tried doing this, but why would unchecking other categories cause something extra to appear in the remaining checked category? I don’t follow that part of the suggestion.

Only my general impression (admittedly anecdotal and subjective) that Spotlight is weighting its results; if I have a bunch of files with the same name and I do a Spotlight search, it shows me some of them but not all of them. So I thought maybe as an experiment if you “cleared the deck” so that all Spotlight could return was results in the Other category, maybe that would help narrow down the issue. Just a thought.

Not that you doubt it, but here’s the Apple Support doc that confirms the Shortcut/Spotlight compatibility.

Thanks again!

I have been continuing to tinker with Bypass since releasing v1.0. Today I reached the point of releasing v1.1 with a fair bit of extra stuff in it. This includes flows to help build out calls via URLs, shell script, AppleScript, and even Elgato Stream Deck buttons. There are also a few help links built in too.

In addition to the functionality, I have also put together a dedicated documentation page - very much a reference page rather than a how-to page, but it *should* cover all of the triggers and flows.

I have also published a detailed how-to post for how to use Bypass to help you run shortcuts from a Stream Deck.

While I believe I have tested things as much as I reasonably can at this point, I fully expect there is every chance people might run into issues that I have not. As the complexity of the workflow goes up so does the chance of something being missed or an edge case creeping in. If you do come across any issues, please post details here and I will do my best to take a look as the opportunity presents.