{"product_id":"lead-webhook-to-gmail-alerts-acknowledgements-n8n","title":"Lead Webhook to Gmail Alerts \u0026 Acknowledgements (n8n)","description":"\u003ch3\u003eInstant Gmail Alerts + Lead Acknowledgements from a Header-Authenticated Webhook (n8n)\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow listens for new lead submissions on a header-authenticated webhook, verifies and normalizes the data, prevents duplicate notifications, and then sends two Gmail emails—an admin alert and a lead acknowledgement—before returning a JSON response to the caller.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cb\u003eReceives lead data via POST webhook:\u003c\/b\u003e A header-authenticated webhook accepts lead details from your form or CRM.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eValidates and normalizes payload:\u003c\/b\u003e Incoming fields are normalized (e.g., trimming the name and lowercasing the email). Invalid payloads are rejected with an \u003cb\u003eHTTP 400\u003c\/b\u003e JSON response.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003ePrevents duplicate processing:\u003c\/b\u003e The workflow checks an n8n \u003cb\u003eData Table\u003c\/b\u003e log for an existing row with the same \u003cb\u003eleadId\u003c\/b\u003e, ensuring notifications aren’t sent twice.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eHandles duplicates gracefully:\u003c\/b\u003e If the lead was already processed, it returns a JSON response indicating the request is a duplicate.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eSends Gmail emails for new leads:\u003c\/b\u003e For new leads, it sends:\n    \u003cul\u003e\n      \u003cli\u003e\u003cb\u003eAdmin notification email\u003c\/b\u003e\u003c\/li\u003e\n      \u003cli\u003e\u003cb\u003eLead acknowledgement email\u003c\/b\u003e\u003c\/li\u003e\n    \u003c\/ul\u003e\n    Either email can fail without stopping the overall run.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eLogs outcomes and responds:\u003c\/b\u003e Email send statuses and any errors are written back to the \u003cb\u003eData Table\u003c\/b\u003e, and the caller receives a success JSON payload.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eSaaS operators who need reliable \u003cb\u003elead capture\u003c\/b\u003e notifications with instant \u003cb\u003eGmail alerts\u003c\/b\u003e and automatic acknowledgements.\u003c\/li\u003e\n  \u003cli\u003eAutomation engineers integrating an existing CRM\/form system with an \u003cb\u003eauthenticated webhook\u003c\/b\u003e.\u003c\/li\u003e\n  \u003cli\u003eTeams that must avoid duplicate outreach by enforcing idempotency using a \u003cb\u003eData Table\u003c\/b\u003e log.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cb\u003eWebhook\u003c\/b\u003e with \u003cb\u003eHeader Auth\u003c\/b\u003e credential\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eif\u003c\/b\u003e and \u003cb\u003eset\u003c\/b\u003e nodes for validation and normalization\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003edata table\u003c\/b\u003e workflow logging (recommended name: \u003cb\u003elead_notification_log\u003c\/b\u003e with columns like leadId, executionId, adminEmailStatus, adminEmailError, leadEmailStatus, leadEmailError)\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eGmail\u003c\/b\u003e OAuth2 integration for both email steps\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003emerge\u003c\/b\u003e to consolidate processing results before replying\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46157932560563,"sku":"N8N-20348","price":40.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/VIroxRzHJ_lrS3WgG_ZlA_oqieTFVz.png?v=1791018815","url":"https:\/\/buyflowscripts.com\/products\/lead-webhook-to-gmail-alerts-acknowledgements-n8n","provider":"N8N Commerce","version":"1.0","type":"link"}