Please explain Shortcuts.app from a Keyboard Maestro perspective

A question for folks on here who have achieved a basic level of competence with Shortcuts.app.

I am pretty good with Keyboard Maestro. I have made a lot of macros, and I know how to accomplish almost everything I want to do, and when I get stuck I know how to consult the documentation and how to frame a question for this forum.

I don't use Shortcuts much, because I can do almost everything I want to do with Keyboard Maestro. But in recent years a few Mac apps have introduced Shortcuts support, where previously they would have built AppleScript support, so now Shortcuts is the best or only way to achieve certain specific things in those apps. Fortunately Keyboard Maestro has the Execute Shortcut action so I can do the bulk of the work in KM and then call a shortcut for the specific app interaction I need.

But whenever I try to do something apparently simple in Shortcuts, I get confused. I'm obviously bringing a mental model from Keyboard Maestro, and I expect Shortcuts to work like KM, and when it doesn't I get frustrated.

Here's the example that prompted this question: I've started using Play to save YouTube videos to watch later. There's a Shortcuts action, Add Video, which takes a YouTube URL and adds it to my Play library. I can call the shortcut from KM, and send the YouTube URL as input to the shortcut. But I can't figure out how to grab the input in the shortcut and pass it to the Add Video action.

If this were KM, the input would be availabine in the %TriggerValue% token, and I could put that token in literally any text field and save it to a variable or run a find/replace on it or display it in a window or whatever.

Shortcuts obviously doesn't work like that. But … how does it work?

I would love help with this specific problem but more than that I would love someone to explain, conceptually, how a KM user should rearrange their head to think about passing data within Shortcuts.

1 Like

Hi, @gabrielroth. This thread might help: Keyboard Maestro and macOS Shortcuts—Data Transfer Examples

Thanks for sharing this. I opened your example shortcuts and squinted at them, and that was enough to get my shortcut working. I still find the way Shortcuts handles data extremely confusing — not the question of moving data from KM into Shortcuts, which you've documented very well, but passing it from one action to another within a shortcut. KM's system, where variables have a single type and are explicitly assigned names etc., is much more straightforward — it feels like there's a lot of magic going on under the hood with Shortcuts.

1 Like