If an operator can replay events, the replay path needs the same protection as the original path. A button labelled “retry” is not an exemption from duplicate handling. One event may travel several times; the business should still see the intended action only as often as its rules allow.
Check the sender’s delivery contract
Different providers have different rules for retries, event identifiers and ordering. Read the documentation for the actual sender rather than assuming all webhooks behave alike. Stripe, for example, documents duplicate delivery and does not guarantee event ordering in its webhook guide. Those details belong in the receiving workflow’s design.
Write down the event types you need and ignore unrelated types deliberately. A broad subscription can feed actions the workflow was never designed to handle. Also distinguish the notification’s event identifier from the customer or order identifier inside it. One customer can legitimately produce several events, so deduplicating every message by customer ID alone can lose real work.
Authenticate before trusting the payload
A public endpoint should not accept an arbitrary incoming message as proof of an event. Use the sender’s supported verification mechanism and protect the associated secret. Do not put secret values into visible URLs or publish them with a workflow export. Check the exact verification requirements; modifying the body before verification can matter for schemes that sign the original bytes.
GitHub’s webhook guidance discusses secrets, HTTPS and delivery identifiers for its own service. That is a useful concrete reference, not a universal signature recipe. Verification and deduplication solve different problems: a genuine message can still be delivered twice.
| Arrival | Receipt state | Business action |
|---|---|---|
| Event E-42, first delivery | Accepted durably | Process once |
| Event E-42, repeated | Already completed | Do not repeat completed action |
| Event E-42, uncertain result | Pending reconciliation | Check destination first |
| Event E-43, new event | Separate identity | Evaluate its own rules |
Record receipt before acknowledging completion
Separate “we have durably accepted this event” from “the business action is finished”. For longer work, a durable queue or receipt store can let the endpoint acknowledge accepted work while processing continues separately. Do not acknowledge success before the event is safely retained if losing it would matter.
The retained record needs an identity and a state, such as received, processing, completed or needs review. A temporary in-memory list is not durable across a restart. Equally, a stored flag saying “seen” is not enough if a failure can occur between recording that flag and performing the action. You need to know whether work is complete, pending or uncertain.
Make the duplicate check safe under concurrency
A simple sequence of “search for event, then insert event” can race. Two workers may both find nothing and both proceed. Use storage behaviour that enforces the intended uniqueness atomically, and design what the losing worker should do. The correct identifier and retention period depend on the provider and the business operation.
There is still a boundary between your receipt store and an external action. Recording completion locally does not make a remote write part of the same transaction. Use the destination’s idempotency feature where available, or a reconciliation process where the result is uncertain. See n8n errors and retries for why a timeout must not automatically trigger another create request.
Expect events to arrive in an inconvenient order
A delayed “created” event might arrive after an “updated” event. Blindly applying arrival order could replace newer information with older data. Check whether the provider supplies versions or sequence information, or whether the current object should be retrieved from the source. A timestamp alone may not resolve all ties and timing differences.
For a fictional order workflow, the test is not simply that both messages were accepted. The resulting order must have the intended current state and must not trigger a second shipment. Keep event history separate from current business state so a late notification can be inspected without automatically rolling the object backward.
Test redelivery as an ordinary scenario
Deliver the same test event twice, then twice concurrently. Interrupt processing after receipt and after the external action. Restart the worker and inspect the final state. Also deliver a later event before an earlier one. Record which outcomes your test destination proves and which need verification against the real provider.
If an operator can replay events, the replay path needs the same protection as the original path. A button labelled “retry” is not an exemption from duplicate handling. One event may travel several times; the business should still see the intended action only as often as its rules allow.
Sources & further reading
Official references, checked on 12 October 2026.
