Remote trigger return value

I was wondering if it was possible to have the Remote Trigger url return perhaps a json payload on completion.

Nope.

For one thing, the whole thing is asynchronous. As in, the trigger URL tells the server to trigger the macro, and the server returns the number of Keyboard Maestro’s listening for that trigger. And then it goes off and tells each Keyboard Maestro about to trigger the macro. And then the Keyboard Maestro’s run the macro, but the server is long done worrying about it.

For another, as is probably apparently from all the plurals in that paragraph, there may be more than one Keyboard Maestro triggered by the URL, and thus there would be more than one response.

But in any event, no, there is no communication back from Keyboard Maestro to the server or from the server to the client.

You can have your macro send your JSON payload via some other mechanism though, but probably not via the remote trigger server unless the payload is quite small.

Makes sense.. I was hoping for a 'feature' here..

I think I'm going to just continue to use 'ssh' to execute macros and have them output json.

For the record.. my use case here is to integrate Keyboard Maestro at home with iOS Shortcuts. So far so good, and it really allows for some pretty powerful iOS / home Mac integrations.

Thanks!

1 Like