Automation library · Lead generation

Scrape Businesses with LLM-expanded and Deduplicate

Started by an event in a connected app, and works across Gmail, Google Drive and Google Sheets. It hands the judgement calls to OpenAI. 22 steps: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAI

22 stepsLarge: read it before trusting it with anything live
0Branches: places the flow splits
0Loops or waits
3Services it connects to

The flow

Starts it 1Model 4Logic 6Service 11

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

  1. 1OpenAI Chat Model1Lm Chat Open AiModel
  2. 2OpenAI Chat ModelLm Chat Open AiModel
  3. 3Google Drive TriggerGoogle Drive triggerStarts it
  4. 4Basic LLM Chain1Chain LlmModel
  5. 5Basic LLM ChainChain LlmModel
  6. 6Get row(s) in sheetGoogle SheetsService
  7. 7Output Target Limit JSONCodeLogic
  8. 8Output expanded query JSONCodeLogic
  9. 9new file from a template (copy)Google DriveService
  10. 10Search for businesses on google mapsOutscraperService
  11. 11Move new file to appropriate folderGoogle DriveService
  12. 12Split OutSplit OutLogic
  13. 13Append to new Companies ListGoogle SheetsService
  14. 14Collapse1CodeLogic
  15. 15create dedupe sheetGoogle SheetsService
  16. 16Add Headers to dedupe sheetHttp RequestService
  17. 17Get row(s) in companies sheetGoogle SheetsService
  18. 18extract domainCodeLogic
  19. 19Append info to dedupe sheetGoogle SheetsService
  20. 20CollapseCodeLogic
  21. 21Mark form entry as processedGoogle SheetsService
  22. 22Send a messageGmailService

How it's built

Starts on
An event in a connected app
Steps
22
Size
Large: read it before trusting it with anything live
Connects to
Gmail, Google Drive, Google Sheets
Model
OpenAI

Questions

What does it need to run?

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

What starts it?

It starts on an event in a connected app.

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 22 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 22 steps before you point it at anything that matters.