User Tools

Site Tools


trigger:Remote

The Remote trigger (v8+) lets you execute a trigger remotely without authentication via a Stairways Software web server.

⚠️ Anyone who knows the trigger code can trigger this macro from anywhere on the Internet so it should generally only be used with a safe macro such as restarting a service that is always supposed to be running, or launching iTunes or some other fairly innocuous activity.

⚠️ Because this trigger relies on a Stairways Software web server, and Keyboard Maestro is not sold as a service, this part of Keyboard Maestro is not guaranteed indefinitely - at some time the server will no longer be maintained and the trigger will stop working.

⚠️ Because this trigger operates over the Internet, through a Stairways Software web server, as well as over the Internet between Keyboard Maestro on your Mac and the Stairways Software web server, the trigger will not be 100% reliable, so it should not be used in cases where it is essential that the trigger gets through.

⚠️ Note that this trigger has nothing to do with the in-built Keyboard Maestro web server, this trigger works entirely independently of that and turning the in-built web server on or off will not affect this trigger.

The trigger works defining a URL in the form of:

https://trigger.keyboardmaestro.com/t/<UniqueID1>/<UniqueID2>?TriggerValue

UniqueID1 can either be specified by you, or can be a unique ID for your Mac (so that each Mac you sync macros to has a different trigger value).

UniqueID2 can be defined by you, and defaults to a Globally Unique ID.

If more than one macro (on any Mac, anywhere in the world, yours, or anyone else's) has the same pair of UniqueIDs, then all those macros will trigger when the URL is accessed.

Generally, you should use the default values unless there is some reason to change them (such as explicitly wishing to trigger multiple macros in multiple locations).

The %TriggerValue% token will hold the TriggerValue from the accessed URL.

As with all triggers, macros are only available if they are currently active, that is if they are enabled and in a Macro Group that is enabled and active.

For example, if you are running some sort of process on your Mac that occasionally fails, you could write a script to restart it and make it available as a Remote triggered Macro, which you (or anyone else) could then execute to restart the process.

You can also connect up web services (eg HealthChecks.io) to trigger a macro based on whatever conditions they operate on.

Clearly there are some serious security issues with this, so you should use a lot of caution when you allow any macro to be executed with a Remote trigger.

See Also

Triggers

trigger/Remote.txt · Last modified: 2017/09/04 22:39 by peternlewis