# Scrape B2B leads from Apollo, generate Groq AI emails, and send: n8n workflow

> Started by someone submitting a form, and works across Gmail and Google Sheets. It hands the judgement calls to Groq.

Source: https://millionrounds.com/workflow/scrape-b2b-leads-from-apollo-generate-groq-ai-emails-and-sen (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Lead generation](https://millionrounds.com/workflows?category=Lead+generation#library)

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

Started by someone submitting a form, and works across Gmail and Google Sheets. It hands the judgement calls to Groq. 28 steps, 2 branches, 6 loops or waits: large, and worth reading before you trust it with anything live.

Large Calls a model: Groq

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fscrape-b2b-leads-from-apollo-generate-groq-ai-emails-and-sen)

**28 steps** Large: read it before trusting it with anything live

**2** Branches: places the flow splits

**6** Loops or waits

**2** Services it connects to

## The flow

Starts it 2 Model 3 Logic 14 Service 9

The steps in the order they run, from what starts it.

- 1 **Parse Email JSON** Output Parser Structured *Model*
- 2 **Groq LLM (Fast AI)** Lm Chat Groq *Model*
- 3 **Lead Generation Form** Form trigger *Starts it*
- 4 **When clicking Execute Workflow** Manual trigger *Starts it*
- 5 **AI Cold Email Writer** Agent *Model*
- 6 **Apollo, Search Leads** Http Request *Service*
- 7 **Fetch Leads from Sheet** Google Sheets *Service*
- 8 **Save Email to Sheet** Google Sheets *Service*
- 9 **Extract People Data** Code *Logic*
- 10 **Filter Pending Leads** If *Logic*
- 11 **Wait, Email Cooldown (4s)** Wait *Logic*
- 12 **Process Each Lead** Split In Batches *Logic*
- 13 **Email Generation Loop** Split In Batches *Logic*
- 14 **Merge for Dedup Check** Merge *Logic*
- 15 **Fetch Existing Lead IDs** Google Sheets *Service*
- 16 **Fetch Leads for Mail** Google Sheets *Service*
- 17 **Deduplicate Leads** Code *Logic*
- 18 **Remove Duplicates** Remove Duplicates *Logic*
- 19 **Skip Duplicates** If *Logic*
- 20 **Filter1** Filter *Logic*
- 21 **Wait, Apollo Cooldown (2s)** Wait *Logic*
- 22 **Loop Over Items** Split In Batches *Logic*
- 23 **Apollo, Enrich Lead Data** Http Request *Service*
- 24 **Send Cold Email via Gmail** Gmail *Service*
- 25 **Format & Clean Lead Data** Code *Logic*
- 26 **Update the Outreach Status** Google Sheets *Service*
- 27 **Save Leads to Sheet** Google Sheets *Service*
- 28 **Wait, Email Cooldown (60s)** Wait *Logic*

## How it's built

- **Starts on:** Someone submitting a form
- **Steps:** 28, with 2 branches, 6 loops or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Google Sheets
- **Model:** Groq

## Questions

What does it need to run?

An n8n account, plus your own Gmail and Google Sheets accounts, and a key for Groq. You connect your own accounts after importing it; none are included.

What starts it?

It starts on someone submitting a form.

Does it use AI?

Yes. It calls Groq. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 28 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 28 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fscrape-b2b-leads-from-apollo-generate-groq-ai-emails-and-sen)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Gmail](https://millionrounds.com/workflows?service=Gmail#library)[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)

## Workflows like it

Also lead generation, with the same services where possible, closest in size first.

- [**Automated lead research – from LinkedIn to ready-to-send report** 28 steps · calls a model · Google Docs, Google Sheets](https://millionrounds.com/workflow/automated-lead-research-from-linkedin-to-ready-to-send-repor)
- [**Manage Patreon and Ko-fi leads with Gmail and OpenAI** 28 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/manage-patreon-and-ko-fi-leads-with-gmail-and-openai)
- [**Personalized cold email system with Gemini and Telegram** 28 steps · calls a model · Email, Google Sheets](https://millionrounds.com/workflow/personalized-cold-email-system-with-gemini-and-telegram)
- [**Extract & enrich LinkedIn comments to leads** 28 steps · Google Sheets](https://millionrounds.com/workflow/extract-and-enrich-linkedin-comments-to-leads)
- [**AI prospect researcher +ISCP only need company name and domain** 27 steps · calls a model · Google Docs, Google Sheets](https://millionrounds.com/workflow/ai-prospect-researcher-iscp-only-need-company-name-and-domai)
- [**Agentic B2B lead enrichment from Google Search to Google Sheets** 27 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/agentic-b2b-lead-enrichment-from-google-search-to-google-she)
