Skip to main content

AI-powered outreach & follow-up automation (GPT-4o + Gmail + Google Sheets)

Workflow preview

Workflow preview
100%
AI-powered outreach & follow-up automation (GPT-4o + Gmail + Google Sheets) preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Description Automate your AI powered outreach and follow up pipeline end to end with GPT 4o, Gmail, and Google Sheets. This workflow personalizes emails for each lead, manages follow ups autom...

Best for

  • Lead Nurturing automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, @n8n/n8n-nodes-langchain.lmchatazureopenai, n8n-nodes-base.googlesheets, n8n-nodes-base.if, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.code, n8n-nodes-base.gmail, n8n-nodes-base.wait

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Rahul Joshi.

Original n8n.io source

1.1 Workflow description

Title
AI-powered outreach & follow-up automation (GPT-4o + Gmail + Google Sheets)
Workflow name
AI-powered outreach & follow-up automation (GPT-4o + Gmail + Google Sheets)

Description

Automate your AI-powered outreach and follow-up pipeline end-to-end with GPT-4o, Gmail, and Google Sheets. 🤖📬 This workflow personalizes emails for each lead, manages follow-ups automatically, tracks client replies, and updates CRM records in real time — all from a single Google Sheet. Ideal for sales and growth teams looking to convert leads faster without manual effort. ⚙️🚀

What This Template Does

1️⃣ Starts manually when you click “Execute workflow.” 🕹️ 2️⃣ Fetches all leads from the Google Sheet (sample_leads_50). 📊 3️⃣ Validates email format and filters only active (unbooked) leads. 🔍 4️⃣ Uses Azure OpenAI GPT-4o to generate short, personalized outreach emails in HTML. ✉️ 5️⃣ Cleans and parses the AI output (subject + HTML body). 🧠 6️⃣ Sends the first outreach email via Gmail and stores its thread ID. 📤 7️⃣ Waits 24 hours, then checks for a client reply in the Gmail thread. ⏱️ 8️⃣ If a positive reply is found → marks lead as BOOKED and updates in Sheets. ✅ 9️⃣ If no reply → triggers a polite follow-up email, waits again 24 hours, and checks the thread a second time. 🔁 🔟 If a second reply is found → marks BOOKED and logs the client message.

1️⃣1️⃣ If still no response → updates status to Declined in Google Sheets. ❌

1️⃣2️⃣ Logs invalid or incomplete leads to a separate sheet for data cleanup. 🧾

Key Benefits

✅ Eliminates manual outreach and follow-up effort. ✅ Produces personalized, context-aware AI emails for every lead. ✅ Auto-tracks replies and updates CRM status with zero input. ✅ Prevents duplicate or repeated contact with booked clients. ✅ Keeps lead database synchronized and audit-ready.

Features

  • Google Sheets integration for dynamic lead retrieval and updates.
  • Regex-based email validation for clean data pipelines.
  • Azure OpenAI GPT-4o for contextual email writing.
  • Two-stage Gmail automation (initial + follow-up).
  • JavaScript parsing for AI output and Gmail thread analysis.
  • Automated 24-hour wait and recheck logic.
  • Conditional branches for Booked / Declined / Invalid outcomes.
  • End-to-end CRM synchronization without manual review.

Requirements

  • Google Sheets OAuth2 credentials with read/write access.
  • Azure OpenAI API key for GPT-4o model access.
  • Gmail OAuth2 credentials with send, read, modify permissions.

Environment Variables

  • GOOGLE_SHEET_LEADS_ID
  • GOOGLE_SHEET_OUTREACH_TAB_ID
  • AZURE_OPENAI_API_KEY
  • GMAIL_OAUTH_CLIENT_ID
  • GMAIL_OAUTH_SECRET

Target Audience

💼 Sales and Business Development teams automating outreach. 📈 Marketing and Growth teams running re-engagement campaigns. 🤖 Automation and RevOps teams integrating AI lead workflows. 💬 Freelancers and agencies managing large prospect lists. 📊 Operations teams maintaining CRM cleanliness and tracking.

Step-by-Step Setup Instructions

1️⃣ Connect your Google Sheets, Azure OpenAI, and Gmail credentials. 2️⃣ Set your Google Sheet ID and tab name (outreach automation). 3️⃣ Update the GPT-4o system prompt to match your tone and signature. 4️⃣ Verify column headers (Company Name, Email, Booking Status, etc.). 5️⃣ Test the email validation branch with sample data. 6️⃣ Run once manually to confirm Gmail thread creation and reply detection. 7️⃣ Confirm successful CRM updates in Google Sheets. 8️⃣ Activate for continuous lead outreach and follow-up automation. ✅

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking ‘Execute workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Configure GPT-4o Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatAzureOpenAi - lmChatAzureOpenAi
Config choices
Version 1

Block 3 - Retrieve Lead Records from Google Sheets

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4

Block 4 - Validate Lead Data Payload

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 5 - Filter for Booked Leads

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 6 - Generate Personalized Outreach Email (AI)

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.1

Block 7 - Parse AI Email Output (JavaScript)

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 8 - Send Initial Outreach Email via Gmail

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 9 - Wait Before Thread Check (24 hr)

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1

Block 10 - Fetch Sent Email Thread from Gmail

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 11 - Check for Client Reply (If Condition)

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 12 - Extract Reply Details (JavaScript)

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 13 - Update Lead Record – Booked (Google Sheets)

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Block 14 - Wait Before Second Thread Check (24 hr)

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1

Block 15 - Send Second Follow-Up Email via Gmail

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 16 - Fetch Follow-Up Thread from Gmail

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 17 - Check for Second Reply (If Condition)

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 18 - Update Lead Status to Declined (Set Node)

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 19 - Update Lead Record – Declined (Google Sheets)

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Block 20 - Update Lead Record – Replied (Google Sheets)

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Block 21 - Extract Second Reply Details (JavaScript)

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 22 - Log Invalid Leads to Google Sheets

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Block 23 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Showing the first 24 of 42 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow AI-powered outreach & follow-up automation (GPT-4o + Gmail + Google Sheets)
Complexity advanced
Nodes 42
Categories Lead Nurturing, Multimodal AI
Author Rahul Joshi
Published 14 Nov 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/10827/10827.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does AI-powered outreach & follow-up automation (GPT-4o + Gmail + Google Sheets) do?

Description Automate your AI powered outreach and follow up pipeline end to end with GPT 4o, Gmail, and Google Sheets. This workflow personalizes emails for each lead, manages follow ups autom...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Lead Nurturing, Multimodal AI use case.