← Back to Portfolio

WhatsApp AI Property Assistant for Real Estate Agencies

A multi-tenant automation system that turns WhatsApp inquiries into qualified leads, property matches, scheduled inspections, and real-time agent alerts.

📅 2026
🏗️ Personal Product / Startup Prototype
AI + Automation + CRM
🛠️

Tech Stack

Next.js TypeScript n8n Supabase Postgres WhatsApp Cloud API Ollama Cloudflare Tunnel
Multi
Tenant Agency Support
Live
Workflow Prototype
Hybrid
AI + Deterministic Logic
📋

Project Overview

This project turns WhatsApp into a front door for real estate agencies. The system captures buyer intent conversationally, stores lead and conversation state in Supabase, searches an agency's property inventory, sends listing images inside WhatsApp, schedules inspections, scores lead intent, and alerts agents when a lead becomes qualified or shows strong buying signals.

It is built as a multi-tenant product rather than a standalone bot. A Next.js agency portal handles listings, agents, leads, and human takeover, while n8n workflows orchestrate lead qualification, property matching, media delivery, lead scoring, and notifications behind the scenes.

Core principle: AI makes the conversation feel natural, but the database, workflow state, property search, scoring, and handoff controls remain deterministic so the business logic stays dependable.

🎯

Problem Definition

Real estate agencies often receive leads through WhatsApp, but those conversations are usually handled manually. That creates inconsistent qualification, slow follow-up, missing context, weak visibility into lead quality, and poor escalation when a lead turns serious.

  • Qualification questions are repetitive and time-consuming for agents.
  • Lead context gets trapped inside chats instead of becoming structured data.
  • Listing recommendations and images are sent inconsistently.
  • There is no reliable memory of buyer preferences across turns.
  • Human takeover is difficult without an operational dashboard.
🧭

Decision Rationale

  • n8n was chosen so the workflows stay visual, editable, and easy to inspect.
  • Supabase provides a practical all-in-one backend for Postgres, REST access, and media storage.
  • WhatsApp Cloud API was necessary because the user journey starts inside WhatsApp, not a custom app.
  • Ollama supported local inference under a self-hosted cost constraint.
  • Deterministic routing was layered on top of AI after pure AI orchestration caused repeated questions and unreliable actions.
  • Worker workflows kept the main orchestration manageable and easier to debug.
  • Portal-based takeover was added because agencies need operational control over when the bot should stop replying.
💡

Full Thought Process

Click to expand full thought process

1. Start with the real communication channel

The project started from a product truth: buyers already reach agencies on WhatsApp. Instead of moving them into another interface, the system needed to operate inside the channel they already trust and use every day.

2. Add memory before intelligence

A bot is not useful if it forgets what was already said. That made lead state, conversation memory, and listing context more important than the first AI prompt. Supabase became the source of truth before the AI layer was allowed to make the experience more flexible.

3. Let AI interpret language, not own the workflow

AI helped interpret messy natural language, but critical actions such as state transitions, listing search, scoring, notification triggers, and handoff rules had to remain deterministic. That reduced repeated loops and made the workflow reliable enough for production-like use.

4. Treat listing discovery as a conversion flow

Sending a property name is not enough. A serious buyer needs relevant options, images, follow-up questions, and a path into viewing or negotiation. That led to explicit handling for selected property context, image delivery, scheduling, and alerts.

5. Build for agencies as much as for buyers

The assistant had to be backed by a portal where agencies can upload listings, manage agents, review leads, and take over chats. Without the agency-side operating layer, the automation would stay a demo instead of a usable product.

6. Design for multi-tenant trust

Once the system became multi-tenant, agency isolation became a product requirement. Property search, notifications, and lead management had to be scoped safely to the correct tenant to avoid serious operational mistakes.

🏛️

Architecture & Data Model

The system is organized around three layers: a Next.js agency portal for management, Supabase for data and media storage, and n8n workflows for automation and orchestration. The database models agencies, agents, properties, property images, leads, conversation state, notifications, and worker logs so every workflow step can rely on shared state.

Supabase database schema for the property assistant
Supabase schema connecting agencies, agents, properties, images, leads, conversation state, notifications, and worker logs.
💬

Lead Qualification & Property Discovery

The assistant qualifies buyers conversationally by collecting area, budget, property type, bedrooms, and timing. Once enough context exists, it searches the correct agency inventory, returns matching options, sends property images directly in chat, and continues the conversation toward negotiation or viewing.

WhatsApp conversation showing listing suggestions and image delivery
WhatsApp conversation flow showing qualification, listing suggestion, property image delivery, and negotiation follow-up.
🏢

Agency Portal

The agency portal gives the business side of the system full operational control. Agencies can manage listings, upload inventory, assign agents, inspect lead state, and take over conversations when automation should stop replying.

Leads page in the agency portal
Lead management screen showing score, stage, assigned agent, bot status, and takeover controls.
Listings page in the agency portal
Portal inventory view where agencies manage the property catalog used by the WhatsApp assistant.
Create listing page in the agency portal
New listing flow used to upload property details and images into the agency inventory.
⚙️

Automation Workflows

The main n8n workflow handles inbound message normalization, dedupe, state retrieval, routing, and persistence. Worker workflows isolate specialized responsibilities so complex operations can be hardened independently without making the main orchestration too crowded.

n8n image delivery worker workflow
Dedicated image delivery worker responsible for resolving media, uploading it to WhatsApp, and updating delivery state safely.
🔥

Lead Scoring & Agent Alerts

The system scores buyer intent based on field completion and high-intent signals such as image requests, negotiation language, and viewing requests. When a lead becomes warm or hot, the assigned agent receives a structured WhatsApp notification with the context needed to step in quickly.

WhatsApp notifications for warm and hot leads
Agent-facing WhatsApp alerts showing warm and hot lead summaries with phone, budget, property context, and trigger reason.
🧩

Challenges & Solutions

  • Repeated AI questions were fixed by making database state authoritative and routing follow-up questions deterministically.
  • Malformed AI JSON was handled with safer parsing and repair before business logic executed.
  • Supabase null-field and upsert issues were reduced by normalizing phone numbers early and writing only valid updates.
  • Image delivery failures were resolved by redesigning the media pipeline into a dedicated worker workflow.
  • Date and time scheduling became more reliable after adding hybrid parsing instead of relying only on model output.
  • Cross-agency listing leakage was prevented by scoping inventory search strictly to the mapped agency.
👤

My Contribution

This project was built as a personal product and startup-style prototype. I designed and implemented the end-to-end experience across automation, backend structure, product logic, and agency operations.

  • Designed the multi-tenant product architecture and workflow model.
  • Built the WhatsApp automation flows in n8n, including worker workflows.
  • Designed and evolved the Supabase schema for listings, leads, images, and state.
  • Developed the Next.js agency portal for listings, agents, leads, and takeover controls.
  • Integrated WhatsApp Cloud API, Supabase, Ollama, and Cloudflare tunnel infrastructure.
  • Defined lead scoring logic, alerting triggers, and the human handoff model.
💭

Reflection & Learnings

This project reinforced that conversational AI becomes truly useful only when it is anchored to durable state, clear business rules, and an operational interface that real teams can trust. It also highlighted how early product decisions around tenant isolation and human handoff become critical as soon as a prototype starts resembling a real workflow.

Key takeaway: AI works best in operational products when it handles language flexibility while deterministic systems protect context, workflow safety, and business-critical decisions.