# Qualify real estate leads with SMS and OpenAI: n8n workflow

> Started by someone submitting a form, and works across Google Sheets, Postgres and Twilio.

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

# Qualify real estate leads with SMS and OpenAI

Started by someone submitting a form, and works across Google Sheets, Postgres and Twilio. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 18 steps, 1 branch, 2 loops or waits: a working afternoon to understand properly.

Medium Calls a model: OpenAI Retrieval

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

**18 steps** Medium: a working afternoon

**1** Branch: places the flow splits

**2** Loops or waits

**3** Services it connects to

## The flow

Starts it 2 Model 6 Logic 4 Service 6

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

- 1 **On form submission** Form trigger *Starts it*
- 2 **Postgres Chat Memory** Memory Postgres Chat *Model*
- 3 **OpenAI Chat Model1** Lm Chat Open Ai *Model*
- 4 **OpenAI Chat Model2** Lm Chat Open Ai *Model*
- 5 **Structured Output Parser1** Output Parser Structured *Model*
- 6 **Wait for Text Response** Twilio trigger *Starts it*
- 7 **Wait 5 Seconds** Wait *Logic*
- 8 **Real Estate Qualifier** Agent *Model*
- 9 **Summarize Transcript** Agent *Model*
- 10 **Wait** Wait *Logic*
- 11 **Initial Text Message** Twilio *Service*
- 12 **Check if Conversation Completed** If *Logic*
- 13 **Store results in google** Google Sheets *Service*
- 14 **Query Supabase for conversation history** Postgres *Service*
- 15 **Thank Your Text** Twilio *Service*
- 16 **Response Text from Agent** Twilio *Service*
- 17 **Send Lead to owner** Twilio *Service*
- 18 **Combine Rows** Aggregate *Logic*

## How it's built

- **Starts on:** Someone submitting a form
- **Steps:** 18, with 1 branch, 2 loops or waits
- **Size:** Medium: a working afternoon
- **Connects to:** Google Sheets, Postgres, Twilio
- **Model:** OpenAI
- **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 Google Sheets, Postgres and Twilio 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. 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?

Plan an afternoon. 18 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 18 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-real-estate-leads-with-sms-and-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.

[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)[Postgres](https://millionrounds.com/workflows?service=Postgres#library)[Twilio](https://millionrounds.com/workflows?service=Twilio#library)

## Workflows like it

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

- [**AI lead gen & personalized email agent with Sheets and Apify** 18 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/ai-lead-gen-and-personalized-email-agent-with-sheets-and-api)
- [**AI-powered lead research & personalized email generation** 18 steps · calls a model · Google Sheets](https://millionrounds.com/workflow/ai-powered-lead-research-and-personalized-email-generation)
- [**Automate B2B lead generation & personalized cold emails** 18 steps · calls a model · Email, Gmail](https://millionrounds.com/workflow/automate-b2b-lead-generation-and-personalized-cold-emails)
- [**Automated lead capture & AI-personalized audio follow-up** 18 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/automated-lead-capture-and-ai-personalized-audio-follow-up)
- [**Create AI personalized video & voice outreach with HeyGen** 18 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/create-ai-personalized-video-and-voice-outreach-with-heygen)
- [**Draft personalized cold emails from Google Sheets with Gemini** 18 steps · calls a model · Google Sheets](https://millionrounds.com/workflow/draft-personalized-cold-emails-from-google-sheets-with-gemin)
