Skip to main content

Personalized cold email generator with Supabase, Smartlead & Google Gemini AI

Workflow preview

Workflow preview
100%
Personalized cold email generator with Supabase, Smartlead & Google Gemini AI preview
Open on n8n.io

Important notice

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

1. Workflow Overview

n8n Workflow: AI Personalized Email Outreach (Smartlead) Purpose This workflow automates cold email campaigns by: Fetching leads Generating hyper personalized email content using AI Sending emai...

Best for

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

Tools used

@n8n/n8n-nodes-langchain.lmchatgooglegemini, n8n-nodes-base.code, @n8n/n8n-nodes-langchain.chainllm, @n8n/n8n-nodes-langchain.informationextractor, n8n-nodes-base.if, n8n-nodes-base.aggregate, n8n-nodes-base.splitinbatches, n8n-nodes-base.stickynote

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Personalized cold email generator with Supabase, Smartlead & Google Gemini AI
Workflow name
Personalized cold email generator with Supabase, Smartlead & Google Gemini AI

n8n Workflow: AI-Personalized Email Outreach (Smartlead)

🔄 Purpose

This workflow automates cold email campaigns by:

  • Fetching leads
  • Generating hyper-personalized email content using AI
  • Sending emails via Smartlead API
  • Logging campaign activity into Google Sheets

đź§© Workflow Structure

  1. Schedule Trigger

    • Starts the workflow automatically at scheduled intervals.
    • Ensures continuous campaign execution.
  2. Get Leads

    • Fetches lead data (name, email, company, role, industry).
    • Serves as the input for personalization.
  3. Loop Over Leads

    • Processes each lead one by one.
    • Maintains individualized email generation.
  4. Aggregate Lead Data

    • Collects and formats lead attributes.
    • Prepares structured input for the AI model.
  5. Basic LLM Chain #1

    • Generates personalized snippets/openers using AI.
    • Tailored based on company, role, and industry.
  6. Update Row (Google Sheets)

    • Saves AI outputs (snippets) for tracking and QA.
  7. Basic LLM Chain #2

    • Expands snippet into a full personalized email draft.
    • Includes subject line + email body.
  8. Information Extractor

    • Extracts structured fields from AI output:
      • Subject
      • Greeting
      • Call-to-Action (CTA)
      • Closing
  9. Update Row (Google Sheets)

    • Stores finalized draft in Google Sheets.
    • Provides visibility and audit trail.
  10. Code

    • Formats email into Smartlead-compatible payload.
    • Maps fields like subject, body, and recipient details.
  11. Smartlead API Request

    • Sends the personalized email through Smartlead.
    • Returns message ID and delivery status.
  12. Basic LLM Chain #3 (Optional)

    • Generates follow-up versions for multi-step campaigns.
    • Ensures varied engagement over time.
  13. Information Extractor (Follow-ups)

    • Structures follow-up emails into ready-to-send format.
  14. Update Row (Google Sheets)

    • Updates campaign logs with:
      • Smartlead send status
      • Message IDs
      • AI personalization notes

⚙️ Data Flow Summary

  • Trigger → Runs workflow
  • Get Leads → Fetch lead records
  • LLM Personalization → Create openers + full emails
  • Google Sheets → Save drafts & logs
  • Smartlead API → Send personalized email
  • Follow-ups → Generate and log structured follow-up messages

📊 Use Case

  • Automates hyper-personalized cold email outreach at scale.
  • Uses AI to improve response rates with contextual personalization.
  • Provides full visibility by saving drafts and send logs in Google Sheets.
  • Integrates seamlessly with Smartlead for sending and tracking.

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 - Google Gemini Chat Model1

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

Block 2 - Code

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

Block 3 - Basic LLM Chain5

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.5

Block 4 - Information Extractor2

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

Block 5 - If7

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

Block 6 - Aggregate5

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

Block 7 - Basic LLM Chain6

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.5

Block 8 - Information Extractor3

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

Block 9 - Google Gemini Chat Model2

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

Block 10 - Loop Over Items1

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 11 - Aggregate6

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

Block 12 - Aggregate7

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

Block 13 - Loop Over Items9

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 14 - Aggregate8

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

Block 15 - Basic LLM Chain7

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.5

Block 16 - Google Gemini Chat Model3

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

Block 17 - Google Gemini Chat Model4

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

Block 18 - Google Gemini Chat Model6

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

Block 19 - Sticky Note6

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

Block 20 - smatlead-create-campaign

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 21 - smartlead-add-leads-to-campaign

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 22 - Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 23 - Get many rows

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

Block 24 - Update a row

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

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

3. Summary Table

Workflow Personalized cold email generator with Supabase, Smartlead & Google Gemini AI
Complexity advanced
Nodes 26
Categories Lead Nurturing, Multimodal AI
Author Rahi Uppal
Published 21 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7713/7713.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 Personalized cold email generator with Supabase, Smartlead & Google Gemini AI do?

n8n Workflow: AI Personalized Email Outreach (Smartlead) Purpose This workflow automates cold email campaigns by: Fetching leads Generating hyper personalized email content using AI Sending emai...

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.