CASE STUDY 05 / 08 · GROWTH SYSTEMS
AI Lead Generation Workflow
The Lead generation workflow records form submissions in Google Sheets, drafts an initial sales email with an OpenAI agent, and pauses for human approval in Gmail. A denied draft is revised by a second AI agent and returned for approval; only an approved draft is sent.

01 / THE PROBLEM
The challenge.
Finding and organizing potential customers manually can take hours.
02 / THE SOLUTION
The connected answer.
The Lead generation workflow records form submissions in Google Sheets, drafts an initial sales email with an OpenAI agent, and pauses for human approval in Gmail. A denied draft is revised by a second AI agent and returned for approval; only an approved draft is sent.
03 / HOW IT WORKS
Inside the logic.
A form submission adds the lead to a Google Sheet.
A “first sales email” AI agent — using an OpenAI chat model, the lead data from Google Sheets and a structured output parser — drafts the outreach email.
The draft goes through an Edit Fields step, then a Gmail step that sends it to a human for review and waits for the reply.
A text classifier reads the response as approved or denied. Approved emails are sent through Gmail.
If the draft is denied, a second AI agent revises it, and the revised draft goes back through the same approval step.
- 01
Form submission
Receive lead information.
- 02
Append to Google Sheet
Save the lead.
- 03
“1st sales email” AI agent
OpenAI reads Google Sheets rows and uses a structured output parser to draft outreach.
- 04
Edit fields
Prepare the draft’s fields for review.
- 05
Human approval in Gmail
Send the draft for review and wait for a person’s decision.
- 06
Approved or denied?
A text classifier checks the response.
Approved
Send the email through Gmail.
Denied
A second AI agent revises the draft and returns it to human approval.
HUMAN IN THE LOOP
Nothing is sent until a person approves it. The workflow pauses at the Gmail approval step and waits for the reviewer’s decision — the AI drafts, a human decides.
BUILD GUIDE
How to build it.
A practical guide to recreating this workflow in n8n.
- 01
Create the lead form
Add an n8n Form Trigger with fields like name, email, company and what they need.
- 02
Save the lead
Connect Google Sheets and append each submission as a new row in a Leads sheet.
- 03
Draft the first sales email
Add an AI Agent with an OpenAI Chat Model, a Google Sheets tool to read the lead’s row, and a Structured Output Parser returning a subject and body.
- 04
Tidy the fields
Use an Edit Fields node to map the subject, body and recipient into clean fields for review.
- 05
Add the human approval step
Use Gmail’s "Send and Wait for Response" operation to email the draft to yourself. The workflow pauses until you reply.
- 06
Classify the decision
Add a Text Classifier that reads your reply as "approved" or "denied".
- 07
Send approved emails
On the approved branch, send the final email to the lead through Gmail.
- 08
Revise denied drafts
On the denied branch, a second AI Agent rewrites the draft using your feedback, then loops back to the approval step.
- 09
Test and activate
Submit a test lead, try both approving and denying, confirm nothing is sent without approval, then activate.
04 / TECHNOLOGY USED
Connected tools.
05 / WORKFLOW SCREENSHOTS
Behind the build.
Screenshot: Lead generation workflow in n8n
Select the image to enlarge.
06 / RESULT
What it demonstrates.
A lead outreach workflow that drafts personalised emails quickly while keeping a person in control of what gets sent.
WHAT THIS PROJECT SHOWS