Automation library · Lead generation

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.

LargeCalls a model: Groq

28 stepsLarge: read it before trusting it with anything live
2Branches: places the flow splits
6Loops or waits
2Services it connects to

The flow

Starts it 2Model 3Logic 14Service 9

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

  1. 1Parse Email JSONOutput Parser StructuredModel
  2. 2Groq LLM (Fast AI)Lm Chat GroqModel
  3. 3Lead Generation FormForm triggerStarts it
  4. 4When clicking Execute WorkflowManual triggerStarts it
  5. 5AI Cold Email WriterAgentModel
  6. 6Apollo, Search LeadsHttp RequestService
  7. 7Fetch Leads from SheetGoogle SheetsService
  8. 8Save Email to SheetGoogle SheetsService
  9. 9Extract People DataCodeLogic
  10. 10Filter Pending LeadsIfLogic
  11. 11Wait, Email Cooldown (4s)WaitLogic
  12. 12Process Each LeadSplit In BatchesLogic
  13. 13Email Generation LoopSplit In BatchesLogic
  14. 14Merge for Dedup CheckMergeLogic
  15. 15Fetch Existing Lead IDsGoogle SheetsService
  16. 16Fetch Leads for MailGoogle SheetsService
  17. 17Deduplicate LeadsCodeLogic
  18. 18Remove DuplicatesRemove DuplicatesLogic
  19. 19Skip DuplicatesIfLogic
  20. 20Filter1FilterLogic
  21. 21Wait, Apollo Cooldown (2s)WaitLogic
  22. 22Loop Over ItemsSplit In BatchesLogic
  23. 23Apollo, Enrich Lead DataHttp RequestService
  24. 24Send Cold Email via GmailGmailService
  25. 25Format & Clean Lead DataCodeLogic
  26. 26Update the Outreach StatusGoogle SheetsService
  27. 27Save Leads to SheetGoogle SheetsService
  28. 28Wait, Email Cooldown (60s)WaitLogic

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.