Skip to main content

Send personalized B2B cold outreach emails with Google Gemini and Gmail

Workflow preview

Workflow preview
100%
Send personalized B2B cold outreach emails with Google Gemini and Gmail preview
Open on n8n.io

1. Workflow Overview

Quick overview This workflow runs on a schedule to pull leads from an n8n Data Table, fetches and cleans each lead’s website content, uses Google Gemini to draft a personalized cold outreach email ...

Best for

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

Tools used

n8n-nodes-base.scheduletrigger, n8n-nodes-base.set, n8n-nodes-base.datatable, n8n-nodes-base.if, n8n-nodes-base.httprequest, n8n-nodes-base.code, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatgooglegemini

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Nguyễn Thiệu Toàn (Jay Nguyen).

Original n8n.io source

1.1 Workflow description

Title
Send personalized B2B cold outreach emails with Google Gemini and Gmail
Workflow name
Send personalized B2B cold outreach emails with Google Gemini and Gmail

Quick overview

This workflow runs on a schedule to pull leads from an n8n Data Table, fetches and cleans each lead’s website content, uses Google Gemini to draft a personalized cold outreach email in structured JSON, sends it via Gmail, and updates the lead status back in the Data Table.

How it works

  1. Runs on a schedule and loads sender details, the n8n Data Table ID, email length limits, and rate-limiting settings.
  2. Retrieves all leads from the n8n Data Table and checks each lead’s email address against a strict regex format.
  3. Marks leads with invalid email addresses as INVALID_EMAIL in the n8n Data Table with an updated timestamp.
  4. Fetches the lead’s website HTML and strips scripts, styles, and tags to produce a short plain-text website summary.
  5. Sends the lead details, website summary, and sender context to Google Gemini to generate a personalized outreach email returned as a JSON object (subject, greeting, opening line, main body, ending).
  6. Sends the generated email to the lead using Gmail with the AI-generated subject and body.
  7. Updates the lead record in the n8n Data Table to SENT (including sent time and email subject) and waits for the configured delay to rate-limit sending.

Setup

  1. Create or choose an n8n Data Table for your leads, ensure it includes fields like id, email, first_name, last_name, company_name, and website plus status tracking columns, and paste its ID into data_table_id in the Set Context step.
  2. Add a Google Gemini (PaLM) API credential for the Google Gemini Flash model used to generate the outreach email.
  3. Configure Gmail sending credentials (Google API) for the Gmail node, and verify the sending account is allowed to send outbound email.
  4. Update the sender/company values and constraints in Set Context (sender name/email, company name/solution, max words, and rate-limit seconds) before activating the workflow.

Requirements

  • n8n Version: Built and tested on n8n 2.20.0+. (Note: You may encounter errors on older versions. It is highly recommended to update to the latest n8n version to use this workflow effectively).
  • Google Gemini API key credentials.
  • Gmail OAuth2 credentials.
  • Built-in n8n Data Table feature enabled.

Customization

  • Change the Email Provider: Swap out the Gmail node for an Outlook or SMTP node if you use a different mailing service.
  • Change the AI Model: Replace the Google Gemini chat model with OpenAI (ChatGPT) or Anthropic (Claude) depending on your preference.
  • Integrate your CRM: Instead of using n8n Data Table, replace the fetch and update nodes with your CRM of choice, such as HubSpot or Pipedrive.

Additional info

About the Author

Created by: Nguyễn Thiệu Toàn (Jay Nguyen) Email: [email protected] Website: nguyenthieutoan.com Company: GenStaff (genstaff.net) Socials (Facebook / X / LinkedIn): @nguyenthieutoan More templates: n8n.io/creators/nguyenthieutoan

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 - Schedule Trigger

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

Block 2 - Set Context

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

Block 3 - Get Pending Leads

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

Block 4 - Validate Email Format

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

Block 5 - Mark as INVALID_EMAIL

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

Block 6 - Fetch Lead Website

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

Block 7 - Strip HTML Tags

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

Block 8 - AI Outreach Writer

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

Block 9 - Google Gemini Flash

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

Block 10 - Parse Email JSON

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

Block 11 - Send Outreach Email

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

Block 12 - Mark as SENT

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

Block 13 - Rate Limit Wait

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

Block 14 - Main Overview

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

Block 15 - Section 1

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

Block 16 - Section 2

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

Block 17 - Section 3

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

Block 18 - Warning Setup

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

Block 19 - Author Message

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

3. Summary Table

Workflow Send personalized B2B cold outreach emails with Google Gemini and Gmail
Complexity advanced
Nodes 19
Categories Lead Nurturing, Multimodal AI
Author Nguyễn Thiệu Toàn (Jay Nguyen)
Published 30 May 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16031/16031.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 Send personalized B2B cold outreach emails with Google Gemini and Gmail do?

Quick overview This workflow runs on a schedule to pull leads from an n8n Data Table, fetches and cleans each lead’s website content, uses Google Gemini to draft a personalized cold outreach email ...

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.