Send lead notifications and acknowledgements via webhook, Gmail and Data Tables

Quick overview This workflow receives new lead submissions via a header-authenticated webhook, validates and normalizes the payload, prevents duplicate notifications using an n8n Data Table, then sends two Gmail emails (admin alert and lead acknowledgement) and returns a JSON response with the processing result.

How it works Receives a POST request on a header-authenticated webhook containing lead details. Normalizes the incoming fields (for example trimming the name and lowercasing the email) and rejects invalid payloads with an HTTP 400 JSON response. Checks an n8n Data Table log for an existing row with the same leadId to prevent sending notifications twice. If the lead was already processed, returns a JSON response indicating the request is a duplicate. If the lead is new, sends an admin notification email and a lead acknowledgement email through Gmail while allowing either email to fail without stopping the run. Logs email send statuses and errors back to the n8n Data Table and responds to the caller with a JSON success payload.

Setup Create and attach a Header Auth credential to the webhook and configure the calling form/CRM to send requests to the webhook URL with the required header. Connect a Gmail OAuth2 credential and select it in both Gmail email-sending steps. Create an n8n Data Table named lead_notification_log with the expected columns (leadId, executionId, adminEmailStatus, adminEmailError, leadEmailStatus, leadEmailError, status, notifiedAt) and select it in both Data Table steps. Update the admin recipient email address (currently admin@example.com) and adjust the email subjects/bodies to match your branding.

0
Downloads
1
Views
7.32
Quality Score
beginner
Complexity
Created:10/11/2026
Updated:10/11/2026

🔒 Please log in to import templates to n8n and favorite templates

Workflow Visualization

Loading...

Preparing workflow renderer

Comments (0)

Login to post comments