Macro triggers all types of URLs except for KM URL trigger

Tahoe 26.3.1 , KM 11.0.4

The simple macro below works very well with browser URLs, Bear CallbackURLs, DevonThink deeplinks, file/folder path URLs but it does not work if I want to trigger a KM macro with its URL, for example

kmtrigger://macro=DB038859-336D-445F-8CEE-32D0A9845672

I use this macro to trigger these URLs from within google docs, which is otherwise impossible.

I would be grateful if someone could explain why.

thank you very much

Trigger URL in Clipboard.kmmacros (20.9 KB)

It should work.

Is the macro you are trying to trigger by URL both Enabled and Active in that context? What happens if you paste the URL into Safari's address bar and hit return? Any clues (like an "invalid URL message") in the KM Engine log?

1 Like

My apologies for not posting the engine (below)

I found the problem but not the solution.

  • yes, the macro is enabled and active in my global macro group and I can run it from anywhere no problem. The issue is limited to copy the KM URL from gdoc and trigger the macro.
  • same error if I run the URL via safari
  • to keep it as simple as possible, I started with the URL action alone
  • if I copy paste the KM URL from gdocs into the action, it does not work
  • if I copy from gdoc → paste as plain text into the KM action, it works fine. This makes sense if I think about it because gdocs are in a bizarre format and there are many forms of "copy" as was discussed a few months ago in a TidBits forum. What is strange is why other types of URL work.
  • my problem now is how to incorporate paste as plain text into the original macro

thank you very much for answering my post

2026-04-24 05:08:15 Execute macro “Trigger URL in Clipboard $wip” from trigger Editor 2026-04-24 05:08:15 Action 100362377 failed: Open URL failed with invalid URL “%Variable%input_clipboard%” 2026-04-24 05:08:15 Open URL failed with invalid URL “%Variable%input_clipboard%” in macro “Trigger URL in Clipboard $wip” (while executing Open URL “%Variable%input_clipboard%”).

I found the solution and thanks again for your post.

Out of interest -- what happens if you don't Filter the Clipboard and skip the Variable altogether:

I'm wondering if KM and/or Clipboard would be smart enough to use the plain text flavour when going that route.

1 Like

WOW !! you are right !! I bow to the master.

a quick follow-up question

is the pause below necessary of built in the native actions ? I am asking because I use pauses a lot, probably too much

sorry. It’s me again.

I want to merge 2 macros into one.

The macro discussed above which works well with browser URLs, Bear CallbackURLs, DevonThink and other types of deeplinks, file/folder path URLs and now thanks to you with KM trigger URLs

I have another simple macro which opens the file/folder whose UNIX path in the clipboard.

I would need to (I think) use a conditional type macro (If then else or other type)

The question is how to formulate the condition the if so that it recognizes the UNIX type path as opposed to other types of URLs.

example of a unix on my mac (open file action)

/Users/ronald222/Downloads/iPad touch ID not working $gem.pdf

as opposed to a file URL which works with the open URL action

file:///Users/ronald222/Downloads/iPad touch ID not working 22 Apr 2026 $gem.pdf

I can’t use file:/// as a distinction because I have to include all other URLs

thanks again very much

It shouldn't be needed -- the "Copy" Action will wait for the System Clipboard to change before continuing to the next Action in your macro.

The Unix path won't begin with a scheme, your other URLs will. So you could either branch depending on presence/absence of scheme:

...or you could add file:// to anything that doesn't start with a scheme and always use the "Open a URL" Action:

I think I'd use the first method, if only because it would also allow me to use ~ paths like ~/Desktop/Test Folder/test.txt without further messing around.

For completeness -- the regex in the images is (?i)^[a-z][a-z0-9+.-]*:, conforming to the URI format discussed here.

1 Like

thank you very much !!