The webhook connector accepts JSON payloads from your own systems. Configure a data source, point your app at the resulting URL with the signing secret, and the platform stores the payloads — bound blocks read them viaDocumentation Index
Fetch the complete documentation index at: https://docs.chatblocks.ai/llms.txt
Use this file to discover all available pages before exploring further.
webhook.latest, webhook.aggregate, and webhook.list queries.
This is the “push from anywhere” connector. Use it when you have a service that emits events (cron job, status checker, Slack workflow) and you want the platform to display the latest values.
Add a webhook data source
Pick a label and save
The wizard creates the source and returns a single-use secret-reveal panel with the signing secret in plaintext. You’ll see it exactly once. Store it in your app’s secret manager.
Wire format
Every inbound request needs three things: a signature header, an idempotency key, and a JSON body under 256 KB.Headers
| Header | Required | Format |
|---|---|---|
X-ChatBlocks-Signature | yes | t=<unix>,v1=<hex> (Stripe-style; leaves room for a v2 scheme). |
Idempotency-Key | yes | Any unique string per logical event. Reject without it (400). |
Content-Type | yes | application/json. |
Signing
The signed payload is<unix>.<body>, HMAC-SHA256 with the per-source signing secret, hex-encoded.
Limits and policies
| Constraint | Value |
|---|---|
| Body size | 256 KB |
| Replay window | 5 minutes |
| Clock skew tolerance | ±60 seconds |
| Idempotency-Key | required; dedup via webhookEvents |
| Storage cap per source | 1000 most recent payloads (enforced inline on insert) |
crypto.subtle.importKey + subtle.verify) — Convex’s V8 runtime constraint. Reject 401 on signature mismatch, 400 on missing/malformed headers, 413 on oversize body.
Query catalog
Three first-class queries against stored payloads (seeapps/web/convex/lib/connectors/webhookQueries.ts):
webhook.latest
webhook.latest
Returns the most recent payload’s body. No params.Result: the raw JSON body of the latest payload (or
null if none).Use for “show me what just happened.”webhook.aggregate
webhook.aggregate
Folds numeric values across payloads in a time window.
window is one of "15m", "1h", "24h", "7d". op is "sum", "count", or "avg". Numeric coercion via Number(x); null and NaN values are skipped.Result:webhook.list
webhook.list
Returns the N most recent payloads.
sortBy is an optional in-memory JSONPath sort over the payloads; order is "asc" or "desc". Default order: most recent first.Bind a block
widget.data. On every inbound POST the receiver schedules a refresh — push-mode by default.
Rotating and deleting
- Rotate secret — generates a fresh signing secret and shows it once. Old secret stops validating immediately.
- Delete source — sweeps the source’s payloads and event-dedupe rows in addition to the source row itself. Bound blocks lose their data feed; the binding stays on the manifest until you update the block.
What’s next
Outbound MCP
Connect to a third-party MCP server.
Audit log
Every payload + decrypt is logged with the calling actor.