This trigger will fire on this device when the specified web URL is called from anywhere. The webhook uses Firebase Cloud Messaging to deliver notifications to your device, enabling remote triggering of macros from any device or service that can make HTTP requests.

Options

  • Identifier: Custom text appended to your webhook URL (e.g., "mywebhook" creates https://trigger.macrodroid.com/[device-id]/mywebhook)
  • IP Address Whitelist: Restrict which IP addresses can trigger the webhook (supports wildcards and Magic Text)
  • Variable Whitelist: Enable to restrict which variables can be updated via webhook parameters
  • Save Body to Variable: Save the HTTP POST request body to a string variable (max 3800 characters)

URL Format

Your webhook URL follows this format:

https://trigger.macrodroid.com/[device-id]/[identifier]

Passing Variables

Variables can be passed via URL query parameters:

  • Single variable: ?VARNAME=value
  • Multiple variables: ?VARNAME1=42&VARNAME2=text
  • Dictionary/Array values: ?mydict(KEY)=VALUE or ?mydict(KEY1)(KEY2)=VALUE

Supported variable types: String, Integer, Decimal, Boolean

Device ID Management

  • Export Device ID: Share your device ID with password protection to port to a new device
  • Import Device ID: Import a previously exported device ID to maintain existing webhook URLs
  • Generate New Device ID: Create a new device ID (invalidates all existing webhook URLs)
  • Refresh Cloud Token: Re-upload the Firebase Cloud Messaging token to resolve connection issues

TinyURL Integration

Generate a shortened URL via TinyURL for easier sharing. The shortened URL format is:

[tinyurl]/[identifier]

Local Variables

Magic text variables available with this trigger include:

  • Webhook request IP address
  • Query parameters

Examples

Triggers

Webhook (URL): lights_on
Actions

Send Intent: Turn on smart lights
Notification: Lights turned on via webhook

Remote control for smart home lights via webhook URL call.


Triggers

Webhook (URL): set_volume
Actions

Set Volume - Media: [volume_level]
Speak Text: Volume set to [volume_level]

Set device volume remotely by calling: https://trigger.macrodroid.com/[device-id]/set_volume?volume_level=50

Notes

  • Requires Google Play Services and Firebase Cloud Messaging to function. Will not work on devices without Google Services.
  • The URL is unique to each device and will change if the app is reinstalled or all app data is cleared.
  • Use the Export/Import Device ID feature to preserve webhook URLs when switching devices.
  • IP Address Whitelist supports wildcards (* and ?) and Magic Text for dynamic IP matching.
  • Variable Whitelist protects against unauthorized variable modifications when enabled.
  • POST request body content is limited to 3800 characters when saving to a variable.
  • The webhook is delivered via cloud push notification, so the device needs internet connectivity.

See Also