https://connie.ai/<workspace-id>/workflows/<workflow-id>
Set up a webhook trigger
Add the Custom Webhook trigger
Copy the Webhook URL
https://connie.ai/api/webhooks/ followed by a long ID. Each Custom Webhook trigger has its own URL.Send a test request
Pick the test event
Build the steps, then set it live
Send data to the webhook
- Method:
POST. - Body: valid JSON. Send the header
Content-Type: application/json. A body that isn’t valid JSON (form-encoded, XML, empty) is refused with400 {"error":"Invalid JSON body"}. - Plain values only: a body that holds a variable such as
{{name}}, an expression such as{= 1 + 1 =}, or a function such aslower(...), in any key or value, is refused with400(see Use the payload in your steps). - Address: always use the
https://URL exactly as copied. - Authentication: none by default. The URL itself is the key. If Require secret is on, send the secret in the
x-webhook-secretheader (see Security).
Use the payload in your steps
Every key in the JSON you send becomes a variable under the Custom Webhook group. With the example above:{{Custom Webhook.email}}, not {{Custom Webhook.body.email}}.
When Connie builds a webhook workflow in chat, the field names its steps read stay unconfirmed until a test event arrives. Once you’ve sent one, ask Connie to check the fields: its check compares every step with the captured test event and names any field the event doesn’t have, or a field read from a list without saying which item ({{Custom Webhook.items.sku}} stays empty).
The payload only fills in the variables you insert. It can’t change a step’s settings, such as where an Api Call sends, who an email goes to, or Require approval, even when a key in it has the same name as a step.
Send plain values. Variables belong in your steps, not in the payload: a request whose payload holds a variable (such as {{Custom Webhook.email}} or {{connie.env.API_KEY}}), an expression ({= … =}) or a function (such as lower(...) or now()) is refused with 400 {"error": "Webhook body can't contain variables"}. Nothing runs and it isn’t saved as a test event. The response’s field names the key to fix, for example "data.name". Text that only reads like a function is refused too, such as "call me if (urgent)".
Example: a website “Book a demo” form posts name, email and company. The workflow uses Search records in a list or object to look up {{Custom Webhook.email}}, Create or update a record in a list to add the lead to your Inbound list, and Send Slack Message to tell your team.
Responses
200 bodies for a started run and a draft workflow. The DUPLICATE_EVENT response and error responses are never replaced.
A GET request to the URL returns a short description of how to call it; it doesn’t start a run.
Send your own response
Turn on Custom Response (“Return a custom JSON body to the webhook caller”). The default is{"status":"ok"}. You can echo values from the incoming request, for example {{body.email}} (“Use {{body.field}} to echo payload values”). If the text isn’t JSON, it’s returned as plain text, which is useful for apps (such as Slack) that verify a webhook by expecting a value echoed back.
If any value in your custom response can’t be filled from the request, the default response is sent instead.
Duplicate requests
Many apps retry a webhook if they don’t hear back quickly. To stop the same event running twice, have the sending app include one of these headers with a unique value per event:Idempotency-Key, X-Idempotency-Key, X-Webhook-Id, X-Delivery-Id or X-Event-Id. X-Message-Id and X-Request-Id aren’t used for this, so two different events that share one of them each start their own run. A repeat with the same value doesn’t run, and gets 200 with "code": "DUPLICATE_EVENT". It’s answered with 200, not an error, so the sending app stops retrying.
Without one of those headers, an identical request is refused with 409 and "code": "RUN_IN_PROGRESS" while the previous identical run is still running. After that run finishes, it runs again.
Security
Require secret
To accept only requests from your own app, turn on Require secret in the trigger panel (“Only run when the request sends this secret in the x-webhook-secret header”). Connie creates a secret and shows it under Secret. Copy it, save the trigger, and have the sending app send it in thex-webhook-secret header:
401 {"error":"Invalid or missing webhook secret"}. It doesn’t start a run and isn’t saved as a test event. The Example request in the panel includes the header once the secret is on.
- New secret creates a different secret. After you save it, the old one stops working, so update the sending app.
- Turning Require secret off deletes the secret. Turning it on again creates a new one.
- Connie doesn’t check signatures (HMAC), and signature headers from the sending app are ignored.
- Whoever has the URL can only send data. The payload fills the variables in your steps, but it can’t change a step’s settings or read your saved secrets, and a payload that holds a variable is refused (see Use the payload in your steps).
- Add a Router or Filter Records by condition step early in the workflow to ignore requests that don’t look right (for example, missing a field only your app sends).
- Duplicating a workflow gives the copy a new webhook URL, with Require secret off. The original keeps its URL and its secret.
Good to know
- Requests are saved as test events, even in draft and once live. A request is saved only when its fields differ from every test event already saved, and only the 10 most recent are kept. With Require secret on, only requests with the right secret are saved. A request refused for a variable in its payload isn’t saved.
- Running hours in Workflow settings apply to webhook runs. Outside those hours, requests wait (or are dropped if Queue triggers outside of window is off).
- Each webhook URL accepts up to 200 requests a minute. More than that gets
429until the minute has passed, and those requests aren’t saved or run, so have the sending app wait forRetry-Afterand send them again. Each workflow’s URL has its own limit. A request refused for a wrong secret doesn’t count. - Credits are checked before every webhook run. Each run is charged for the paid steps it uses. See Credits.
- The webhook is the only way to start a workflow from outside Connie, apart from MCP. See Developers.
Troubleshooting
Webhook is inactive. Test payload saved.
Webhook is inactive. Test payload saved.
400 Invalid JSON body
400 Invalid JSON body
Content-Type: application/json.400 Webhook body can't contain variables
400 Webhook body can't contain variables
{{name}}), an expression ({= … =}) or a function (such as lower(...)). The response’s field says which one. Plain text that reads like a function, such as if (urgent), counts too.
Fix: Have the sending app send the plain value instead. To use the value in a step, insert it there from the variable picker, for example {{Custom Webhook.name}}.401 Invalid or missing webhook secret
401 Invalid or missing webhook secret
x-webhook-secret header. The secret may have been replaced with New secret.
Fix: Copy the Secret again from the trigger panel and send it in the x-webhook-secret header, or turn Require secret off.429 Too many requests
429 Too many requests
Retry-After header, then send them again. To send more, spread the requests out, or send several records in one request and go through them with a For each step.404 Webhook not found
404 Webhook not found
402 Your credit balance is depleted / Insufficient credits to run this flow
402 Your credit balance is depleted / Insufficient credits to run this flow
The request returned 200 but nothing ran
The request returned 200 but nothing ran
"code": "DUPLICATE_EVENT").
Fix: Set the workflow live. For duplicates, make sure each event has its own idempotency value.409 Run already in progress
409 Run already in progress
Idempotency-Key header with each one.Some events never ran
Some events never ran
The same request ran twice
The same request ran twice
Idempotency-Key header.My custom response came back as the default
My custom response came back as the default
The payload fields don't show in the variable picker
The payload fields don't show in the variable picker
My app says the webhook redirected
My app says the webhook redirected
http://.
Fix: Use the https:// URL exactly as copied.Related
- Triggers — all trigger types
- Variables — using payload fields in steps
- Test and run — set live and read results
- Developers — other ways to build on Connie