# Qualify and score real estate leads with WhatsApp and Gemini: n8n workflow

> Started by an incoming WhatsApp message, and works across Postgres and WhatsApp. It puts Gemini behind a retrieval step, so answers are drawn from documents...

Source: https://millionrounds.com/workflow/qualify-and-score-real-estate-leads-with-whatsapp-and-gemini (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)

# Qualify and score real estate leads with WhatsApp and Gemini

Started by an incoming WhatsApp message, and works across Postgres and WhatsApp. It puts Gemini behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 24 steps, 3 branches: large, and worth reading before you trust it with anything live.

Large Calls a model: Gemini Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fqualify-and-score-real-estate-leads-with-whatsapp-and-gemini)

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

**3** Branches: places the flow splits

**0** Loops or waits

**2** Services it connects to

## The flow

Starts it 2 Model 7 Logic 5 Service 10

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

- 1 **Webhook** Webhook *Starts it*
- 2 **WhatsApp Trigger** Whats App trigger *Starts it*
- 3 **Google Gemini Chat Model** Lm Chat Google Gemini *Model*
- 4 **Postgres Chat Memory** Memory Postgres Chat *Model*
- 5 **Google Gemini Chat Model1** Lm Chat Google Gemini *Model*
- 6 **Structured Output Parser** Output Parser Structured *Model*
- 7 **JSON Output Parser** Output Parser Structured *Model*
- 8 **Validate & Normalise Data** Code *Logic*
- 9 **Handle Message Updates** If *Logic*
- 10 **AI Agent** Agent *Model*
- 11 **Basic LLM Chain** Chain Llm *Model*
- 12 **Create or Update the Lead here** Postgres *Service*
- 13 **If** If *Logic*
- 14 **Send the typing status to the user** Http Request *Service*
- 15 **Store the Score for the Lead in the DB** Postgres *Service*
- 16 **Send template** Whats App *Service*
- 17 **Send message** Whats App *Service*
- 18 **Check if the lead has been qualified** Postgres *Service*
- 19 **Send Information to the Sales Team** Whats App *Service*
- 20 **Route Lead** If *Logic*
- 21 **Send message after qualification** Whats App *Service*
- 22 **Mark the lead qualified** Postgres *Service*
- 23 **Fetch the Transcript** Postgres *Service*
- 24 **Prepare the Transcript** Code *Logic*

## How it's built

- **Starts on:** An incoming WhatsApp message
- **Steps:** 24, with 3 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Postgres, WhatsApp
- **Model:** Gemini
- **Retrieval:** Answers are drawn from documents you supply, not from the model alone

## Questions

What does it need to run?

An n8n account, plus your own Postgres and WhatsApp accounts, and a key for Gemini. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an incoming WhatsApp message.

Does it use AI?

Yes. It calls Gemini. Its answers draw on documents you give it, not on the model alone. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 24 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 24 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%2Fqualify-and-score-real-estate-leads-with-whatsapp-and-gemini)
- **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.

[Postgres](https://millionrounds.com/workflows?service=Postgres#library)[WhatsApp](https://millionrounds.com/workflows?service=WhatsApp#library)

## Workflows like it

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

- [**Real-time lead response across social channels with Llama** 24 steps · Gmail, Google Sheets](https://millionrounds.com/workflow/real-time-lead-response-across-social-channels-with-llama)
- [**Qualify real estate WhatsApp leads with Gemini and Airtable** 23 steps · calls a model · Airtable, Google Calendar](https://millionrounds.com/workflow/qualify-real-estate-whatsapp-leads-with-gemini-and-airtable)
- [**Leads generation workflow with OpenAI and Google Sheets** 26 steps · calls a model · Google Sheets, Pinecone](https://millionrounds.com/workflow/leads-generation-workflow-with-openai-and-google-sheets)
- [**Capture CTO job leads from LinkedIn with Seamless** 22 steps · Postgres](https://millionrounds.com/workflow/capture-cto-job-leads-from-linkedin-with-seamless)
- [**AI-powered lead generation with Apollo and OpenAI** 21 steps · calls a model · Apify, Postgres](https://millionrounds.com/workflow/ai-powered-lead-generation-with-apollo-and-openai)
- [**Scrape Google Maps by area & generate outreach messages** 27 steps · calls a model · Postgres](https://millionrounds.com/workflow/scrape-google-maps-by-area-and-generate-outreach-messages)
