Skip to main content

Personalized cold email system with Google Gemini, Telegram approval & Google Sheets

Workflow preview

Workflow preview
100%
Personalized cold email system with Google Gemini, Telegram approval & 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

Personalized Cold Email System with Google Gemini AI and Telegram Approval An AI powered cold email automation that uses Google Gemini to generate personalized outreach and a Telegram workflow for ...

Best for

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

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.manualtrigger, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatgooglegemini, n8n-nodes-base.switch, n8n-nodes-base.wait, n8n-nodes-base.splitinbatches, n8n-nodes-base.telegram

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Personalized cold email system with Google Gemini, Telegram approval & Google Sheets
Workflow name
Personalized cold email system with Google Gemini, Telegram approval & Google Sheets

Personalized Cold Email System with Google Gemini AI and Telegram Approval

An AI-powered cold email automation that uses Google Gemini to generate personalized outreach and a Telegram workflow for manual approval, ensuring high-quality, human-in-the-loop campaigns.

Features

  • Smart Lead Selection: Fetches leads with an "Available" status from a designated Google Sheet.
  • AI Email Generation: Google Gemini creates a personalized subject line and email body based on lead data.
  • Telegram Approval: Sends each generated email to a Telegram chat for a one-click "Approve" or "Reject" decision.
  • Edit & Regenerate: Allows users to provide feedback on rejected emails, which the AI uses to regenerate a new version for re-approval.
  • Auto-Send: Approved emails are automatically dispatched via a configured SMTP server, including a professional signature.
  • Complete Tracking: Updates three separate Google Sheets (Filtered Leads, Sent Leads, Emails Sent) to maintain a clear audit trail.
  • Rate Limiting: A one-second delay between email sends helps avoid spam filters and protects sender reputation.
  • Batch Processing: Handles three leads per execution by default, which is configurable to scale up or down.

How It Works

  1. A manual trigger initiates the workflow and captures the current date and time for logging.
  2. The system fetches a set number of leads (default is three) from the Filtered Leads sheet where the status is "Available".
  3. It loops through each lead individually to generate and send a unique email.
  4. The AI generates a personalized email (Subject + Body) using the lead's data.
  5. A preview of the email is sent to a specified Telegram chat with "Approve" and "Reject" buttons.
  6. If approved: The email is sent via SMTP. The lead's status is updated, and logs are written to the Sent Leads and Emails Sent sheets. The system waits one second before processing the next lead.
  7. If rejected: The system prompts the user for feedback in Telegram. The feedback is combined with the original prompt to generate a new email draft, which is sent for re-approval.
  8. A final notification is sent to Telegram when the batch is complete.

Requirements

  • Google Sheets with three tabs (see structure below).
  • Telegram Bot Token and user/group Chat ID.
  • Google Gemini API Key.
  • SMTP Email Account credentials (server, port, username, password).

Setup Instructions

  1. Google Sheets Setup: Create a new Google Sheet. Rename three tabs to exactly Filtered Leads, Sent Leads, and Emails Sent. Populate the Filtered Leads sheet with your lead data according to the structure specified below.
  2. API Credentials:
    • Google Gemini: Generate an API key from your Google AI Studio account.
    • Telegram Bot: Create a new bot by messaging @BotFather on Telegram and follow the prompts to get your API token. Get your Chat ID by messaging @userinfobot.
  3. SMTP Configuration: Obtain the SMTP server address, port, username, and password from your email provider (e.g., Google Workspace, Outlook).
  4. Automation Platform: In your automation platform (e.g., n8n, Make), create a new workflow.
    • Connect your Google Sheets account using OAuth2.
    • Add the Gemini API Key, Telegram Bot Token, Chat ID, and SMTP credentials into the respective modules or credential stores.
    • Map the sheet columns to the variables in the workflow modules.

Google Sheets Structure

The automation requires the following column headers in each sheet. The names must be exact.

  • 1. Filtered Leads (Input Sheet)

    • FirstName: Lead's first name.
    • LastName: Lead's last name.
    • Email: Lead's email address.
    • CompanyName: Name of the lead's company.
    • JobTitle: Lead's current job title.
    • Website: Company website (for AI context).
    • LinkedIn: URL of the lead's LinkedIn profile.
    • Notes: Any specific details or pain points for personalization.
    • Status: Workflow status. Set to Available for leads ready to be processed.
  • 2. Sent Leads (Tracking Sheet)

    • Email: Email address of the contacted lead.
    • CompanyName: Name of the company.
    • TimestampSent: Date and time the email was sent.
  • 3. Emails Sent (Archive Sheet)

    • RecipientEmail: The lead's email address.
    • Subject: The exact subject line that was sent.
    • Body: The full email body that was sent.
    • TimestampSent: Date and time the email was sent.

Customization Guide

This template can be adapted to fit specific campaign needs.

  • Batch Size: The number of leads processed per execution is controlled by the initial "Get Leads" module. Change the Limit parameter from 3 to your desired number.
  • AI Prompt: The core of the personalization is the prompt sent to the Gemini API. Modify this prompt to change the email's tone, structure, or call-to-action. You can instruct the AI to focus on specific data from the Notes column or reference a different value proposition.
  • Lead Filtering: The trigger condition is set to pull leads where Status = "Available". This can be changed to any other logic, such as Priority = "High" or Campaign = "Q4-Push", by adjusting the filter in the Google Sheets module.
  • Email Signature: The signature is typically configured within the SMTP "Send Email" module. Update the HTML or plain text here to change the signature across all sends.
  • Telegram Notifications: The text and buttons sent to Telegram for approval can be modified. You can add more lead data to the approval message (e.g., Job Title, Company Name) to give the approver more context.

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 - Setup Guide

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

Block 2 - Sticky Note1

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

Block 3 - Sticky Note2

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

Block 4 - Sticky Note3

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

Block 5 - Sticky Note4

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

Block 6 - Sticky Note5

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

Block 7 - Sticky Note6

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

Block 8 - Sticky Note7

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

Block 9 - Sticky Note8

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

Block 10 - When clicking 'Execute workflow'

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

Block 11 - AI Agent

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

Block 12 - Google Gemini Chat Model

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

Block 13 - Switch

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 14 - Wait3

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

Block 15 - Loop Over Items1

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

Block 16 - Send a text message9

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

Block 17 - Send message and wait for response

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

Block 18 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 19 - Google Gemini Chat Model3

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

Block 20 - AI Agent1

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

Block 21 - Simple Memory1

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 22 - Google Gemini Chat Model1

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

Block 23 - Filtered Leads Update

Type / Role
n8n-nodes-base.googleSheetsTool - googleSheetsTool
Config choices
Version 4.7

Block 24 - Sent Leads Append

Type / Role
n8n-nodes-base.googleSheetsTool - googleSheetsTool
Config choices
Version 4.7

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

3. Summary Table

Workflow Personalized cold email system with Google Gemini, Telegram approval & Google Sheets
Complexity advanced
Nodes 37
Categories Lead Nurturing, AI Chatbot
Author Ahmed Sherif
Published 04 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/9267/9267.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 system with Google Gemini, Telegram approval & Google Sheets do?

Personalized Cold Email System with Google Gemini AI and Telegram Approval An AI powered cold email automation that uses Google Gemini to generate personalized outreach and a Telegram workflow for ...

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, AI Chatbot use case.