# Lead generation and qualification with OpenAI: n8n workflow

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

Source: https://millionrounds.com/workflow/lead-generation-and-qualification-with-openai (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)

# Lead generation and qualification with OpenAI

Started by someone submitting a form, and works across Gmail, Google Calendar and Google Sheets. It hands the judgement calls to OpenAI. 30 steps, 3 branches, 3 loops or waits: 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%2Flead-generation-and-qualification-with-openai)

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

**3** Branches: places the flow splits

**3** Loops or waits

**3** Services it connects to

## The flow

Starts it 1 Model 7 Logic 11 Service 11

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

- 1 **Structured Output Parser** Output Parser Structured *Model*
- 2 **Input Form** Form trigger *Starts it*
- 3 **OpenAI Chat Model** Lm Chat Open Ai *Model*
- 4 **OpenAI Search Model** Lm Chat Open Ai *Model*
- 5 **OpenAI Chat** Lm Chat Open Ai *Model*
- 6 **AI Answer Agent** Agent *Model*
- 7 **Log Lead to Sheet** Google Sheets *Service*
- 8 **AI Lead Enrichment** Agent *Model*
- 9 **AI Lead Classifier** Text Classifier *Model*
- 10 **Send Answer or Escalate** Gmail *Service*
- 11 **Get all columns** Google Sheets *Service*
- 12 **Define ICP and Lead Criteria** Set *Logic*
- 13 **If demo-ready not empty** If *Logic*
- 14 **If nurture not empty** If *Logic*
- 15 **If drop not empty** If *Logic*
- 16 **Return latest column** Code *Logic*
- 17 **Demo-ready Data Processing** Code *Logic*
- 18 **Schedule Demo - High Intent** Google Calendar *Service*
- 19 **Nurture Data Processing** Code *Logic*
- 20 **Wait 1 Day (1)** Wait *Logic*
- 21 **Drop Data Processing** Code *Logic*
- 22 **Send Drop Message** Gmail *Service*
- 23 **Update Sheet - Demo Ready** Google Sheets *Service*
- 24 **Update Sheet - Nurture** Google Sheets *Service*
- 25 **Send Nurture Email - Resources** Gmail *Service*
- 26 **Update Sheet - Drop** Google Sheets *Service*
- 27 **Wait 1 Day (2)** Wait *Logic*
- 28 **Send Nurture Email - Event** Gmail *Service*
- 29 **Wait 1 Day (3)** Wait *Logic*
- 30 **Schedule Demo - After Nurture** Google Calendar *Service*

## How it's built

- **Starts on:** Someone submitting a form
- **Steps:** 30, with 3 branches, 3 loops or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Google Calendar, Google Sheets
- **Model:** OpenAI

## Questions

What does it need to run?

An n8n account, plus your own Gmail, Google Calendar 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 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 30 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 30 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%2Flead-generation-and-qualification-with-openai)
- **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 Calendar](https://millionrounds.com/workflows?service=Google+Calendar#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.

- [**Automated LinkedIn lead enrichment pipeline with Google Sheets** 30 steps · calls a model · Google Sheets](https://millionrounds.com/workflow/automated-linkedin-lead-enrichment-pipeline-with-google-shee)
- [**Generate and research sales leads with Jina AI and OpenAI** 30 steps · calls a model · Airtable, Gmail](https://millionrounds.com/workflow/generate-and-research-sales-leads-with-jina-ai-and-openai)
- [**Lead workflow: Yelp & Trustpilot scraping + OpenAI analysis** 30 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/lead-workflow-yelp-and-trustpilot-scraping-openai-analysis)
- [**AI-Powered Cold Calling Automation with Google Sheets** 30 steps · Google Sheets, Slack](https://millionrounds.com/workflow/ai-powered-cold-calling-automation-with-google-sheets)
- [**Triage Gmail, draft replies and log leads with OpenAI** 30 steps · Gmail, Google Sheets](https://millionrounds.com/workflow/triage-gmail-draft-replies-and-log-leads-with-openai)
- [**Automated lead generation & AI research with Apollo** 31 steps · calls a model · Google Sheets, Slack](https://millionrounds.com/workflow/automated-lead-generation-and-ai-research-with-apollo)
