See llms.txt for all machine-readable content.

Back to Templates

Capture website leads in Google Sheets with business-hours Gmail replies

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

  1. Receives a new lead submission from an n8n Form.
  2. Normalizes and validates the lead details, calculates priority from keywords, determines whether it is outside business hours, and flags likely spam.
  3. If the submission looks like spam, appends it to a Google Sheets “Leads” tab with a spam status and stops without sending any emails.
  4. 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.
  5. Appends the lead to the Google Sheets “Leads” tab with an ID, timestamp, priority, after-hours flag, and contact count.
  6. Sends a tailored HTML auto-reply to the lead via Gmail based on business hours and returning-customer status.
  7. Sends an HTML alert email to the business owner via Gmail with the lead details and quick mailto/tel links.

Setup

  1. 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).
  2. Connect Google Sheets OAuth2 credentials and update the Config sheet URL to your spreadsheet.
  3. 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.
  4. 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).