{"product_id":"n8n-webhook-booking-validator-deduplicate-requests","title":"n8n Webhook Booking Validator: Deduplicate Requests","description":"\u003ch3\u003eStop duplicate booking requests—and validate every webhook booking in n8n\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow receives booking requests via a webhook, validates and normalizes the incoming fields, enforces lead-time rules, and detects duplicate submissions from the same phone number within 30 minutes—then (for fresh, in-policy requests) creates a booking and returns a confirmation status suitable for WhatsApp\/SMS\/email.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAccepts POST bookings\u003c\/strong\u003e through an n8n Webhook endpoint.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eValidates and normalizes the payload\u003c\/strong\u003e (name, phone, optional email, treatment, preferred time\/slot, and optional notes), ensuring required fields are present and formatted as expected.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eEnforces booking policy\u003c\/strong\u003e by calculating how far in the future the requested slot is, then requiring it to be \u003cstrong\u003eat least 2 hours ahead\u003c\/strong\u003e and \u003cstrong\u003eno more than 60 days out\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eHandles invalid input safely\u003c\/strong\u003e by logging invalid requests and returning a \u003cstrong\u003e422 JSON\u003c\/strong\u003e response with validation errors.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eDeclines out-of-policy requests\u003c\/strong\u003e with a \u003cstrong\u003e422 JSON\u003c\/strong\u003e response when the requested slot violates the lead-time window.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eDeduplicates by phone number\u003c\/strong\u003e: if the same phone number submits again within \u003cstrong\u003e30 minutes\u003c\/strong\u003e, the request is marked as \u003cstrong\u003eignored\u003c\/strong\u003e while still returning a success-shaped response.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCreates a booking and prepares confirmation\u003c\/strong\u003e for valid, non-duplicate requests (placeholder steps), builds a confirmation message, optionally sends it (placeholder), and returns a \u003cstrong\u003e200 JSON\u003c\/strong\u003e response with booking status and slot.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003ePrevent double-bookings when users refresh or resubmit a booking form.\u003c\/li\u003e\n  \u003cli\u003eEnsure appointments only get created for slots that meet your lead-time rules.\u003c\/li\u003e\n  \u003cli\u003eProtect your booking flow from malformed or incomplete webhook requests.\u003c\/li\u003e\n  \u003cli\u003eStreamline confirmation preparation for WhatsApp\/SMS\/email after booking creation.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details (n8n)\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eWebhook\u003c\/strong\u003e to receive POST requests\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eif\u003c\/strong\u003e nodes for branching (validation, policy checks, duplicates)\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003ecode\u003c\/strong\u003e node for normalization, lead-time calculation, and duplicate detection logic\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003erespond to webhook\u003c\/strong\u003e to return \u003cstrong\u003e200\u003c\/strong\u003e\/\u003cstrong\u003e422\u003c\/strong\u003e JSON responses\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSticky note\u003c\/strong\u003e for workflow guidance\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46172938895539,"sku":"N8N-20593","price":7.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/a-sIxyn6P21Pnik9klHPb_TbkEPIJX.png?v=1791364174","url":"https:\/\/buyflowscripts.com\/products\/n8n-webhook-booking-validator-deduplicate-requests","provider":"N8N Commerce","version":"1.0","type":"link"}