Library / Building Blocks & Utilities
Building Blocks & Utilities
Validate incoming webhook events and drop replays using a dedupe key
Triggered by incoming webhook calls, checks each event envelope, returns a 422 for malformed events, and passes only first deliveries through a replay filter.
What it does
## Webhook Replay Shield - Safe Single-Output Replay Filter ### How it works This workflow receives webhook events, validates that the event envelope is well formed, and branches based on validity. Valid events pass through a replay shield that remembers previously seen event keys so only first deliveries continue to the success response. Invalid events are formatted into an error payload and returned with a 422 response. ### Setup steps - Configure the webhook trigger URL and ensure the upstream service sends events to it. - Review the validation code to match the expected event envelope, required fields, timestamps, and any signature or secret checks. - Configure the duplicate-removal node to use the correct event key or idempotency key, and set an appropriate retention window for replay protection. - Verify the Respond to Webhook nodes are using the intended HTTP status codes and response bodies. ### Customization Adjust the idempotency key, validation rules, retention period, and response payloads/status codes to match the webhook provider’s retry and replay semantics.
The steps
- When Event Received
- Validate Event Contents
- If Event is Valid
- Deduplicate by Event Keys
- Generate First Response Code
- Handle Invalid Event Error
- Send 202 Status for First Seen
- Send 422 Status for Invalid Event
Similar automations
Documents, PDF & OCRUpload invoices via form and extract, validate, dedupe, and log to ledger11 stepsMonitoring, Ops & IncidentsAlert by Email When Flight Prices Drop with SerpAPI5 stepsMonitoring, Ops & IncidentsBitcoin Price Drop Alerts with Bright Data and Gmail9 stepsImage, Video & AudioGenerate a song from a webhook request using Tunova5 steps