Skip to main content

Generate product-aware B2B leads and outreach emails with Gemini, Pinecone and Gmail

Workflow preview

Workflow preview
100%
Generate product-aware B2B leads and outreach emails with Gemini, Pinecone and Gmail preview
Open on n8n.io

1. Workflow Overview

How can you find your target market if you don't know what your product is. This simple philosophy changes the way we think about automated sales agents. Context changes everything. In this 4 part ...

Best for

  • Lead Generation automation workflows
  • AI RAG automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.vectorstorepinecone, @n8n/n8n-nodes-langchain.documentdefaultdataloader, @n8n/n8n-nodes-langchain.textsplitterrecursivecharactertextsplitter, n8n-nodes-base.googledrive, n8n-nodes-base.crypto, n8n-nodes-base.switch, n8n-nodes-base.splitinbatches, n8n-nodes-base.googlesheets

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Generate product-aware B2B leads and outreach emails with Gemini, Pinecone and Gmail
Workflow name
Generate product-aware B2B leads and outreach emails with Gemini, Pinecone and Gmail

How can you find your target market if you don't know what your product is.

This simple philosophy changes the way we think about automated sales agents. Context changes everything. In this 4-part workflow, we start by creating a knowledge base that will act as context across the workflow. This context will guide and provide our AI Agents across the workflow to locate better leads and perform market research based on what the product actually offers.

Use Case: Lead generation for Product-based Sales

Tech Required

  • Neon DB: For storing Research and Lead Data. You can use Google sheets but it has a rate limiting problem.
  • Google Serper: As a web search tool for our AI.
  • Google Drive: For storing our knowledge base documents.
  • Pinecone: Vector DB for converting our knowledge base into context for AI.
  • Hunter.io: For finding emails for outreach.
  • Email Client: An email client, maybe gmail or anything that can send an email on your behalf.
  • Gemini: Our trusty AI LLM.

Good to know

All of the tools that I use in this workflow are either free or have an extremely generous free-tier.

How it works

  • We start by converting our knowledge base into context for AI. Take in the documents from Google drive and convert it into embeddings and store them in a vector store like Pinecone. This needs to be only run once, or whenever you have a new document in your knowledge base.
  • Then we pass this context to an AI agent and tell it to generate search queries for locating companies that actually need my services.
  • Then for each company that we've located, we determine the company staff that we need to reach out to for selling our product. This will be done by a combination of Google Serper and Hunter.io
  • Once we have the list of employees and their emails, we start creating personalized emails based on the data we've collected for each of the employee and send them outreach emails.

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 - Pinecone Vector Store

Type / Role
@n8n/n8n-nodes-langchain.vectorStorePinecone - vectorStorePinecone
Config choices
Version 1.2

Block 2 - Default Data Loader

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

Block 3 - Recursive Character Text Splitter

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

Block 4 - Search files and folders

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

Block 5 - Download file

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

Block 6 - createHash

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

Block 7 - Switch

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

Block 8 - Loop Over Items

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

Block 9 - Add to Record Manger

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

Block 10 - Pinecone Vector Store1

Type / Role
@n8n/n8n-nodes-langchain.vectorStorePinecone - vectorStorePinecone
Config choices
Version 1.2

Block 11 - Update the RecordManger

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

Block 12 - Download file1

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

Block 13 - Download file2

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

Block 14 - nonDownloadableFile

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

Block 15 - Embeddings Google Gemini

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

Block 16 - searchRecordManger

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

Block 17 - When clicking ‘Execute workflow’

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

Block 18 - Schedule Trigger

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

Block 19 - Parser

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

Block 20 - Lead Criteria Agent

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

Block 21 - Gemini

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

Block 22 - KB - Lead Criteria

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

Block 23 - Embeddings

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

Block 24 - Extract Queries

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

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

3. Summary Table

Workflow Generate product-aware B2B leads and outreach emails with Gemini, Pinecone and Gmail
Complexity advanced
Nodes 63
Categories Lead Generation, AI RAG
Author Mushood Hanif
Published 30 Jan 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/13119/13119.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 Generate product-aware B2B leads and outreach emails with Gemini, Pinecone and Gmail do?

How can you find your target market if you don't know what your product is. This simple philosophy changes the way we think about automated sales agents. Context changes everything. In this 4 part ...

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