Automation webhooks
Start an automation from any other system, such as a form, a payment, a ticketing tool or a plant's own control system, with one request to the automation's own address.
/api/hooks/{token}PUT and GET are accepted on the same address, for systems that cannot send POST.
Get the address
- 1
Add the trigger
In a device's automation, add the step When a webhook is called and connect the steps that should follow.
- 2
Copy the address
Save the flow. The step shows its own address, ending in a long random token.
- 3
Switch the flow on
Calls to a flow that is switched off answer
409.
Send data
Send a JSON object of up to 64 KB. Steps read it as {{ json.field }}. When the body has a value field, it is also {{ value }}, the value the first step compares and passes on.
curl -X POST "https://maxwelltrack.com/api/hooks/YOUR_WEBHOOK_TOKEN" \
-H "Content-Type: application/json" \
-d '{"value": 1, "order": "A-1042", "requested_by": "Front desk"}'Responses
| Code | Meaning |
|---|---|
202 | Accepted. The automation starts; the answer does not wait for it to finish. |
404 | Unknown address, including one whose step was deleted. |
409 | The automation is switched off. |
429 | More than 60 calls a minute to one address, or 300 a minute from one network address. |
Each run appears in the automation's Runs panel with the data it received.
The address is the key
Anyone who has the address can start the automation. Share it only with the system that calls it. To retire an address, delete the step; a copied or duplicated step always gets a new address.
Use Test in the automation editor to run a webhook trigger with a JSON body you type, before any other system calls it.
Something unclear or out of date on this page? Tell support.
