How to build a WhatsApp bot that qualifies leads in 60 seconds
Step by step: Make + OpenAI + WhatsApp Business API. Architecture, costs, qualification prompt, and pitfalls to avoid.
- Make
- Tutorial
WhatsApp has overtaken SMS as the primary messaging channel in most European markets. If your leads prefer chat over phone calls, WhatsApp Business API + AI is throughput no call center can touch: one bot handles 500 conversations in parallel, 24/7, multi-language, replying in 3 seconds.
This tutorial shows how to build one with Make + OpenAI + WhatsApp Cloud API — a weekend project, under $50/month for 1,000 conversations.
Architecture
- Lead messages you on WhatsApp (from a Click-to-Chat ad, your website, or a QR code).
- WhatsApp Cloud API sends a webhook to Make.
- Make logs the message in Supabase/Airtable (conversation history).
- GPT-4o with a qualification system prompt generates the reply.
- Make sends the reply through WhatsApp Cloud API.
- Once qualification criteria are met (budget, timeline, decision maker), the bot writes the lead to CRM and sends a calendar link.
Step 1: WhatsApp Business Cloud API
Skip Twilio — Meta ships its own Cloud API, cheaper and direct. Setup:
- Create a Business app at
developers.facebook.com. - Add the "WhatsApp" product.
- You get a test number and 1,000 free conversations/month in sandbox.
- For production: verify your business number via WhatsApp Business Manager.
- Pricing: marketing conversation ~$0.025, utility ~$0.008 (varies by market, 2026 rates).
Step 2: Webhook to Make
In Make, build a scenario starting with "Webhooks → Custom webhook". Paste the URL in Meta Developer Console as the message callback. Subscribe to the messages field.
Gotcha: Meta requires webhook verification. Make handles it automatically, but the first subscription needs a static verify token — set it in "Custom webhook" → Advanced settings.
Step 3: Conversation history in Supabase
GPT has no memory between calls. For the bot to "remember" previous messages, you must pass them in. Simplest: a Supabase table with phone_number, role (user/assistant), content, created_at.
In Make, on every incoming message:
- Insert the user message into Supabase.
- Fetch the last 20 messages for that number, sorted chronologically.
- Map them into the OpenAI API array format.
Step 4: The system prompt — the heart of the bot
Most tutorials fall over here. A weak prompt = a robotic bot that scares leads off. A skeleton that actually works:
You are a sales assistant for [Company]. Your job:
1. Greet naturally.
2. Understand their problem (open questions, not a survey).
3. Gather 4 pieces of info, spread through the conversation:
- industry
- scale of problem (numbers, time, money)
- who decides
- when they want it solved
4. Once you have all 4, reply with JSON:
{"qualified": true, "summary": "...", "budget_signal": "...", "urgency": "..."}
5. One question per message. Max.
6. Don't pretend to be human. If asked "are you a bot" — say yes.
7. Never quote prices or timelines — hand off to the calendar.
Step 5: Router — conversation vs qualified
Add a Router after OpenAI. Branch one: if the response contains "qualified": true → write to CRM + send calendar link (Cal.com/Calendly). Branch two: normal reply → send to WhatsApp.
Step 6: Sending the reply
HTTP module in Make, POST to https://graph.facebook.com/v19.0/[PHONE_NUMBER_ID]/messages, with bearer token and body:
{
"messaging_product": "whatsapp",
"to": "{{phone}}",
"type": "text",
"text": { "body": "{{gpt_response}}" }
}
Monthly cost (1,000 conversations)
- WhatsApp Cloud API: first 1,000 free.
- OpenAI GPT-4o: avg 10 messages/conv × 500 tokens × $0.0025/1K = ~$12.
- Make: Core plan $9.
- Supabase: free tier covers tens of thousands of conversations.
- Total: ~$22/mo for 1,000 conversations.
Pitfalls
- Session window. 24h after the user's last message you can't send free-form — only approved templates. Plan your follow-ups inside the window.
- OpenAI rate limits. Traffic spikes hit 500 req/min. Make retries automatically, but add a 1s "Sleep" module before GPT.
- Price hallucinations. Always instruct "never quote prices". GPT will make them up; leads show up angry.
- Marketing consent. The user's first message is the consent to reply. Don't cold-message — it violates WhatsApp ToS.
Not keen on building this yourself?
We ship this in 2 weeks, branded and tuned to your industry. Pay once, then only for the API.
Let's talk →