Skip to content

Start a flow from a webhook ​

A Webhook trigger gives your flow its own URL. Any system that can send an HTTP request, such as your website's backend, a form tool or a script, can start the flow by sending JSON to that URL. The JSON becomes the trigger's output, so later steps can use it.

1. Add the trigger and copy its URL ​

  1. In your flow, click Add trigger. In Choose a trigger, open Built-in, choose Webhook, then Webhook Trigger.
  2. The settings show a URL Group with two read-only values, generated for this trigger:
SettingWhat it is
Hook URLThe address to send requests to. Use the copy button next to it.
Hook API KeyThe key the caller must send with each request. It's masked. Reveal it and copy it.

The URL has the form https://<organization ID>.<domain>/triggers/<webhook ID>. Always copy it from the trigger rather than building it yourself.

Treat the API key like a password. Anyone with both values can start your flow.

Copies get a new URL

If you duplicate the flow or import it, the copy's webhook gets a new URL and key. Update any caller that should start the copy.

2. Publish ​

A webhook starts the published version of the flow, and only while the flow is turned on. Click Publish before you send a request. If you change the flow later, publish again. See Versions and publishing.

3. Send a test request ​

Send a POST request with a JSON body and the API key as a Bearer token:

bash
curl -X POST 'https://<organization ID>.<domain>/triggers/<webhook ID>' \
  -H 'Authorization: Bearer <Hook API Key>' \
  -H 'Content-Type: application/json' \
  -d '{"name": "Aiko Tanaka", "email": "aiko@example.com"}'

A 200 response means the request was accepted:

json
{
  "result": "ok",
  "details": {
    "message": "Workflow executed successfully",
    "runId": "…",
    "…": "…"
  }
}

Open Executions to see the run. Filter by Trigger › Webhook to find it quickly. If the response isn't 200, see the error list in the Webhook API reference.

4. Use the request body in later steps ​

The JSON body becomes the trigger's output. To use a value in a step, type $, choose Current Trigger, and pick the field, or type the reference yourself:

In the request bodyReference
"name": "Aiko Tanaka"$trigger.output.name
"customer": {"id": "C-102"}$trigger.output.customer.id
"items": [{"sku": "A1"}, …]$trigger.output.items[0].sku

A webhook has no fixed fields, so the $ list may not show the ones your caller sends. Send one test request, open the run in Executions, and look at the trigger's output to see exactly what arrived.

Two details to know:

  • If the body has a top-level data field, only what's inside data becomes the output. {"data": {"name": "Aiko"}} gives $trigger.output.name.
  • The output also gets triggerType (always webhook) and timestamp (when the trigger ran, in milliseconds since 1970). Don't send fields with these names, because they're overwritten.

5. Respond to the caller ​

The webhook answers as soon as it has accepted the request, before the flow runs. The response is always the same acknowledgement, so the flow can't put its own result in it.

If the caller needs the result, have the flow send it back. Add an HTTP step at the end of the flow that calls the caller's API, for example with the result and an ID that was in the original request.