{"product_id":"n8n-webhook-lead-validation-dedup-to-google-sheets","title":"n8n Webhook Lead Validation \u0026 Dedup to Google Sheets","description":"\u003ch3\u003eAutomatically validate and deduplicate webhook leads into Google Sheets with n8n\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow receives lead data via a webhook, normalizes and validates key fields, and then writes only valid, non-duplicate leads to your Google Sheets “Records” tab—while routing invalid submissions to a separate “Review Queue” tab for quick follow-up.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives lead data via Webhook (POST):\u003c\/strong\u003e The workflow exposes an “intake” webhook endpoint and expects a JSON payload.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNormalizes incoming fields:\u003c\/strong\u003e It trims and lowercases the email (when provided) and adds a “received” timestamp.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eValidates required fields:\u003c\/strong\u003e It checks for a correctly formatted email address and a non-empty \u003ccode\u003eid\u003c\/code\u003e (source ID).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRoutes invalid payloads to Google Sheets:\u003c\/strong\u003e If validation fails, the workflow appends the submission to the \u003cstrong\u003e“Review Queue”\u003c\/strong\u003e sheet, including the failure reason and original values.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eDeduplicates by source ID:\u003c\/strong\u003e It looks up the provided source ID in the \u003cstrong\u003e“Records”\u003c\/strong\u003e sheet. If a row with the same \u003ccode\u003esource_id\u003c\/code\u003e already exists, the workflow skips creating a new record.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCreates new records only when unique:\u003c\/strong\u003e If no matching \u003ccode\u003esource_id\u003c\/code\u003e is found, it appends a new row to \u003cstrong\u003e“Records”\u003c\/strong\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eCapture leads from a web form or SaaS event and ensure Google Sheets stays clean.\u003c\/li\u003e\n  \u003cli\u003ePrevent duplicate lead entries by enforcing uniqueness using \u003ccode\u003eid\u003c\/code\u003e as \u003ccode\u003esource_id\u003c\/code\u003e.\u003c\/li\u003e\n  \u003cli\u003eQueue malformed submissions (missing email\/source ID) for manual review without breaking your pipeline.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n Webhook\u003c\/strong\u003e (intake endpoint) to receive JSON payloads.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e integration using an \u003cstrong\u003eOAuth2 credential\u003c\/strong\u003e to write to two tabs: “Records” and “Review Queue”.\u003c\/li\u003e\n  \u003cli\u003eWorkflow logic using nodes such as \u003cstrong\u003eif\u003c\/strong\u003e, \u003cstrong\u003eset\u003c\/strong\u003e, and \u003cstrong\u003eno op\u003c\/strong\u003e (plus supporting nodes like \u003cstrong\u003esticky note\u003c\/strong\u003e for clarity).\u003c\/li\u003e\n  \u003cli\u003eRequires your spreadsheet to include a \u003cstrong\u003esource_id\u003c\/strong\u003e column in the \u003cstrong\u003eRecords\u003c\/strong\u003e tab for lookups.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003cp\u003eSetup is straightforward: configure Google Sheets OAuth, set your \u003ccode\u003eREPLACE_WITH_YOUR_SPREADSHEET_ID\u003c\/code\u003e, and POST JSON to the webhook with at least \u003ccode\u003eid\u003c\/code\u003e (source ID) and \u003ccode\u003eemail\u003c\/code\u003e (optionally \u003ccode\u003ename\u003c\/code\u003e).\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45755361689779,"sku":"N8N-17719","price":68.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/ab2L201mOmFTNN8zsxQwl_CrBV5370.png?v=1785661677","url":"https:\/\/buyflowscripts.com\/products\/n8n-webhook-lead-validation-dedup-to-google-sheets","provider":"N8N Commerce","version":"1.0","type":"link"}