DEV Community

Arpit
Arpit

Posted on

I Built an AI That Calls Real Estate Leads in 30 Seconds — Using MeDo, Retell AI, and Zero Engineers

ags: showdev javascript ai buildinpublic

There's a stat that's been stuck in my head for months.

Lead conversion in real estate drops 400% if the first follow-up call happens more than 5 minutes after a buyer submits a form. Most Indian real estate teams call back in 4 to 6 hours.

That gap — between a buyer raising their hand and a human picking up the phone — costs India's property sector over Rs 15,000 crore every year. Not bad products. Not bad pricing. Just slow follow-up.

So I built PropCall Live. An AI that calls every lead within 30 seconds of form submission. At 11PM. On Sundays. Without a single telecaller.

Here's exactly how it works and how I built the whole thing without writing code manually.

What happens in 30 seconds
A buyer fills an enquiry form — name, phone, budget, BHK preference, timeline, source.

The moment they hit Submit, three things fire simultaneously:

  1. Lead scoring A weighted algorithm calculates a 0–100 score in milliseconds.

Budget fit: 40%
Purchase urgency: 40%
Lead source quality: 20%
A buyer looking for a 3BHK in budget who needs to move immediately scores 94 — HOT 🔥. A casual browser with no timeline scores 32 — COOL.

  1. Telegram notification
    The sales manager's phone gets a full lead card instantly — name, score, budget, and a personalised Hindi follow-up message generated on the spot.

  2. AI voice call
    Retell AI calls the buyer's phone. Natural Hindi-English conversation. Qualifies the lead. Books a site visit.

The sales team wakes up to a calendar full of confirmed visits. They never touched a lead manually.

The tech stack

Frontend: React 19 + TypeScript + Tailwind CSS
Voice: Retell AI (Web SDK + phone calling)
Alerts: Telegram Bot API
Weather: Open-Meteo API
Backend: Vercel Serverless Functions
Built with: MeDo AI
How the integrations work
Retell AI — the hard part
Retell's create-web-call endpoint is designed for server-side use. If you call it directly from the browser you get CORS errors. The fix is a Vercel serverless proxy:

// api/create-call.ts
const RETELL_API_KEY = process.env.RETELL_API_KEY;

export default async function handler(req, res) {
const { agent_id } = req.body;

const upstream = await fetch("https://api.retellai.com/v2/create-web-call", {
method: "POST",
headers: {
Authorization: Bearer ${RETELL_API_KEY},
"Content-Type": "application/json",
},
body: JSON.stringify({ agent_id }),
});

const data = await upstream.json();
res.status(upstream.status).json(data);
}
The browser calls /api/create-call. The function proxies to Retell server-side. The API key never touches the client bundle.

The access token comes back, gets handed to the Retell Web SDK:

import { RetellWebClient } from "retell-client-js-sdk";

const client = new RetellWebClient();
await client.startCall({ accessToken: data.access_token });
Live AI voice call. In the browser. In 30 seconds.

Gotcha I hit: The npm package is retell-client-js-sdk — NOT @retell-ai/retell-client-js-sdk. The scoped package returns a 404 from CDN. Cost me an hour.

Telegram — simpler than you think
Same proxy pattern. The bot token stays server-side:

// api/send-telegram.ts
await fetch(https://api.telegram.org/bot${TELEGRAM_TOKEN}/sendMessage, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
chat_id: TELEGRAM_CHAT_ID,
text: 🔥 NEW LEAD\n\n👤 ${name}\n🤖 Score: ${score}/100 — ${label}\n\n💬 ${hindiMessage},
}),
});
The sales manager sees this on their phone before the AI call has even connected.

Open-Meteo — the detail that impresses
After the form submits, I fetch a 3-day forecast for the project's coordinates:

const res = await fetch(
"https://api.open-meteo.com/v1/forecast" +
"?latitude=28.5355&longitude=77.3910" +
"&daily=weather_code,temperature_2m_max" +
"&timezone=Asia%2FKolkata&forecast_days=4"
);
WMO weather codes map to visit recommendations — clear sky days get "Good for visit", rain days get "Not ideal". Free API, no key required, zero setup.

It's a small touch. But when a judge or client sees the product suggest "Visit on Thursday — clear sky, 34°C" they understand: this thing is thinking about the whole sales process, not just the form.

Running all three in parallel
The most important line in the entire codebase:

const [telegramSent, callStarted, weatherData] = await Promise.all([
sendTelegram(...),
startRetellCall(),
fetchWeather(),
]);
Three API calls. One await. If you run them sequentially you add 2-3 seconds. Parallel keeps the whole pipeline under 30 seconds.

The MeDo part
I want to be direct about this because it's the part of the story I find most interesting.

I did not write this code manually. The entire product — React frontend, scoring algorithm, Retell integration, Telegram proxy, weather widget, CRM dashboard, ROI calculator, Vercel serverless functions, security architecture — was built by describing what I wanted to MeDo in plain English.

Not "generate a component." Full architectural decisions. "The Retell API key should never be in the browser — how do we proxy it?" MeDo figured out the serverless function approach, implemented it correctly, and caught the CORS issue before I'd even thought to look for it.

The traditional path to this product: 2-3 engineers, 3 months, Rs 15-20 lakhs. The actual path: one person with a clear product vision and MeDo.

I don't say this to dismiss engineering. I say this because if you have a product idea and the only thing stopping you is "I can't build it" — that excuse is gone.

What I'd do differently
Security first. I started with API keys in constants.ts in the client bundle. Moving them to environment variables and server-side proxies later meant touching five files. Starting with the proxy architecture would have been faster.

Verify CDN URLs before shipping. I had a broken CDN script loading a 404 in production for longer than I'd like to admit. Always curl the URL before you trust it.

The follow-up speed slider matters. The ROI calculator had a "current follow-up speed" slider that did nothing in the calculation for a while. Wiring it to the lost-leads formula — faster follow-up means fewer leads lost, with a real curve — made the tool honest.

What's next
Outbound phone calls to actual mobile numbers (not just browser calls)
White-label self-serve onboarding for any developer
Tamil, Marathi, Telugu agents
CRM webhook integrations (Kylas, Sell.Do)
If you're building anything with Retell AI or want to talk about AI-native product development in India — I'm at [your contact].

Live demo: [your Vercel URL]
GitHub: https://github.com/arpit2222/propcall

Top comments (0)