Scrape B2B leads from Apollo, generate Groq AI emails, and send via Gmail
Ready for 3.0What this workflow does
This AI workflow has 28 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). Along the way it connects Groq Chat Model, Google Sheets and Gmail. It also calls api.apollo.io over HTTP.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).
- Fetch Leads from Sheet (Google Sheets): uses Google Sheets
- Apollo — Search Leads (HTTP Request): calls api.apollo.io (POST)
- Filter Pending Leads (If): checks a condition and branches into true / false
- Extract People Data (Code): runs custom JavaScript code
- Email Generation Loop (Loop Over Items (Split in Batches)): loops over the items in batches
- Process Each Lead (Loop Over Items (Split in Batches)): loops over the items in batches
- Fetch Leads for Mail (Google Sheets): uses Google Sheets
- AI Cold Email Writer (AI Agent): runs an AI agent, with model: Groq LLM (Fast AI); output parser: Parse Email JSON
- Merge: merges the data from its input branches
- Fetch Existing Lead IDs (Google Sheets): uses Google Sheets
…plus 14 more steps. See the full node list below.
Services it uses
HTTP calls to: api.apollo.io
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 (15)
- Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - If
n8n-nodes-base.if - AI Agent
@n8n/n8n-nodes-langchain.agent - Groq Chat Model
@n8n/n8n-nodes-langchain.lmChatGroq - Google Sheets
n8n-nodes-base.googleSheets - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - Merge
n8n-nodes-base.merge - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - n8n Form Trigger
n8n-nodes-base.formTrigger - Wait
n8n-nodes-base.wait - Gmail
n8n-nodes-base.gmail - Filter
n8n-nodes-base.filter - Remove Duplicates
n8n-nodes-base.removeDuplicates - Manual Trigger
n8n-nodes-base.manualTrigger
From the author
This n8n workflow automates your entire B2B outreach pipeline from lead discovery to personalized cold email delivery. Submit a form, let Apollo find and enrich your leads, review AI-generated emails in your sheet and send them all with one click. How it…