Trigger Macro from Alfred app with a string

I want to send/pass a string/query from Alfred to Keyboard Maestro macro. Is it possible to do?

1 Like

You can trigger KM macros by way of the kmtrigger: scheme URL, which take this format:

kmtrigger://macro=Name%20of%20Macro&value=TriggerValue
kmtrigger://macro=877035F9-8C00-4035-9DA8-4BF5644893CC&value=TriggerValue

The first format allows you to specify the macro by name. The second format lets you specify a macro by UUID. TriggerValue is the text that's sent to the macro and is accessible by using the text token %TriggerValue% within KM.

It is a URL, so remember to percent encode it (which Alfred can do for you).

See the Keyboard Maestro Wiki page about the URL Trigger for more information.