Trigger a workflow from a webhook
A webhook trigger gives a workflow its own URL. Any system that can send a signed POST request can start the workflow, and the workflow can read what was sent.
Add the trigger
- Open the workflow and use the Triggers panel in the editor header.
- Choose webhook and click Add webhook trigger.
- Copy the URL that appears:
https://api.10ex.ai/webhooks/wf/WORKFLOW_ID/TOKENThe rotate button next to it issues a new token and stops the old URL from working.
The workflow must be active. A paused or draft workflow answers 404.
Send a request
Every request must carry an HMAC-SHA256 signature of the raw body, as a hex string, in the X-Signature header. Requests with a missing or wrong signature get a 404, the same answer as a wrong URL.
BODY='{"email":"jane@acme.co","plan":"pro"}'
SIG=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$SECRET" | awk '{print $NF}')
curl -X POST "https://api.10ex.ai/webhooks/wf/WORKFLOW_ID/TOKEN" \
-H "Content-Type: application/json" \
-H "X-Signature: $SIG" \
-d "$BODY"A good request returns 202 with the run:
{ "execution_id": "..." }The workflow runs after the response, so 202 means it was accepted, not finished. Follow the run in the workflow’s run list.
Current limit: signing is required, but the Triggers panel shows only the URL, not the signing secret. Until the secret is shown in the app, you can’t call a webhook trigger from your own system. This page will be updated when that changes.
Read the request inside the workflow
The trigger exposes three things to the steps after it:
| Field | What it holds |
|---|---|
trigger.body | The JSON body, or the raw text if it isn’t JSON |
trigger.query | The query-string parameters |
trigger.headers | A short list of safe headers: content-type, content-length, user-agent, x-forwarded-for, x-request-id, x-signature |
Limits and errors
| Answer | Meaning |
|---|---|
202 | Accepted, the workflow run started |
404 | Wrong workflow or token, workflow not active, trigger disabled, or bad signature. 10ex doesn’t say which |
413 | Body larger than 256 KB |
429 | Too many requests: 120 a minute per source IP, 60 a minute per workflow |