Lead Enrichment + Email Outreach
Automation Workflow

AI-Powered Lead
Email Outreach

A fully automated n8n workflow that pulls business data from an API, uses Google Gemini AI to extract email addresses, logs leads to Google Sheets, and sends personalised outreach emails.

15Nodes
3Sections
2AI Models
2Google Sheets
Workflow Overview
Lead Enrichment & Email Send Pipeline
Visual representation of all nodes and connections
Editor
Executions
Evaluations
BUSINESS DATA 📋 On form submission 1 item 🌐 HTTP Request GET shopify 5 items 🔽 Filter conditions GETTING THE EMAIL ADDRESS G Gemini Chat Model 🔍 Information Extractor 4 items ⚙️ IF condition ✓ true 📊 Append row in sheet ✗ false No Operation do nothing EMAIL SEND 🔄 Loop Over Items 1 ⏸️ Wait 1 🔍 Information Extractor 1 G Gemini Chat Model 1 1 ✏️ Edit Fields1 manual 1 ✉️ Send a message Gmail 1 📊 Append/Update row in sheet
All Nodes Used
📋
On Form Submission
Section 1 · Trigger
01
🌐
HTTP Request
Section 1 · Data Fetch
02
🔽
Filter
Section 1 · Logic
03
🔍
Information Extractor
Section 2 · AI Node
04
⚙️
IF
Section 2 · Logic
05
📊
Append Row in Sheet
Section 2 · Google Sheets
06
No Operation
Section 2 · Fallback
07
G
Google Gemini Chat Model
Section 2 · AI Sub-node
08
🔄
Loop Over Items
Section 3 · Control
09
⏸️
Wait
Section 3 · Delay
10
🔍
Information Extractor 1
Section 3 · AI Node
11
✏️
Edit Fields1
Section 3 · Transform
12
✉️
Send a Message
Section 3 · Gmail
13
📊
Append / Update Row
Section 3 · Google Sheets
14
G
Google Gemini Chat Model 1
Section 3 · AI Sub-node
15
Node Parameters
📋
01 · On Form Submission
ParameterValueDescription
Trigger TypeOn Form SubmissionFires when a form is submitted
Form Fieldscompany_name, website, etc.Define fields matching your form
AuthenticationNone (public form)Can add Basic Auth if needed
RespondUsing Respond to Webhook nodeControls when response is sent
ℹ️ This is the entry point. All subsequent data is based on what this form captures.
🌐
02 · HTTP Request
ParameterValueDescription
MethodGETFetches data from the API
URLhttps://api.shopify.com/v2/...Your data source API endpoint
AuthenticationHeader AuthPass API key in header
Header NameX-Shopify-Access-TokenStandard Shopify auth header
Header Value{{ $credentials.apiKey }}Reference stored credential
Response FormatJSONParse the returned body as JSON
💡 Store API keys in n8n Credentials, never hardcode them in the URL or node.
🔽
03 · Filter
ParameterValueDescription
ConditionsANDAll conditions must be true
Field{{ $json.status }}Check the status field
OperationequalsExact match
ValueactiveOnly pass active records
💡 Add a second condition: {{ $json.email }} is not empty — to filter out records without emails early.
🔍
04 · Information Extractor
ParameterValueDescription
Text{{ $json.description }}The raw text to extract email from
Attribute NameemailWhat to name the extracted field
Attribute TypestringExpected output type
Attribute DescEmail address of the contactHelps AI know what to look for
Language ModelGoogle Gemini Chat ModelConnected sub-node (Node 08)
ℹ️ You can add multiple attributes — e.g., also extract first_name, company, phone.
⚙️
05 · IF
ParameterValueDescription
Condition{{ $json.email }}The email field from extractor
Operationis not emptyCheck if AI found an email
True Branch→ Append row in sheetEmail found — save it
False Branch→ No OperationNo email — skip record
📊
06 · Append Row in Sheet
ParameterValueDescription
ResourceSheetOperating on a spreadsheet
OperationAppendAdd new row to sheet
SpreadsheetLeads DatabaseSelect your Google Sheet
SheetSheet1Target tab name
Column: email{{ $json.email }}Map extracted email
Column: company{{ $json.company }}Map company name
Column: date{{ $now }}Timestamp of entry
07 · No Operation, Do Nothing
⚠️ No parameters required. This node simply terminates the false branch of the IF node gracefully. It prevents n8n from throwing an error when no further action is needed.
G
08 · Google Gemini Chat Model
ParameterValueDescription
CredentialGoogle Gemini API KeySet up in n8n Credentials
Modelgemini-1.5-flashFast, cost-efficient model
Max Output Tokens1024Limit response length
Temperature0.2Low temp = more deterministic extraction
ℹ️ This is a sub-node — it plugs into the Information Extractor node above it, not directly into the main flow.
🔄
09 · Loop Over Items
ParameterValueDescription
Batch Size1Process one item at a time
OptionsReset (off)Keep loop running until all items done
💡 Batch size of 1 combined with the Wait node controls send rate effectively.
⏸️
10 · Wait
ParameterValueDescription
ResumeAfter Time IntervalPauses execution for set duration
Amount2Duration value
UnitMinutes2-minute delay between sends
⚠️ Do not set this below 1 minute — very fast email loops can trigger spam filters.
🔍
11 · Information Extractor 1
ParameterValueDescription
Text{{ $json.raw_text }}Input data to extract from
Attribute 1 Namefirst_namePerson's first name
Attribute 2 Namecompany_nameCompany name
Attribute 3 Nameproduct_interestWhat they're interested in
Language ModelGoogle Gemini Chat Model 1Connected sub-node (Node 15)
ℹ️ These extracted fields are used to personalise the email body in the next nodes.
✏️
12 · Edit Fields1
ParameterValueDescription
ModeManualDefine fields manually
Field: email_to{{ $json.email }}Recipient email address
Field: subjectHi {{ $json.first_name }}, ...Personalised subject line
Field: bodyHi {{ $json.first_name }}, I noticed {{ $json.company_name }}...Full personalised email body
Keep OriginalfalseOnly pass the new fields forward
✉️
13 · Send a Message (Gmail)
ParameterValueDescription
CredentialGmail OAuth2Authorised Gmail account
ResourceMessageSend an email message
OperationSendSend operation
To{{ $json.email_to }}Recipient from Edit Fields node
Subject{{ $json.subject }}Subject from Edit Fields node
Message{{ $json.body }}Body from Edit Fields node
Body Content TypeHTMLAllows formatted HTML emails
⚠️ Make sure Gmail OAuth2 credentials are connected. You must allow n8n access in your Google account settings.
📊
14 · Append or Update Row in Sheet
ParameterValueDescription
ResourceSheetGoogle Sheets operation
OperationAppend or UpdateCreate row or update if exists
SpreadsheetLeads DatabaseSame sheet as node 06
Lookup ColumnemailUnique key to match existing rows
Column: email_senttrueMark email as sent
Column: sent_at{{ $now }}Timestamp of send
💡 Using "Append or Update" with email as lookup key prevents duplicate rows.
G
15 · Google Gemini Chat Model 1
ParameterValueDescription
CredentialGoogle Gemini API KeySame API key as Node 08
Modelgemini-1.5-flashFast and capable model
Max Output Tokens1024Enough for name/company extraction
Temperature0.2Deterministic for structured output
ℹ️ This is a separate sub-node instance from Node 08 — it's dedicated to the email personalisation extraction in Section 3.