---
title: "How to build a WhatsApp chatbot step by step"
description: "Four ways to build a WhatsApp chatbot, what each one costs, the step-by-step to set it up and when it makes sense to move to an AI agent connected to your systems."
url: https://studiochat.io/blog/como-crear-un-chatbot-en-whatsapp
locale: en
translations: { es: https://studiochat.io/es/blog/como-crear-un-chatbot-en-whatsapp.md, pt: https://studiochat.io/pt/blog/como-crear-un-chatbot-en-whatsapp.md }
site: https://studiochat.io
---

[ Back to blog](/blog)

Building a WhatsApp chatbot can be done in an afternoon if all you need is to answer business hours and frequently asked questions, and it takes weeks if the chatbot has to query systems and resolve requests. Almost all the work is in deciding what it has to do, not in the technical side. This guide walks through the ways to build one, the step-by-step, what it costs and the point where a chatbot stops being enough.

## [What do you need to build a WhatsApp chatbot?](#what-do-you-need-to-build-a-whatsapp-chatbot)

Four things, which are worth having clear before you pick a tool:

* **A phone number for the chatbot.** It can be the one you already use or a new one. If you use your usual number and want to keep replying from your phone, there's a feature called coexistence that allows it: the details are in the [post about moving from the app to the API](/blog/whatsapp-business-app-o-api).
* **A WhatsApp Business account.** For a chatbot that answers on its own, you need to connect it through the official channel, the WhatsApp Business API. Connections that hang off a regular WhatsApp are the ones that end with the number blocked.
* **A Meta Business portfolio**, which is where the account lives and from where the connection is authorized.
* **A list of what the chatbot has to know.** It's the most important piece and the one most often underestimated.

## [What ways are there to build a WhatsApp chatbot?](#what-ways-are-there-to-build-a-whatsapp-chatbot)

Four, from the simplest to the most complete. None is better in general: each one fits a different kind of need.

**1\. The automatic replies in the WhatsApp Business app.** The app includes basic tools: a welcome message, an away message outside business hours and quick replies you insert with a shortcut. It isn't a chatbot in the strict sense, because it doesn't converse or decide, but for a small business it covers the essentials: greeting, sharing business hours and not leaving the customer without an answer. It costs nothing.

**2\. A no-code platform on top of the API.** You sign up for a service that connects to your WhatsApp Business account and offers a visual editor to build the path: menus, questions, answers, handoff to a person. It's the most common way to start. It works when the inquiries are predictable and the team wants to build and maintain the chatbot on its own.

**3\. In-house development on Meta's Cloud API.** A technical team codes the chatbot: the Cloud API delivers incoming messages through webhooks and replies are sent with calls to the same API. It gives you full control and requires development and maintenance time: checking that webhooks work, handling templates, controlling errors and updating the code when Meta changes something.

**4\. A custom AI agent.** It's no longer a path laid out in advance: the agent interprets what the customer writes, queries your systems and carries out actions. A provider builds it together with your team. It makes sense when inquiries depend on account data or require actions, and it's the road most people end up on after trying the others.

## [How do you build a chatbot step by step?](#how-do-you-build-a-chatbot-step-by-step)

The steps are the same for ways 2 and 3, and a simplified version works for way 1.

**Step 1\. Define the scope.** One sentence: "This chatbot answers X and Y and hands off Z." A chatbot that tries to cover everything fails at everything. Start with the ten most frequent questions in your operation. If you haven't written them down, your team's last hundred conversations are the best source.

**Step 2\. Write the answers the way your best person would.** Tone and level of detail matter more than technology. A short, concrete answer with a clear next step works better than a long paragraph.

**Step 3\. Design the conversation with messages in mind.** Since October 2026, Meta charges for service messages after the first 1,000 per number per month. Every extra message counts. Group information into a single message when you can, and if you need several details from the customer, a form inside the chat (what Meta calls a Flow) saves you from asking one at a time.

**Step 4\. Define the handoff to a person.** Decide when the chatbot passes the conversation on (if the customer asks, if it fails to understand twice in a row, if the topic is sensitive) and what the person receives: a summary of what was discussed, not the entire conversation to reread.

**Step 5\. Prepare the templates.** Outside the 24-hour window that opens when the customer writes, you can only send templates approved by Meta. If the chatbot is going to do follow-ups or reminders, you need templates ready. There's a guide in the [post about templates and the 24-hour window](/blog/ventana-de-24-horas-whatsapp-plantillas).

**Step 6\. Test it with real cases.** Before opening it to the public, have three or four people on the team try it with real inquiries, including the odd ones. Note where it gets stuck.

**Step 7\. Open it gradually.** A limited schedule or a share of the traffic, with someone reviewing the conversations. Expand when the answers are the ones your team would give.

**Step 8\. Measure it.** Four numbers from the first month: what percentage of conversations it resolves without a person, how many outbound messages it sends per conversation, how many it hands off and why, and how customers rate the service.

## [How much does it cost to build a WhatsApp chatbot?](#how-much-does-it-cost-to-build-a-whatsapp-chatbot)

It depends on the approach, and these items almost always add up:

* **The app's automatic replies:** no cost.
* **A no-code platform:** a monthly subscription that varies by provider and volume. It's worth asking for the total price, with Meta's charges included or separate.
* **In-house development:** the cost is the technical team's time, which also maintains the chatbot over time.
* **A custom agent:** quoted case by case. In StudioChat Ops, the entry plan costs USD 49 per month and includes a WhatsApp line, a connected agent and 200 outbound AI conversations per month, and the managed plan, which integrates your systems, is quoted based on your operation.

On top of that there are always Meta's messages: per delivered message, according to the category and the customer's country, with 1,000 free service messages per number per month. The [post about how much the API costs](/blog/cuanto-cuesta-la-api-de-whatsapp-business) explains the math with a calculator.

## [What mistakes show up when building a chatbot?](#what-mistakes-show-up-when-building-a-chatbot)

* **Trying to cover everything from day one.** A chatbot that knows little and does it well is more convincing than one that knows a lot and fails.
* **Hiding the way out to a person.** A customer who can't talk to someone gets frustrated, and the chatbot ends up costing more than it saves.
* **Not reviewing the conversations.** A chatbot with no review goes out of date: prices change, hours change and nobody fixes it.
* **Forgetting the 24-hour window.** A follow-up at 48 hours always needs a template.
* **Using an unofficial connection.** It works until Meta blocks the number.
* **Not measuring.** Without a baseline there's no way to know whether anything improved.

## [When does a chatbot stop being enough?](#when-does-a-chatbot-stop-being-enough)

When inquiries depend on customer data (the status of an order, a payment, an appointment), when they require an action in another system (changing a record, scheduling, filing a claim) or when the customer says something nobody anticipated. A rule-based chatbot gets stuck or hands off in those cases. An AI agent interprets the request, queries the systems and resolves it, or hands off with the context already put together.

One way to tell which side you're on is to run the [six tests with concrete messages](/blog/chatbot-o-agente-de-ia-seis-pruebas) on the chatbot you built or are evaluating. If it passes four or more, it's an agent with access to data. If it passes one or none, it's a rule-based chatbot, and that's fine if your universe of inquiries is small and stable.

## [How do you connect an AI agent to WhatsApp?](#how-do-you-connect-an-ai-agent-to-whatsapp)

With the same foundation as a chatbot: a WhatsApp Business account connected through the official channel. What changes is what sits on top. In StudioChat Ops, StudioChat's WhatsApp platform, you authorize the account from Meta, use your current number or a new one, and the StudioChat team builds the agent on how your best person already handles conversations, connects it to your systems and defines when the conversation passes to a person. We don't charge for integrations or setup. The step-by-step is in the [guide to getting your account ready and connecting it](/blog/conectar-whatsapp-a-un-agente-de-ia).

## [What happens after launch?](#what-happens-after-launch)

The first month is the one that teaches the most. Every week, review the conversations where the chatbot didn't understand or handed off to a person, because that's where the questions missing from your list are. Add the ones that keep repeating, fix the answers that led to a second inquiry and note how many conversations were closed without help. With those numbers you know whether the chatbot is enough or whether your customers are already asking for things a preset path can't resolve, like checking an order or changing a reservation.

## [How do you know if you're ready to launch?](#how-do-you-know-if-youre-ready-to-launch)

An eight-point check, which takes five minutes to answer. It doesn't decide for you: it tells you what's worth sorting out before opening the chatbot to the public. The tool below organizes it.

Tool for this post

### Is your chatbot ready to launch?

Check what you already have sorted out.

I wrote down the ten most frequent questions and their answers _(+2)_I defined which inquiries go to a person and what that person receives _(+2)_The WhatsApp Business account is connected through the official channel _(+2)_I decided which number to use _(+1)_I designed the conversation to use few outbound messages _(+1)_I have approved templates for follow-ups _(+1)_I tested it with real cases, including the odd ones _(+2)_Someone will review the conversations every week _(+1)_

**0 of 12**

#### Not yet

It's worth sorting out the frequent questions and the handoff to a person first. That alone already avoids the most common mistakes.

This object also has [a page of its own](/is-your-chatbot-ready-to-launch), in case you want to send just that.

Frequently asked questions

### Can you build a WhatsApp chatbot for free?

The automatic replies in the WhatsApp Business app cost nothing and are enough to greet people and share business hours. A chatbot connected through the API adds the cost of the platform and of messages: Meta gives 1,000 free service messages per number per month and charges from message 1,001.

### Do I need to know how to code to build a WhatsApp chatbot?

No. A no-code platform lets you build it with a visual editor, and with a custom agent the provider handles the technical side. Coding is only needed for in-house development on Meta's Cloud API.

### What's the difference between a chatbot and an AI agent on WhatsApp?

A chatbot follows a path laid out in advance. An agent interprets what the customer asks, queries the company's systems and carries out actions, and hands off to a person when it can't resolve the request.

Share [ X](https://x.com/intent/post?text=How%20to%20build%20a%20WhatsApp%20chatbot%20step%20by%20step%2C%20and%20when%20to%20move%20to%20an%20agent&url=https%3A%2F%2Fstudiochat.io%2Fblog%2Fcomo-crear-un-chatbot-en-whatsapp) [ LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fstudiochat.io%2Fblog%2Fcomo-crear-un-chatbot-en-whatsapp) [ WhatsApp](https://wa.me/?text=How%20to%20build%20a%20WhatsApp%20chatbot%20step%20by%20step%2C%20and%20when%20to%20move%20to%20an%20agent%20https%3A%2F%2Fstudiochat.io%2Fblog%2Fcomo-crear-un-chatbot-en-whatsapp)Copy link

Cristian Pereyra

Cristian Pereyra · Co-founder · Engineering, StudioChat

Want agents like these working for your team?

[Talk to us now](https://cal.com/studiochat)
