# Scrape Businesses with LLM-expanded and Deduplicate: n8n workflow

> Started by an event in a connected app, and works across Gmail, Google Drive and Google Sheets. It hands the judgement calls to OpenAI.

Source: https://millionrounds.com/workflow/scrape-businesses-with-llm-expanded-and-deduplicate (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 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.

Large Calls a model: OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fscrape-businesses-with-llm-expanded-and-deduplicate)

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

**0** Branches: places the flow splits

**0** Loops or waits

**3** Services it connects to

## The flow

Starts it 1 Model 4 Logic 6 Service 11

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

- 1 **OpenAI Chat Model1** Lm Chat Open Ai *Model*
- 2 **OpenAI Chat Model** Lm Chat Open Ai *Model*
- 3 **Google Drive Trigger** Google Drive trigger *Starts it*
- 4 **Basic LLM Chain1** Chain Llm *Model*
- 5 **Basic LLM Chain** Chain Llm *Model*
- 6 **Get row(s) in sheet** Google Sheets *Service*
- 7 **Output Target Limit JSON** Code *Logic*
- 8 **Output expanded query JSON** Code *Logic*
- 9 **new file from a template (copy)** Google Drive *Service*
- 10 **Search for businesses on google maps** Outscraper *Service*
- 11 **Move new file to appropriate folder** Google Drive *Service*
- 12 **Split Out** Split Out *Logic*
- 13 **Append to new Companies List** Google Sheets *Service*
- 14 **Collapse1** Code *Logic*
- 15 **create dedupe sheet** Google Sheets *Service*
- 16 **Add Headers to dedupe sheet** Http Request *Service*
- 17 **Get row(s) in companies sheet** Google Sheets *Service*
- 18 **extract domain** Code *Logic*
- 19 **Append info to dedupe sheet** Google Sheets *Service*
- 20 **Collapse** Code *Logic*
- 21 **Mark form entry as processed** Google Sheets *Service*
- 22 **Send a message** Gmail *Service*

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

## 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-businesses-with-llm-expanded-and-deduplicate)
- **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 Drive](https://millionrounds.com/workflows?service=Google+Drive#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.

- [**AI-powered outreach & follow-up automation with OpenAI** 22 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/ai-powered-outreach-and-follow-up-automation-with-openai)
- [**Automated local business lead generator with WhatsApp** 22 steps · calls a model · Google Sheets, Telegram](https://millionrounds.com/workflow/automated-local-business-lead-generator-with-whatsapp)
- [**Capture, score and route Gmail leads with Groq Llama 3.3** 22 steps · calls a model · Gmail, Slack](https://millionrounds.com/workflow/capture-score-and-route-gmail-leads-with-groq-llama-3-3)
- [**Qualify and route real estate leads from web** 22 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/qualify-and-route-real-estate-leads-from-web)
- [**Qualify and score omnichannel leads with OpenAI and Gmail** 22 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/qualify-and-score-omnichannel-leads-with-openai-and-gmail)
- [**Reactivate solar leads with Google Sheets** 22 steps · calls a model · Email, Google Sheets](https://millionrounds.com/workflow/reactivate-solar-leads-with-google-sheets)
