Call a KM macro from Raycast

It might be very simple, but I can't figure it out.
How can I call a KM macro from Raycast (preferably with the UUID of the macro in question)?

I know there's a KM extension in Raycast. But it shows all open macros. I want to open a specific macro.

why use raycast? there is a KM action for this called “Trigger Macro by Name”, it opens a “bar” similar to spotlight, or raycast, or alfred

I know about the existence of "Trigger Macro by Name"
But I'd like to be able to call it directly from Raycast.

i don’t use raycast, but i use alfred, and there is a workflow for triggering KM from alfred GitHub - iansinnott/alfred-maestro: An Alfred workflow to execute Keyboard Maestro macros.

with this you set a trigger for alfred, let’s say “km” and then whatever you write afterwards is going to search the KM macro database. there must be something similar for raycast.

but to be honest because typing a couple characters more i ended up setting cmd+space for using alfred, and opt+space for KM, this ways easier for me. and my muscle memory is used to it.

  1. Make a Trigger File for your KM macro, tell Raycast to open the file
  2. Use KM's URL Scheme to execute the macro
  3. Use Raycast to run an AppleScript that executes the macro
  4. Use the KM command line tool via a Raycast shell script

You export a Trigger File using the KM Editor's File -> Export -> Export as Trigger File menu item. The URL, AppleScript and command line incantations can be seen in the macro's "Or by script:" options.

There may be other methods too.

Note: I'm not a Raycast user, just vaguely aware of what you can do with it, so I've no idea which of the above is the best method...

Fellow Raycast user here. As Nige_S mentioned, you can get the URL to you macro, but then the simplest would be to create a quicklink with that URL in Raycast.