Remote Trigger and passing a parameter

I am trying to get remote trigger working. Using the URL below, I do get the desired macro to fire.

https://trigger.keyboardmaestro.com/t/UniqID1/UniqID2?myTrigger=something

What I can not get to work is that on the target Mac I am not receiving the "myTrigger" parameter.
On the sending Mac I have used both "Open URL" action and "remote Trigger" action, both have same problem.
On the target Mac, I am using "The remote web trigger is accessed"action to
run "Execute Shell Script" action. The script gets run as desired.

On the remove macro, use the TriggerValue token to access the parameter.

I have tried both TriggerValue and myValue (which I set) in the macro on the target Mac. What I get is whether TriggerValue had from earlier and not the new value.
Could you give me an example of how you would use it.
Thanks for responding

Forgive the silly question -- but what would you expect the TriggerValue to be if your example URL was "real"?

And can you give an example of a TriggerValue that is failing? I'm assuming TriggerValues need to be URL-encoded, perhaps there's something in that.

On the target Mac, I would expect that the value I set in the "&TriggerValue=something" on the firing machine:
https://trigger.keyboardmaestro.com/t/UniqID1/UniqID2?TriggerValue=something
would show up in the TriggerValue variable on the target Mac.
Since this is not happening, I must get TriggerValue in some other way, that I am not aware of.

To be clear -- you want the variable on your target Mac to be set to the string "TriggerValue=something" (rather than "something")?

Try just https://trigger.keyboardmaestro.com/t/UniqID1/UniqID2?something and see if that works -- I'm always suspicious of unencoded "special" characters in a URL when something webby doesn't work.

Ignore that -- I just set up a Remote trigger (kudos, @peternlewis, both easy and well documented) and it worked fine with an "=" in the trigger value.

So if your URL is good, that means it's probably an issue with the macro. Try disabling all the steps in your macro and then adding an "Alert" action like this:

If you now use the same URL as before the trigger value will be reported back in the text of the alert box. If that works as expected you know that everything is reaching the target Mac as it should and the issue is somewhere in your macro.

1 Like

Here is what I am doing.
On firing Mac:


On the target Mac:

And the message received on target Mac:
CapturFiles-202204119_1 PM0454

I think this is the way one uses it, but It is not working for me.

Change the "Comment" section in your action so it exactly matches mine. Case is important -- "triggerValue" does not equal "TriggerValue".

%TriggerValue% -- use that, and exactly that. The easiest way to insert it is to click "Insert Token", then "Macro Information", then "Tripped Trigger Value".

This:

is incorrect.

You are confused as to what happens in the receiving macro.

In the receiving macro, no variables are affected. This is why you are seeing “old values” - none of those variables are being changed.

In the receiving macro, the TriggerValue token has a value of “TriggerValue=something” (in your macro case) - that is, it contains whatever is after the “?” in the URL, or in the parameter field of the Remote Trigger action.

In your alert, delete everything and just use “%TriggerValue%”.

That helped.
Thanks for all of your help and suggestions.
ric