Skip to Content
Welcome to 10ex Docs. Start with the Quickstart, or browse Guides, Concepts, Agents, Developers and Use cases.
DevelopersTrigger a workflow from a webhook
How-to

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

  1. Open the workflow and use the Triggers panel in the editor header.
  2. Choose webhook and click Add webhook trigger.
  3. Copy the URL that appears:
https://api.10ex.ai/webhooks/wf/WORKFLOW_ID/TOKEN

The 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:

FieldWhat it holds
trigger.bodyThe JSON body, or the raw text if it isn’t JSON
trigger.queryThe query-string parameters
trigger.headersA short list of safe headers: content-type, content-length, user-agent, x-forwarded-for, x-request-id, x-signature

Limits and errors

AnswerMeaning
202Accepted, the workflow run started
404Wrong workflow or token, workflow not active, trigger disabled, or bad signature. 10ex doesn’t say which
413Body larger than 256 KB
429Too many requests: 120 a minute per source IP, 60 a minute per workflow
Last updated on