π£ Capture and deduplicate website leads in Google Sheets with Slack alerts
β‘ 1 views Β· π£ Lead Generation & Enrichment
Description
Quick overview
This workflow receives website lead submissions via a webhook, normalizes and validates the fields, prevents duplicate rows by matching on email in Google Sheets, and posts a Slack alert only when a genuinely new lead is captured.
How it works
- Receives a POST request on a webhook endpoint containing lead data from a website form or any JSON sender.
- Normalizes common field-name variants into a consistent lead schema, flags free-mail domains, and validates that the submission contains a usable email address.
- Immediately responds to the sender with a JSON acknowledgement for valid leads, or returns HTTP 400 with an error message for invalid submissions.
- Looks up the submitted email in a Google Sheets βLeadsβ worksheet to determine whether the lead already exists.
- If the email is new, appends a full lead record to Google Sheets (including first/last seen timestamps and times seen) and posts a formatted βnew leadβ message to Slack.
- If the email already exists, updates the existing Google Sheets row by bumping the times seen counter and updating the last seen timestamp without sending a Slack notification.
Setup
- Create a Google Sheets spreadsheet with a worksheet named
Leadsand the exact header columns:email, name, company, phone, source, message, first_seen, last_seen, times_seen, status. - Add Google Sheets OAuth2 credentials (with Google Sheets API and Google Drive API enabled) and select the target spreadsheet and
Leadsworksheet in the Google Sheets steps. - Add Slack credentials (OAuth2 or a bot token with permission to post messages) and select the channel to receive new-lead alerts.
- Activate the workflow, copy the production webhook URL, and configure your form or website to POST submissions to that endpoint as JSON.
π Nodes Used
Google Sheets, Slack, Webhook
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File