Webhook trigger
A webhook trigger launches the process when another system calls it over HTTP: a WhatsApp bot (Mosend), an n8n flow, the customer’s system. The call body reaches the process as its inputs and, if the caller can wait, it receives the outputs in the same response.
Create the trigger
Section titled “Create the trigger”- Open Centro › Robots › Disparadores and click Nuevo disparador (New trigger).
- Under Qué ejecuta (What it runs), pick Un proceso and which one.
- Under Cuándo corre (When it runs), pick Otro sistema lo llama (Another system calls it). Set the Espera máxima por la respuesta (segundos, 0–60) (maximum wait for the response); 25 by default. It is the cap the caller can ask for to get the result in the same response.
- Under Dónde corre (Where it runs), pick the machine and, if the process is a Windows one, the robot session: it is required to run unattended.
- If the process declares inputs, fill in their default values: whatever arrives in the call body overrides them.
- Under Revisar y crear (Review and create), give it a name (e.g.
Invoice lookup from WhatsApp) and click Crear disparador (Create trigger).
The trigger row shows its URL with a button to copy it, and how many times it has fired. The URL carries a key (wk_…) that is the authentication: no user or token is needed.
Call it
Section titled “Call it”curl -s -X POST "https://<your-api>/public/triggers/wk_...?wait=25" \ -H "Content-Type: application/json" \ -d '{"customer":"ACME","invoice":"FV-1001"}'- Body: a JSON object is passed as-is as the process inputs. Anything else (text, a list) arrives wrapped in
{ "payload": … }. Keys starting with_are reserved and dropped. ?wait=N(or theX-Zoan-Waitheader): seconds the call waits for the result, up to the trigger’s cap. Withoutwait, the call returns right away.
| Response | When |
|---|---|
200 with outputs | The process finished within the wait. |
202 with execution_id | Still running (or no wait was requested). Check later with GET /public/triggers/<key>/executions/<execution_id>. |
404 | The key does not exist (or was regenerated). |
409 | The trigger is off, the process has no published version or the robot session is missing. |
429 | Too many calls: up to 120 per minute per key and origin. |
Next steps
Section titled “Next steps”- Start cases of a flow — the same kind of webhook can start a whole flow, with an idempotency key.
- Scheduled trigger — launch the process at a fixed time or frequency.
- Queue trigger — launch it when a queue has work.
- States and lifecycle — what happens to the execution it creates.