How a WhatsApp chatbot works: rules, AI and what you need to run one

A WhatsApp chatbot is a program that reads incoming messages and replies by rules or by an AI model. There are two things the market mixes up that are worth separating at once: the WhatsApp Business app has only fixed automatic messages (greeting, away), not bots; a real bot needs Meta’s Cloud API (or an unofficial connection, with the risk that brings) and a server where the program runs.

The two types

By rules (menu and flow) With AI (free language)
How it answers It follows a path you drew: “1 for prices, 2 for hours”. It reads free text and writes a reply, from your instructions and documents.
Predictability High. It always says the same thing. Lower. It can get things wrong or invent them (AI hallucinations).
Cost to run The server and the messages, under Meta’s rules. The same, plus the cost of each call to the AI model.
Good for Repeated questions, collecting details, triage. Open questions about your business, with supervision.

Many businesses end up with both: a rule-based menu at the door, which settles the simple things and collects details (name, e-mail, what they want), and a person at the end, for what the bot does not understand.

What you need to get one running

1 An official channel. Meta’s Cloud API, with a developer account, a number, approved templates and the 24-hour window (the Cloud API: getting started with Meta; templates and the 24-hour window). Baileys, by QR code, is not official: the risk and the rules.
2 A place for the bot to live. A server with HTTPS that receives Meta’s webhooks: webhooks from Meta. Usually a VPS, where you install whatever you like.
3 A flow tool. It can be n8n (an n8n flow with WhatsApp), Typebot (conversation flows with Typebot) or your own code.
4 A way out to a person. The bot must know how to hand the conversation to someone (handing over to a person). A shared inbox helps: Chatwoot.

How to design a good conversation

Say at once that it is an automated assistant and what it can do. Ask one question at a time, with buttons or lists rather than free text whenever you can. Always give a way out (“type 0 to talk to a person”). And never trap the customer in a loop: if the bot has not understood twice, hand over to a person.

A bot does not replace consent. Being able to answer whoever writes to you is not being able to write to people who never asked. Messages you start require approved templates, and people must have agreed: consent for WhatsApp messages.
On a VPS, the software is yours. Installing, updating and securing the bot and its tools is down to you: Interweb support does not install or repair third-party programs (how far our support goes). See managed or unmanaged VPS before you choose.
Start small. A bot that answers three questions well and hands the rest to a person serves more customers than one that promises everything and fails half. Count the conversations that end in “talk to a person”: they are what the bot is missing.

Need a server for the bot and the webhooks? Have a look at the VPS plans.

See VPS servers

SEE ALSO

The WhatsApp Cloud API: advantages, disadvantages and who it is for

Evolution API and n8n: a working flow

Typebot: conversation flows on your own server

Chatwoot: a shared inbox on your own VPS

  • 0 Users Found This Useful
Was this answer helpful?