Real-estate agency: an AI assistant for property search and objection handling
A Telegram bot for agents: plain-language property search, a client profile that works like a CRM, and ready-made sales arguments.
- Scale
- ~15,000 listings, Novosibirsk
- Stage
- 2 stages delivered
- Delivered
- September 2025
TL;DR. Two stages: an MVP on n8n, then a Python backend with personalisation. The agent types "two-bed under 9M in Oktyabrsky" into Telegram, the bot finds the listings, remembers each client's profile, and hands over ready-made arguments for closing objections.
Situation
Agents selling new-build apartments searched developer websites by hand. While they searched, the client cooled off. Handling objections — "too expensive", "too far", "we'll wait for a discount" — depended entirely on the individual agent's experience. Client context (budget, priorities, history) was stored nowhere: the agent kept it in their head, or lost it.
Task
- Automate the initial property search from a plain-language request.
- Keep the listings database synced across every major developer in real time.
- Give agents a personalised search tool with client profiles and ready-made sales arguments.
What we built
Stage 1 — MVP. n8n, Supabase (PostgreSQL), an LLM and the Telegram Bot API. Hourly sync from developers' XML feeds through an n8n workflow with an upsert into the database (~15,000 listings). On an incoming message from an agent, the LLM extracts parameters from the text (number of rooms, price, floor area, city) and returns typed JSON, which goes straight into a SQL query filtered on "Available". The bot replies with up to 5 cards showing the floor plan, area and price.
Stage 2 — personalisation. Moved off n8n onto a single Python backend: sync, bot logic and LLM orchestration in one service. The data source changed from XML feeds to the Realty API, and the service now pulls 7 entities — developers, projects, buildings, tags, promotions, mortgage terms and units. A sweep function deletes records from the database once they disappear from the API.
Client profile: the bot remembers budget, district, priorities and objections, ties the profile to a phone number, and switches between parallel clients within a single conversation with the agent.
Personalised ranking: results get re-sorted against the profile's priorities, and cards pick up 1–2 selling points from the promotions and development tags.
Objection handling: the bot classifies the objection and returns 2–3 ready phrasings in three registers — soft, expert, firm — with facts from current promotions and alternatives.
Result
- Finding properties takes seconds instead of several minutes of manual search.
- The agent gets ready phrasings for each objection rather than inventing an answer on the spot.
- The bot works as a CRM inside the chat: it remembers each client's profile and switches between them without losing context.
Key technical decisions
- The LLM as a typed query parser. Instead of rigid filters, the agent writes in ordinary language. The LLM returns strictly typed JSON (
rooms,price_max,area_min,city) that goes straight into SQL, with no translation layer in between. - The sweep function. On every sync, records that no longer exist in the Realty API are deleted. Without it, stale listings accumulate and the agent starts showing clients apartments they can't buy.
- The client profile as context, not a separate system. Budget, priorities and objections are stored as context of the same Telegram conversation the agent is already in — no switching between tools.
FAQ
Why Telegram rather than a dedicated app for agents?
Agents are in Telegram all day already. A separate app means installation, training and context switching — and the search is needed during the conversation with the client, not after it.
What stops the bot from showing a property that's already sold?
The sweep function: on every sync, records that no longer exist in the Realty API are deleted, and there's a status filter in the query itself. Without that, stale listings pile up and the agent loses trust in the results after the first unavailable apartment.
Does the bot talk to the client directly?
No. It's a tool for the agent: the search results, the client profile and the objection phrasings go to the agent, who decides what to say and how. The three registers — soft, expert, firm — are options to pick from, not an auto-reply to the client.
Why move from n8n to a Python backend?
n8n was right for the MVP: a fast way to check that plain-language search worked at all. Personalisation, client profiles and 7 entities from the Realty API need proper code with tests — the logic stopped fitting into a chain of nodes.
What would come next
The natural continuation is automatic qualification of inbound enquiries, AI lead scoring against profile priorities, and analytics on objection patterns across the conversation history.
If you have a similar problem — a sales team that competes on response speed, or agents who start from scratch every time — let's talk it through in 30 minutes.
Stack
- Python
- Telegram Bot API
- LLM
- PostgreSQL
- Supabase
- n8n
- pytest