# Automated B2B prospecting with RapidAPI and Hunter.io: n8n workflow

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

Source: https://millionrounds.com/workflow/automated-b2b-prospecting-with-rapidapi-and-hunter-io (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)

# Automated B2B prospecting with RapidAPI and Hunter.io

Started by someone submitting a form, and works across Gmail. It hands the judgement calls to OpenAI. 17 steps, 3 branches: a working afternoon to understand properly.

Medium Calls a model: OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fautomated-b2b-prospecting-with-rapidapi-and-hunter-io)

**17 steps** Medium: a working afternoon

**3** Branches: places the flow splits

**0** Loops or waits

**1** Service it connects to

## The flow

Starts it 1 Model 2 Logic 9 Service 5

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

- 1 **OpenAI Chat Model** Lm Chat Open Ai *Model*
- 2 **compagny_search** Form trigger *Starts it*
- 3 **Generate Email Body (AI)** Agent *Model*
- 4 **Search Local Businesses** Http Request *Service*
- 5 **Format AI Output** Code *Logic*
- 6 **Split Out Businesses** Split Out *Logic*
- 7 **Assemble Final Email** Set *Logic*
- 8 **If Website Exists** If *Logic*
- 9 **Send Email (Gmail)** Gmail *Service*
- 10 **Scrape Website** Http Request *Service*
- 11 **Set Task Data** Set *Logic*
- 12 **If Scraping Succeeded** If *Logic*
- 13 **Create Google Task for Follow-up** Google Tasks *Service*
- 14 **Extract Title & Description** Html *Logic*
- 15 **Find Contacts (Hunter)** Hunter *Service*
- 16 **Split Out Contacts** Split Out *Logic*
- 17 **If Contact Is Valid** If *Logic*

## How it's built

- **Starts on:** Someone submitting a form
- **Steps:** 17, with 3 branches
- **Size:** Medium: a working afternoon
- **Connects to:** Gmail
- **Model:** OpenAI

## Questions

What does it need to run?

An n8n account, plus your own Gmail account, 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?

Plan an afternoon. 17 steps is enough that you should read each one before running it.

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 17 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%2Fautomated-b2b-prospecting-with-rapidapi-and-hunter-io)
- **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)

## Workflows like it

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

- [**Analyze sales calls & route leads with OpenAI and Airtable** 17 steps · calls a model · Airtable, Gmail](https://millionrounds.com/workflow/analyze-sales-calls-and-route-leads-with-openai-and-airtable)
- [**Extract B2B lead emails from Google results with SerpAPI** 17 steps · calls a model · Gmail, Telegram](https://millionrounds.com/workflow/extract-b2b-lead-emails-from-google-results-with-serpapi)
- [**Find and verify business emails with ScraperCity and OpenAI** 17 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/find-and-verify-business-emails-with-scrapercity-and-openai)
- [**Qualify and route consulting leads with Slack** 17 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/qualify-and-route-consulting-leads-with-slack)
- [**Reply to new real estate leads with Claude and Gmail** 17 steps · calls a model · Gmail](https://millionrounds.com/workflow/reply-to-new-real-estate-leads-with-claude-and-gmail)
- [**Capture and reply to real estate leads with Typeform and Groq** 17 steps · Airtable, Gmail](https://millionrounds.com/workflow/capture-and-reply-to-real-estate-leads-with-typeform-and-gro)
