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

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

Ready for 3.0

by Mushood Hanif · 212 views · created 2026-01-30 · Lead Generation, AI RAG

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 59 nodes and runs manually, when you click “Execute workflow” (plus 3 other triggers). Along the way it connects Pinecone Vector Store, Google Drive, Google Sheets and Embeddings Google Gemini and 5 more. It also calls google.serper.dev over HTTP.

How it runs

Trigger: Manually, when you click “Execute workflow” (plus 3 other triggers).

  1. Search files and folders (Google Drive): work with file folder
  2. Lead Criteria Agent (AI Agent): runs an AI agent, with model: Gemini; 1 tool (KB - Lead Criteria); output parser: Parser
  3. Get Companies (Postgres): select
  4. Get Leads (Postgres): select
  5. Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
  6. Extract Queries (Code): runs custom JavaScript code
  7. Loop Over Companies (Loop Over Items (Split in Batches)): loops over the items in batches
  8. Loop Over Leads (Loop Over Items (Split in Batches)): loops over the items in batches
  9. nonDownloadableFile (If): checks a condition and branches into true / false
  10. Loop Over Queries (Loop Over Items (Split in Batches)): loops over the items in batches

…plus 29 more steps. See the full node list below.

Services it uses

Pinecone Vector StoreGoogle DriveGoogle SheetsEmbeddings Google GeminiGoogle Gemini Chat ModelPostgresHunterHTTP RequestGmail

HTTP calls to: google.serper.dev

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (22)

From the author

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…

Excerpt from Mushood Hanif's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.