Quick Overview
This workflow captures website enquiries via an n8n Form, logs each lead to Google Sheets, and sends a business-hours-aware auto-reply and owner alert through Gmail while flagging and logging spam without responding.
How it works
- Receives a new lead submission from an n8n Form.
- Normalizes and validates the lead details, calculates priority from keywords, determines whether it is outside business hours, and flags likely spam.
- If the submission looks like spam, appends it to a Google Sheets “Leads” tab with a spam status and stops without sending any emails.
- If it is not spam, looks up prior rows in Google Sheets by email to identify returning contacts and count how many times they have reached out.
- Appends the lead to the Google Sheets “Leads” tab with an ID, timestamp, priority, after-hours flag, and contact count.
- Sends a tailored HTML auto-reply to the lead via Gmail based on business hours and returning-customer status.
- Sends an HTML alert email to the business owner via Gmail with the lead details and quick mailto/tel links.
Setup
- Create a Google Sheet with a “Leads” tab and the required headers (Lead ID, Received At, Name, Email, Phone, Service, Message, Source, Priority, After Hours, Status, Times Contacted, Notes).
- Connect Google Sheets OAuth2 credentials and update the Config sheet URL to your spreadsheet.
- Connect Gmail OAuth2 credentials for sending emails and set the owner email, business name, timezone, business hours, and optional booking link/phone in the Config values.
- Publish the n8n Form and share its URL (or replace the form trigger with your existing website form/webhook and map the incoming fields accordingly).