Fires signed HTTP callbacks when documents in chosen collections are created, updated or deleted. Deliveries run through Payload's Jobs Queue with retries and a circuit breaker, so a job runner must be configured. Endpoints can be set in config or managed from an admin collection, and a delivery log records each attempt. Requires Payload 3.
Generic outbound webhooks for Payload CMS: fire signed HTTP callbacks on collection create/update/delete, delivered durably via the Jobs Queue.
Installation
npm i payload-plugin-outbound-webhooks0
Stars
0
Forks
0
Open Issues
2 months ago
Last Updated
6
Weekly Downloads
v0.3.5
npm Version
57.8 KB
Unpacked Size
0
Dependencies
00 since Sep 20
| Date | Stars |
|---|---|
| Dec 5, 2026 | 0 |
| Dec 4, 2026 | 0 |
| Dec 3, 2026 | 0 |
| Dec 2, 2026 | 0 |
| Dec 1, 2026 | 0 |
| Nov 30, 2026 | 0 |
| Nov 29, 2026 | 0 |
| Nov 28, 2026 | 0 |
| Nov 27, 2026 | 0 |
| Nov 26, 2026 | 0 |
| Nov 25, 2026 | 0 |
| Nov 24, 2026 | 0 |
| Nov 23, 2026 | 0 |
| Nov 22, 2026 | 0 |
| Nov 21, 2026 | 0 |
| Nov 20, 2026 | 0 |
| Nov 19, 2026 | 0 |
| Nov 18, 2026 | 0 |
| Nov 17, 2026 | 0 |
| Nov 16, 2026 | 0 |
| Nov 15, 2026 | 0 |
| Nov 14, 2026 | 0 |
| Nov 13, 2026 | 0 |
| Nov 12, 2026 | 0 |
| Nov 11, 2026 | 0 |
| Nov 10, 2026 | 0 |
| Nov 9, 2026 | 0 |
| Nov 8, 2026 | 0 |
| Nov 7, 2026 | 0 |
| Nov 6, 2026 | 0 |
| Nov 5, 2026 | 0 |
| Nov 4, 2026 | 0 |
| Nov 3, 2026 | 0 |
| Nov 2, 2026 | 0 |
| Nov 1, 2026 | 0 |
| Oct 31, 2026 | 0 |
| Oct 30, 2026 | 0 |
| Oct 29, 2026 | 0 |
| Oct 28, 2026 | 0 |
| Oct 27, 2026 | 0 |
| Oct 26, 2026 | 0 |
| Oct 25, 2026 | 0 |
| Oct 24, 2026 | 0 |
| Oct 23, 2026 | 0 |
| Oct 22, 2026 | 0 |
| Oct 21, 2026 | 0 |
| Oct 20, 2026 | 0 |
| Oct 19, 2026 | 0 |
| Oct 18, 2026 | 0 |
| Oct 17, 2026 | 0 |
| Oct 16, 2026 | 0 |
| Oct 15, 2026 | 0 |
| Oct 14, 2026 | 0 |
| Oct 13, 2026 | 0 |
| Oct 12, 2026 | 0 |
| Oct 11, 2026 | 0 |
| Oct 10, 2026 | 0 |
| Oct 9, 2026 | 0 |
| Oct 8, 2026 | 0 |
| Oct 7, 2026 | 0 |
| Oct 6, 2026 | 0 |
| Oct 5, 2026 | 0 |
| Oct 4, 2026 | 0 |
| Oct 3, 2026 | 0 |
| Oct 2, 2026 | 0 |
| Oct 1, 2026 | 0 |
| Sep 30, 2026 | 0 |
| Sep 29, 2026 | 0 |
| Sep 28, 2026 | 0 |
| Sep 27, 2026 | 0 |
| Sep 26, 2026 | 0 |
| Sep 25, 2026 | 0 |
| Sep 24, 2026 | 0 |
| Sep 23, 2026 | 0 |
| Sep 22, 2026 | 0 |
| Sep 21, 2026 | 0 |
| Sep 20, 2026 | 0 |
3−552 since Sep 23
| Date | Weekly downloads |
|---|---|
| Dec 5, 2026 | 3 |
| Dec 4, 2026 | 3 |
| Dec 3, 2026 | 3 |
| Dec 2, 2026 | 6 |
| Dec 1, 2026 | 8 |
| Nov 30, 2026 | 8 |
| Nov 29, 2026 | 7 |
| Nov 28, 2026 | 7 |
| Nov 27, 2026 | 7 |
| Nov 26, 2026 | 7 |
| Nov 25, 2026 | 8 |
| Nov 24, 2026 | 6 |
| Nov 23, 2026 | 11 |
| Nov 22, 2026 | 13 |
| Nov 21, 2026 | 13 |
| Nov 20, 2026 | 13 |
| Nov 19, 2026 | 14 |
| Nov 18, 2026 | 12 |
| Nov 17, 2026 | 12 |
| Nov 16, 2026 | 9 |
| Nov 15, 2026 | 8 |
| Nov 14, 2026 | 8 |
| Nov 13, 2026 | 9 |
| Nov 12, 2026 | 12 |
| Nov 11, 2026 | 9 |
| Nov 10, 2026 | 9 |
| Nov 9, 2026 | 10 |
| Nov 8, 2026 | 10 |
| Nov 7, 2026 | 15 |
| Nov 6, 2026 | 19 |
| Nov 5, 2026 | 16 |
| Nov 4, 2026 | 16 |
| Nov 3, 2026 | 18 |
| Nov 2, 2026 | 19 |
| Nov 1, 2026 | 18 |
| Oct 31, 2026 | 15 |
| Oct 30, 2026 | 9 |
| Oct 29, 2026 | 8 |
| Oct 28, 2026 | 8 |
| Oct 27, 2026 | 7 |
| Oct 26, 2026 | 9 |
| Oct 25, 2026 | 11 |
| Oct 24, 2026 | 11 |
| Oct 23, 2026 | 11 |
| Oct 22, 2026 | 16 |
| Oct 21, 2026 | 21 |
| Oct 20, 2026 | 21 |
| Oct 19, 2026 | 15 |
| Oct 18, 2026 | 14 |
| Oct 17, 2026 | 13 |
| Oct 16, 2026 | 15 |
| Oct 15, 2026 | 16 |
| Oct 14, 2026 | 11 |
| Oct 13, 2026 | 14 |
| Oct 12, 2026 | 15 |
| Oct 11, 2026 | 15 |
| Oct 10, 2026 | 24 |
| Oct 9, 2026 | 26 |
| Oct 8, 2026 | 23 |
| Oct 7, 2026 | 27 |
| Oct 6, 2026 | 23 |
| Oct 5, 2026 | 25 |
| Oct 4, 2026 | 38 |
| Oct 3, 2026 | 37 |
| Oct 2, 2026 | 44 |
| Oct 1, 2026 | 82 |
| Sep 30, 2026 | 108 |
| Sep 29, 2026 | 663 |
| Sep 28, 2026 | 660 |
| Sep 27, 2026 | 646 |
| Sep 26, 2026 | 637 |
| Sep 25, 2026 | 626 |
| Sep 24, 2026 | 585 |
| Sep 23, 2026 | 555 |
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/1378504171-root)<a href="https://payloaddirectory.dev/plugins/1378504171-root"><img src="https://payloaddirectory.dev/badge/1378504171-root.svg" alt="Payload Directory"></a>README
Generic outbound webhooks for Payload CMS. Fire signed HTTP callbacks whenever documents in chosen collections are created, updated, or deleted — delivered through Payload's Jobs Queue so it's non-blocking and durably retried.
Payload doesn't ship a generic "POST to a URL on document change" mechanism. This plugin adds one, aimed at wiring Payload into Zapier/Make/n8n, syncing to a CRM, or notifying any external service.
pnpm add payload-plugin-outbound-webhooks
// payload.config.ts
import { outboundWebhooksPlugin } from 'payload-plugin-outbound-webhooks'
export default buildConfig({
// ...
jobs: {
// Required: the plugin delivers via the Jobs Queue, so it needs a runner.
autoRun: [{ cron: '*/10 * * * * *', limit: 10, queue: 'default' }],
},
plugins: [
outboundWebhooksPlugin({
collections: {
posts: { events: ['create', 'update'] },
orders: {},
},
endpoints: [
{
label: 'CRM sync',
url: 'https://example.com/hooks/payload',
subscriptions: ['orders.*'],
secret: process.env.WEBHOOK_SECRET,
},
],
}),
],
})
By default the plugin adds a webhookEndpoints collection so editors can add, disable, or remove destinations without a deploy. Set enableEndpointsCollection: false to turn this off and rely solely on the endpoints array in your config.
Endpoints from both sources are merged at delivery time and matched against a collection.event string, e.g. orders.create. Use * as a wildcard on either side: orders.* matches every event on orders; *.delete matches deletes on any watched collection.
A webhookLogs collection records every delivery attempt (status, HTTP response code, error). Set enableDeliveryLog: false if you don't want the extra collection.
posts: {
events: ['update'],
filter: ({ doc, previousDoc }) =>
doc.status === 'published' && previousDoc?.status !== 'published',
}
{
"deliveryId": "b6b6e1c2-...",
"event": "orders.create",
"collection": "orders",
"docId": "64f...",
"doc": { "...": "the full document" },
"previousDoc": { "...": "present on update events" },
"occurredAt": "2026-09-19T20:00:00.000Z"
}
docId mirrors your collection's id type (string or number). deliveryId is generated once per triggering event (create/update/delete) and stays the same across every retry of that delivery — use it as your idempotency/dedupe key. Every request carries Content-Type: application/json, an X-Webhook-Event header (e.g. orders.create), and an X-Webhook-Id header mirroring deliveryId (so you can dedupe without parsing the body), plus X-Webhook-Signature when the endpoint has a secret set.
Delivery is at-least-once, with retries classified by failure type:
5xx/408/429 responses — fail the job so Payload's Jobs Queue retries it, up to maxRetries times (default 5).4xx response (bad URL, revoked auth, endpoint deleted, etc.) — are logged but not retried, since resending the identical request would fail the same way every time.On a retry, only endpoints still pending are re-attempted: endpoints that already succeeded or permanently failed for that deliveryId are skipped (tracked via the webhookLogs collection, so this requires enableDeliveryLog to stay on). Because a retry can still redeliver to an endpoint that failed with a transient error, receivers should dedupe on deliveryId (or the X-Webhook-Id header) rather than (event, docId).
Retries are per-delivery; the circuit-breaker protects you across deliveries. After failureThreshold consecutive failures (default 5, set to 0 to disable), an endpoint is automatically disabled so a dead destination stops burning job retries:
webhookEndpoints collection) keep a persistent consecutiveFailures counter on their doc. Any success resets it; reaching the threshold sets autoDisabled, and delivery skips the endpoint from then on. This works even with enableDeliveryLog: false. To re-enable, fix the destination and uncheck autoDisabled in the admin UI — a beforeChange hook zeroes consecutiveFailures at the same time, so the endpoint gets a fresh run at the threshold instead of re-tripping on the next single failure.endpoints array) have no doc to store a counter on, so the breaker reads their recent delivery history instead: if the last failureThreshold attempts for that URL all failed, the endpoint is skipped for this delivery (reported as skipped in the job output). This requires enableDeliveryLog to stay on — with the log disabled there is no history to read, so static endpoints are attempted every time (same caveat as retry-skip above). Tripped static endpoints self-heal via a half-open probe: once breakerProbeIntervalMs (default 5 minutes) has passed since the last attempt, one delivery is let through. If it succeeds, the streak is broken and normal delivery resumes; if it fails, the endpoint stays tripped and the cooldown restarts. To force an immediate retry instead of waiting out the cooldown, delete that URL's recent webhookLogs rows.Both retryable (5xx, timeouts) and permanent (4xx) failures count toward the streak — a 404 from a deleted destination trips the breaker just like a 500 storm does.
If an endpoint has a secret set, requests include an X-Webhook-Signature header formatted as t=<unix timestamp>,v1=<hmac-sha256 hex digest>, signed over ${timestamp}.${rawBody}. Verify it on the receiving end:
import { verifyPayloadSignature } from 'payload-plugin-outbound-webhooks'
const isValid = verifyPayloadSignature({
body: rawRequestBody, // the exact bytes received, before JSON.parse
header: req.headers['x-webhook-signature'],
secret: process.env.WEBHOOK_SECRET,
})
The helper also rejects signatures older than 5 minutes by default (toleranceSeconds), to blunt replay attacks.
| Option | Type | Default | Description |
|---|---|---|---|
enabled | boolean | true | Disable without removing from the plugins array. |
collections | { [slug]: CollectionWebhookConfig } | — | Which collections/events to watch, required. |
endpoints | WebhookEndpoint[] | [] | Statically configured destinations. |
enableEndpointsCollection | boolean | true | Adds the webhookEndpoints admin collection. |
enableDeliveryLog | boolean | true | Adds the webhookLogs admin collection. |
maxRetries | number | 5 | Job retry attempts per delivery. |
failureThreshold | number | 5 | Consecutive failures before an endpoint is auto-disabled (0 disables). |
breakerProbeIntervalMs | number | 300000 | Cooldown before a tripped static endpoint gets a half-open probe (0 probes every delivery). |
timeoutMs | number | 10000 | Per-attempt request timeout. |
pnpm install
pnpm test # unit tests (src/**/*.spec.ts, no database needed)
pnpm test:int # integration tests (needs DATABASE_URI, see below)
pnpm typecheck
pnpm build # emits dist/ (the published artifact)
Integration tests boot the dev/ Payload harness (example posts + orders collections, local receiver on :4000) and need a Postgres database:
export DATABASE_URI=postgres://user:pass@localhost:5432/webhooks_plugin_test
pnpm test:int
MIT
payload automation
Workflow automation for Payload with hook, cron and webhook triggers, JSONata expressions and run history
70657/wk0v3
email queue
Queue Payload form builder emails as background jobs so submissions return immediately and failed sends are retried
78466/wk0v4
plugin action scheduler
Schedule one-off, recurring and cron actions with retries and an admin dashboard, run by Payload's job queue.
7136/wk10v3
n8n webhooks
Register n8n webhooks in Payload and trigger n8n flows from your code or admin
3616/wk3v3
payload plugin scheduling
Schedule future publication of drafts on collections and globals with a secured cron endpoint
77783/wk37v3
plugin vercel
A Deploy button for editors: trigger, track, cancel and roll back Vercel deployments from the Payload admin.
6811/wk10v3