Qualify and route real estate leads with OpenAI, PostgreSQL, Gmail and Slack
Ready for 3.0What this workflow does
This AI workflow has 18 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Postgres, OpenAI, Twilio and Gmail and 1 more.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Extract Lead Details (Edit Fields (Set)): sets 7 fields: name, email, phone…
- Validate Lead Data (If): checks a condition and branches into true / false
- Save Lead in Database (Postgres): uses Postgres
- Combine Lead + AI Data (Merge): merges the data from its input branches
- Return Invalid Lead Response (Respond to Webhook): sends the response back to the webhook caller
- AI Lead Qualification (OpenAI): uses OpenAI
- Assign Sales Agent (Code): runs custom JavaScript code
- Parse AI Response (Code): runs custom JavaScript code
- Update Lead Score (Postgres): update
- Check High Priority Lead (If): checks a condition and branches into true / false
…plus 7 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (12)
- Webhook
n8n-nodes-base.webhook - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - Respond to Webhook
n8n-nodes-base.respondToWebhook - Postgres
n8n-nodes-base.postgres - OpenAI
@n8n/n8n-nodes-langchain.openAi - Code
n8n-nodes-base.code - Merge
n8n-nodes-base.merge - Twilio
n8n-nodes-base.twilio - Gmail
n8n-nodes-base.gmail - Slack
n8n-nodes-base.slack - Wait
n8n-nodes-base.wait
From the author
Quick Overview This workflow receives real estate leads via a webhook, validates the data, stores it in PostgreSQL, scores and classifies the lead with OpenAI, assigns an agent by location, then sends customer confirmations via Twilio and Gmail and alerts the…