A real estate CRM agents run from WhatsApp
Real estate agents upload units, search inventory and book client calls by sending a WhatsApp text or voice note. AI agents turn each message into structured data.
- Role
- Founder, architect and QA. Designed workflows, prompts and data model; directed AI coding tools; deployed and supports it.
- Period
- Apr 2026 – present
- Status
- Live with 2 brokerages
- Stack
- n8n (queue mode), Qwen3 235B, Supabase, Evolution API (WhatsApp), React + Vite, Flutter, Docker, Nginx Proxy Manager
- 2brokerages live
- ~300units uploaded per month (one client)
- 100–120searches per month (one client)
- 21fields extracted per listing
- 300+compounds matched by alias
Architecture
System steps in order
- Upload
- WhatsApp message (Input)
- Evolution API webhook (Logic)
- Strip PII and empty fields (Logic)
- Build prompt with live projects and areas, reads Supabase (Logic)
- AI agent: extract 21 fields (AI)
- Validate JSON (Logic)
- Insert unit, Supabase (Data)
- Confirm on WhatsApp (Output)
- Projects and areas alias table (Data). Feeds: Build prompt with live projects and areas; Build search prompt
- Search
- WhatsApp message (Input)
- Build search prompt (Logic)
- AI agent: 13-field filter (AI)
- Query inventory, Supabase (Data)
- Format results (Logic)
- Reply on WhatsApp (Output)
- Booking
- Text or voice note (Input)
- Gemini transcription (AI)
- AI agent: extract booking (AI)
- Check conflicts, appointments (Data)
- Conflict? warn and suggest a time (Alert)
- Save appointment (Data)
- Scheduled reminders (Logic)
- WhatsApp reminder before and at the time (Output)
- Operations
- Workflow error (Alert)
- Log (Data)
- WhatsApp alert to admin (Output)
- WhatsApp instance monitor with QR reconnection (Logic)
The problem
Brokerage agents share units and requests all day in WhatsApp, in Egyptian Arabic, English or a mix, full of typos and spoken price formats. That information never reached a searchable system, so agents scrolled chats to find a unit and missed follow-ups.
What I built
Three WhatsApp-triggered AI workflows on top of a multi-role CRM:
- Upload: an agent pastes or types a unit. A code step strips client names and phone numbers before any model sees the text. The prompt is built live with the current list of projects and areas from Supabase, and an n8n AI agent returns a fixed 21-field JSON object, which is validated and saved.
- Search: an agent asks in plain language ("twin house in New Cairo with a garden under 12 million"). The agent converts it into a 13-field filter, Supabase is queried, and matching units return on WhatsApp within seconds.
- Booking: an agent sends a text or voice note ("book a call with a client tomorrow at 4, remind me 30 minutes before"). The system extracts type (meeting or call), client, time and reminder lead time, checks the agent's calendar, warns about conflicts with existing appointments, then sends WhatsApp reminders before and at the appointment time.
Key decisions
- Store everything in English, accept anything. Arabic, English and mixed input are normalised to one canonical English form at upload and at search, so a unit uploaded in Arabic is found by a search in English.
- Aliases instead of model guessing. A table of 300+ Egyptian compounds with Arabic names, abbreviations and common misspellings is injected into the prompt, so the model chooses from known values rather than inventing them.
- Privacy before the model. Client personal data is removed in code before the LLM call.
- One isolated server per client. Each brokerage gets its own VPS with self-hosted Supabase and n8n in queue mode (3 workers), so data never mixes between clients.
Results
Live with 2 brokerages. At one client, agents upload about 300 units and run 100–120 searches a month through WhatsApp.
In action
Upload
Inventory assistant
شقة للبيع في مدينتي B12، 3 غرف و2 حمام، 165 متر، الدور التالت، متشطبة، السعر 6 ونص مليون، المقدم مليون ونص
10:42- Inventory assistant:
Saved ✓ Apartment in Madinaty B12, 3 bedrooms, EGP 6.5M. Unit code U-2481
Behind the scenes
Extracting fields
- project
- Madinaty
- phase
- B12
- type
- Apartment
- bedrooms
- 3
- bathrooms
- 2
- bua_m2
- 165
- floor
- 3
- finished
- true
- price
- 6500000
- down_payment
- 1500000
- remaining
- 5000000
- listing
- Sale
Search
Inventory assistant
عايز توين هاوس في التجمع بجاردن تحت 12 مليون
11:05- Inventory assistant:
Found 3 units:
- Cedar Park: 4 bedrooms, EGP 11.2M
- Lotus Hills: 4 bedrooms, EGP 10.75M
- Rowan Gardens: 3 bedrooms, EGP 9.9M
Behind the scenes
Turning the request into a filter
- type
- Twin House
- area
- New Cairo
- garden
- true
- price_max
- 12000000
| Compound | Type | Bedrooms | Garden | Price (EGP) |
|---|---|---|---|---|
| Cedar Park | Twin House | 4 | 120 m² | 11,200,000 |
| Lotus Hills | Twin House | 4 | 95 m² | 10,750,000 |
| Rowan Gardens | Twin House | 3 | 80 m² | 9,900,000 |
3 units found in 1.2s
Booking
Inventory assistant
- 15:20
- Inventory assistant:
You already have a site visit at 4:00 PM. Book 5:00 PM instead?
Yes, 5
- Inventory assistant:
Booked. Reminders at 4:30 PM and 5:00 PM.
Behind the scenes
Transcribing the voice note and extracting the booking
Transcript
Book a call with Karim tomorrow at 4, remind me 30 minutes before.
- type
- Call
- client
- Karim
- date
- tomorrow
- time
- 16:00
- remind_before_min
- 30