Skip to main content

Scrape B2B leads from Apollo, generate Groq AI emails, and send via Gmail

Workflow preview

Workflow preview
100%
Scrape B2B leads from Apollo, generate Groq AI emails, and send via Gmail preview
Open on n8n.io

1. Workflow Overview

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 emai...

Best for

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

Tools used

@n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.if, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatgroq, n8n-nodes-base.googlesheets, n8n-nodes-base.httprequest, n8n-nodes-base.code, n8n-nodes-base.merge

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Scrape B2B leads from Apollo, generate Groq AI emails, and send via Gmail
Workflow name
Scrape B2B leads from Apollo, generate Groq AI emails, and send via Gmail

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 works

  • Form Trigger accepts Job Title, Location and Number of Leads to kick off the workflow
  • Apollo searches for matching people and enriches each lead with email, phone, LinkedIn URL and company data
  • Duplicate check runs automatically to skip any leads already in your sheet
  • Leads are saved to Google Sheet with outreach status set to Pending
  • Manual Trigger runs the email generation section using Groq LLM to write a personalized cold email per lead
  • Generated emails are saved to the sheet for review before sending
  • Gmail sends each email and updates the outreach status to Mail Sent

How to use

  • Run Trigger 1 — Form to scrape and enrich leads from Apollo
  • Review leads in your Google Sheet
  • Run Trigger 2 — Manual to generate and send cold emails
  • Update the AI Cold Email Writer node with your company details before running

Requirements

  • Apollo account with API Key
  • Google Sheets account
  • Groq account with API Key
  • Gmail account

Customising this workflow

  • Replace Groq with OpenAI or any other LLM for email generation
  • Extend with a follow-up sequence to re-engage leads who did not reply

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 - Parse Email JSON

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

Block 2 - Filter Pending Leads

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

Block 3 - AI Cold Email Writer

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

Block 4 - Groq LLM (Fast AI)

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

Block 5 - Save Email to Sheet

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

Block 6 - Apollo — Search Leads

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

Block 7 - Apollo — Enrich Lead Data

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

Block 8 - Format & Clean Lead Data

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

Block 9 - Save Leads to Sheet

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

Block 10 - Fetch Leads from Sheet

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

Block 11 - Extract People Data

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

Block 12 - Skip Duplicates

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

Block 13 - Fetch Existing Lead IDs

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

Block 14 - Merge for Dedup Check

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

Block 15 - Deduplicate Leads

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

Block 16 - Process Each Lead

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

Block 17 - Lead Generation Form

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

Block 18 - Email Generation Loop

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

Block 19 - Wait — Email Cooldown (4s)

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

Block 20 - Wait — Apollo Cooldown (2s)

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

Block 21 - Send Cold Email via Gmail

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

Block 22 - Loop Over Items

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

Block 23 - Update the Outreach Status

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

Block 24 - Filter1

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

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

3. Summary Table

Workflow Scrape B2B leads from Apollo, generate Groq AI emails, and send via Gmail
Complexity advanced
Nodes 35
Categories Lead Generation, Multimodal AI
Author Shreya Bhingarkar
Published 18 Mar 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/14141/14141.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 Scrape B2B leads from Apollo, generate Groq AI emails, and send via Gmail do?

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 emai...

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