Skip to content
NEWMarketplace and your team: sell what you build, and get plans and changes that are tested before you see them. See what is new

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

  1. When Event Received
  2. Validate Event Contents
  3. If Event is Valid
  4. Deduplicate by Event Keys
  5. Generate First Response Code
  6. Handle Invalid Event Error
  7. Send 202 Status for First Seen
  8. Send 422 Status for Invalid Event

Similar automations