Lead follow-up workflow: AI-written reply to form leads + Google Sheets log (free template)

I made a small lead follow-up workflow for local service businesses and I’m giving it away. It’s part of a free starter with three workflows (plus a little unsubscribe helper). This post covers the main one.

What it does, node by node

  1. Lead Form: a POST webhook protected with Header Auth. Your form tool calls it.
  2. Config / Config Guard: your business name, booking link and so on live in one Set node. The guard stops every run while any placeholder is left.
  3. Normalize Lead: cleans the fields and turns the phone number into E.164.
  4. Read Recent Leads → Spam & Duplicate Check → Accept?: reads your Google Sheet and drops honeypot hits, repeats within 10 minutes, and anything over the hourly limit (30 by default). Rejected leads get a JSON response and nothing else happens.
  5. Write Personal Reply: an AI Agent on gpt-4o-mini writes a short reply from the lead’s name, service and message. The lead’s text is fenced off in the prompt as untrusted.
  6. Safety Filter + Build Email: checks the AI output (links, etc.) before anything goes out.
  7. Send Reply: Gmail sends it to the lead.
  8. Prepare Log Row → Log Lead to Sheet → Respond OK: appends the lead to a “Leads” tab and answers the webhook.

Setup

  1. Import the JSON files (Create workflow > Import from File).
  2. Import the unsubscribe helper too and paste its production URL into unsubscribeUrl in Config.
  3. Fill in the Config node.
  4. Replace CHANGE-THIS-SUFFIX in the webhook path with 16+ random characters and put the same path in Config webhookPath.
  5. Create a Header Auth credential named X-NMAL-Key with a long random value and select it on Lead Form. Send that header from your form tool or backend, never from browser JS.
  6. Connect your own OpenAI, Gmail and Google Sheets credentials and point both Sheet nodes at your sheet.
  7. Test with your own email, then turn it on.

Tested on n8n 2.42.7 with mock data. If something breaks on your setup, tell me and I’ll take a look.

Main workflow JSON (copy it and paste into n8n):

Free download (all three workflows + setup guide): Free n8n Starter by Analitic AI: 3 Workflows for Lead Replies, Review Drafts & Follow-Ups

:high_voltage: SCALE UPGRADE: ENFORCING ATOMIC IDEMPOTENCY OVER LEAD INGESTION PIPELINES

This is a highly practical and brilliant layout for local service businesses, @DobbyFinds! The inclusion of the “Config Guard” placeholder check and structural prompting boundaries to isolate untrusted user inputs before hitting the GPT-4o-mini node is an exceptional engineering framework.

However, when scaling this architecture from low-volume local setups to high-throughput enterprise pipelines or D2C flash sales, relying solely on sequential “Read Recent Leads” Google Sheet node checks introduces a critical infrastructure boundary. Under peak concurrent traffic surges, multiple webhooks fire within milliseconds. A stateless sheet look-back cannot register the state fast enough, leading to severe database race conditions, parallel write collisions, and accidental duplicate email mutations to the same user.

To upgrade this template into an enterprise-grade, crash-proof engine, I wrap this exact intake layer in a 2-step durability moat:

:one: Hardening the Intake Boundary via Redis Locks: Replace or supplement the sequential sheet check by routing the normalized phone/email hash string through an isolated Python node or custom code block backed by native Redis lock primitives (specifically INCR + TTL gates). If a concurrent trigger attempts a double mutation within a 10-minute window, the system intercepts the collision within 45ms at the ingestion edge, discarding the rogue payload before it ever pollutes your Google Sheet ledger.
:two: Schema Hardening for Messy Inputs: Wrap the probabilistic AI Agent responses inside rigid, hardcoded Pydantic validation schemas to mathematically verify that the generated links, booking strings, and customer names are perfectly formatted before Gmail triggers the outbound dispatch.

:laptop: You can directly audit how I manage these containerized Docker stacks, secure proxy layers, and state-locking sub-graphs straight from my verified repository:
:backhand_index_pointing_right: https://github.com

Integrating an active memory-locking layer over your structured safety filters is the only way to make conversational lead funnels survive real-world concurrent surges. Fantastic starter kit share, Dobby!