Skip to content

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.

  1. Open Centro › Robots › Disparadores and click Nuevo disparador (New trigger).
  2. Under Qué ejecuta (What it runs), pick Un proceso and which one.
  3. 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.
  4. 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.
  5. If the process declares inputs, fill in their default values: whatever arrives in the call body overrides them.
  6. 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.

Ventana de terminal
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 the X-Zoan-Wait header): seconds the call waits for the result, up to the trigger’s cap. Without wait, the call returns right away.
ResponseWhen
200 with outputsThe process finished within the wait.
202 with execution_idStill running (or no wait was requested). Check later with GET /public/triggers/<key>/executions/<execution_id>.
404The key does not exist (or was regenerated).
409The trigger is off, the process has no published version or the robot session is missing.
429Too many calls: up to 120 per minute per key and origin.