Skip to content
MyAppBuilder
BetaWorkflow trigger

An incoming webhook

Beta — ready to use, but some details may still change.

Overview

Another service starts the workflow by calling a signed URL with a JSON payload (payment received, message delivered…).

Purpose

Receive events from outside: a payment provider confirming a payment, a calendar tool sending a new appointment, a form service forwarding submissions.

Inputs

  • Payload fields (optional) — the JSON keys you expect, with a type (text, number, yes/no, object, list, any) and whether they are required. Deliveries that don't match are refused (HTTP 400) and only declared keys reach the steps. Without fields, any JSON object is accepted as is.
  • Test URL / Live URL — created in the trigger panel by a workspace admin, each with its own signing secret (shown once; rotate it any time, revoke the URL to close it).

Configuration

  • The sender signs every delivery: headers X-MAB-Timestamp (unix seconds, ±5 minutes), X-MAB-Delivery (a unique id, reused when it retries) and X-MAB-Signature: v1=<hex HMAC-SHA256 of "<timestamp>.<delivery>.<raw body>">. The trigger panel has copy-paste snippets.
  • The test URL runs the draft workflow on test data — outgoing API writes, webhooks and emails of the run are captured, not sent. The live URL runs the published workflow on live data: publish after changing the workflow.
  • Design and debug with Test run and an Input JSON that mirrors the payload; the trigger panel lists recent deliveries (accepted, rejected and why).

Outputs

  • {{event.<key>}} — keys of the payload (in Test run: the Input JSON).
  • Available data in every step: Current record / {{record.field_key}} (the record that triggered the run), Event / {{event.name}} (inputs passed to the run; {{event.before.field_key}} holds the previous values after an update), Action results / {{results.key}} (values saved by earlier steps) and Current user / {{user.email}} (whoever caused the run; for test runs, you).

Example

Payment received

Example
Trigger: An incoming webhook · Payload fields: invoiceId (text, required), amount (number)
Step 1  Database › Update record  Invoices · Which record: {{event.invoiceId}} · Status = paid
Step 2  Notification  Title: Invoice {{event.invoiceId}} paid ({{event.amount}})

Sender: POST <live URL> with the three X-MAB-… headers

Errors

  • 401 — missing headers, wrong signature (wrong or rotated secret, body changed after signing) or a timestamp older than 5 minutes.
  • 400 — body over 256 KB, not JSON, or not matching the payload fields (the response lists the field problems).
  • 404 — unknown or revoked URL. 409 — workflow disabled, trigger changed, app not published (live URL), or the same delivery is still running. 429 — more than 120 deliveries a minute.
  • 500 — the workflow failed with an error; its record changes were rolled back and the sender may retry the same delivery id.

Limitations

  • Beta. JSON bodies only (no form-encoded or XML), up to 256 KB; signature scheme v1 only.
  • A delivery id that succeeded is answered as a duplicate for 48 hours and never runs twice; rotating a secret invalidates the old one immediately (no overlap period).
  • Runs hold the project's data lock like manual runs — keep slow steps out of workflows that check and write records.

Advanced

  • Trigger: { type: "webhook", payload?: [{ key, type, required? }] }. Endpoint POST /api/hooks/<projectId>/<hookId> (src/app/api/hooks, src/server/integrations/incoming.ts): tenant check → rate limits → size → signature/timestamp → JSON + declared fields → delivery-id claim (integration_webhook_deliveries) → runWorkflow(ctx, wf, { type: "webhook", input, idempotencyKey: "hook:<delivery>" }) under the data lock.
  • Hooks are integration_connections rows (kind incoming_webhook, env test | live); the HMAC secret is an encrypted_secrets row with the reserved key __hook_<id>, unreadable through the secrets API and {{secret.X}}. Run rows store { type: "webhook" } only; delivery logs keep sizes and field names, never values.

Related

Was this helpful?