Automation library · Lead generation

Scrape LinkedIn B2B leads with Apify

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

LargeCalls a model: OpenAI

23 stepsLarge: read it before trusting it with anything live
1Branch: places the flow splits
2Loops or waits
3Services it connects to

The flow

Starts it 3Model 4Logic 9Service 7

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

  1. 1📥 Approved Leads WebhookWebhookStarts it
  2. 2Lead Campaign SetupForm triggerStarts it
  3. 3Rejection WebhookWebhookStarts it
  4. 4LLMLm Chat Open AiModel
  5. 5OpenAI Chat ModelLm Chat Open AiModel
  6. 6🔧 Normalize Lead DataCodeLogic
  7. 7make separate json of each keywordCodeLogic
  8. 8Webhook Data NormalizerCodeLogic
  9. 9generate Ai emailAgentModel
  10. 10Rejection Email RewriterAgentModel
  11. 11✂️ Split Email ContentCodeLogic
  12. 12Data BatcherSplit In BatchesLogic
  13. 13Rejection Data StringifierCodeLogic
  14. 14Leads LogGoogle SheetsService
  15. 15Update: Improved EmailGoogle SheetsService
  16. 16📤 Send Approved EmailGmailService
  17. 17post Apify data scrapHttp RequestService
  18. 18Lead Data BatcherSplit In BatchesLogic
  19. 19Get Apify recent run dataHttp RequestService
  20. 20If email existIfLogic
  21. 21JSON StringifierCodeLogic
  22. 22HubSpot Company CreatorHubspotService
  23. 23HubSpot Contact SyncHubspotService

How it's built

Starts on
Someone submitting a form
Steps
23, with 1 branch, 2 loops or waits
Size
Large: read it before trusting it with anything live
Connects to
Gmail, Google Sheets, HubSpot
Model
OpenAI

Questions

What does it need to run?

An n8n account, plus your own Gmail, Google Sheets and HubSpot accounts, and a key for OpenAI. 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 OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 23 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 23 steps before you point it at anything that matters.