Execute a macro via a link in Evernote

Is it possible to execute a macro via a link in Evernote, Apple Note, Scrivener, Pages, etc?
thanks in advance for your advice

Yes. See this Wiki Article. Treat it just like you would any other URL and, depending on the app, it should work just fine.


thanks very much. Not sure what I should put in as ‘value’. There are no values or variables to pass. Just imagine something simple like opening the KBM forum.

thanks again. I am not sure I understand the syntax
If my macro is called
URL Keyboard Maestro FORUM
which actives chrome and puts me in the KBM forum
what would my link look like ?

From the KM Wiki:


Just substitute the name of your macro for "MacroName".

"value" is an optional parameter you can pass to the Macro.
Since you don't have one, just leave out "&value=Value"

Of course, since this is a URL, it must be URL encoded ([SPACES] not allowed).

So, your KM Trigger URL would look like this:

However, this custom URL protocol will NOT work in Evernote since Evernote does not support custom protocols.

The only workarounds I know of are:

  1. Write an AppleScript that will read the KMTrigger selected in Evernote, and then open it.
  2. Use a macOS service like "Open URL"

1 Like

What about using some sort of KM Web Trigger? I haven’t looked at this KM feature at all, but I know you can trigger macros from a URL somehow. Perhaps something like this could work?

Just a thought.

1 Like

I’m not sure what you mean by that.
The kmtrigger IS a URL. It just uses a custom protocol.

1 Like

Right, sorry, I switched lanes without signalling. :smirk:

Here’s what I was thinking.

  1. Enable KM’s Web Server.

  2. Configure the macro to have a Public Web Trigger.

  3. Then you can use a URL like this:

1 Like

Sounds like a great idea.

I’ve never used, or even explored, the KM Web Server.
Another whole world . . . :smile:

1 Like

I just now used it for the first time, because I thought it might be a solution. :slight_smile:

I can see one issue right away - it opens a browser window. So I’m guessing this isn’t ideal. But my mind is whirling, trying to imagine a way around that. I’ll let it simmer and see if anything comes to the surface.

For instance, the macro could close the browser window (tab).

Or perhaps something else.

1 Like

How do you handle macroname when the macro name has spaces in it? thanks very much

%20 instead of name. Or use “Copy as UUID” and use that instead.

1 Like

I am very sorry Don, I still don’t understand.
Let’s say that my macro name is as below
open XYZ restaurant menu
note that the macro name includes spaces
how would you write:
If I understand correctly, I can ignore &value=Value if I do not want to pass a value, but how do I write
if the macro is named as above
Sorry once again for taking your time, and thanks

I already answered that above:

1 Like

NOW ! I understand. Thanks so much!

A post was split to a new topic: How Do I View PDFs and Take Notes with Evernote?

what does UUID mean?
thank you

It means something like “Universal Unique Identifier”, at generally looks something like this:


It’s guaranteed to be unique across all devices in the world (there’s a couple of exceptions to this, but for all intents and purposes, it really is).

KM uses the UUID internally to identify Groups and Macros. That’s why you can have macros or groups with the same name - to KM, they’re different because they have different UUIDs.

For Keyboard Maestro macros, you can get the UUID by using Edit->Copy->Copy as UUID.

So if you ever use something like the “kmtrigger://” feature, it’s best to specify the macro UUID rather than the macro name. This way there’s no problems with duplicate names, and if you ever rename the macro, it won’t break anything.

Probably more info that you wanted, but there you have it,

1 Like

crystal clear. thank you very much

@DanThomas, you are the man! :grinning:
I would never have figured out how to do this without your post.

@peternlewis, the KM Wiki article on "Web Server" is woefully lacking.

  • It does NOT provide any of the commands (like "action.html"). Are their others?
  • I would update, but I don't know enough.

I just implemented this, and it works great!! :thumbsup:

Here's my new macro, that has NOT had much testing or use yet, so if anyone wants to use it, you do so at your own risk.

###MACRO:   @Web Open URL Passed from KM Web Server

~~~ VER: 1.0    2017-02-01 ~~~

@Web Open URL Passed from KM Web Server.kmmacros (4.5 KB)

:warning: Warning! This uses the KM Public Web Entry, which may have some security issues. See KM wiki for details.

The KM Web URL is like this:<YourMacroUUID>&value=<TheURLYouWantToOpen>

For example:

1 Like