๐ฃ Qualify WhatsApp real estate leads with Gemini and Supabase
โก 250 views ยท ๐ฃ Lead Generation & Enrichment
Description
Quick overview
This workflow triggers on incoming WhatsApp messages, uses Google Gemini to extract and score real estate lead details, stores each lead in Supabase, and sends a WhatsApp alert to the agent only for high-intent inquiries based on configurable score thresholds.
How it works
- Triggers when a new WhatsApp message is received via the WhatsApp Business Cloud API.
- Pulls the sender name, phone number, and message text and applies your configured scoring thresholds and agent contact number.
- Sends the message to Google Gemini to extract structured lead details (budget range, property type, location preference, timeline, and intent score).
- Inserts the extracted lead data into a Supabase
leadstable for tracking. - Routes the lead based on the intent score and sends a formatted WhatsApp message to the agent for high-intent leads.
- Leaves medium- and low-intent leads logged in Supabase without sending an agent alert.
Setup
- Connect WhatsApp Business Cloud API credentials for both the incoming-message trigger and the WhatsApp send action, and activate the workflow to generate the webhook for your WhatsApp app.
- Add a Google Gemini (PaLM) API credential for the Gemini chat model.
- Add a Supabase API credential and create a
leadstable with the required columns (name, phone, budget_range, property_type, location_preference, timeline, intent_score, status, created_at). - Replace
REPLACE_WITH_AGENT_WHATSAPP_NUMBERand set the score thresholds in the configuration values, and fill in your WhatsAppphoneNumberIdused to send messages.
๐ Nodes Used
Supabase, WhatsApp Business Cloud, Basic LLM Chain, Structured Output Parser, WhatsApp Trigger, Google Gemini Chat Model
๐ฅ Import
Download workflow.json and import into n8n:
Workflow menu โ Import from File