Retry-safe n8n webhooks: reserve the event before acting

Webhook retries are normal. Duplicate CRM writes and follow-up tasks are not.

A practical n8n pattern is:

  1. Normalize the incoming event.
  2. Validate a source-generated event ID.
  3. Reserve that ID using an atomic unique constraint.
  4. Perform the downstream action only after the reservation succeeds.
  5. Return an explicit duplicate result when the event was already processed.

Test these cases before connecting a real CRM:

  • First valid event: one business action
  • Same event replayed: no new action
  • Two concurrent copies: only one reservation succeeds
  • Missing event ID: validation error
  • Destination failure: visible failed or retryable state

Keep consent and outbound messaging behind a separate approval boundary.

How do you handle the gap between reserving an event ID and completing the downstream write?