Guide

How to add an AI chatbot to your WhatsApp number

You can run a WhatsApp AI chatbot on the number you already have. Pair it like WhatsApp Web, give the AI your facts, and check its replies before they go out.

An AI that answers from a page of facts you wrote, on the number you already use.
An AI that answers from a page of facts you wrote, on the number you already use.
The short version

You can put an AI chatbot on a normal WhatsApp number in minutes by pairing it as a linked device, with no Meta approval. That route is not Meta's official API, so WhatsApp can restrict a number that spams. Let the bot answer only people who write to you, give it a page of facts about your business, and approve its replies at first.

Two routes to a WhatsApp AI chatbot

There are two ways to connect software to WhatsApp, and the choice decides how long setup takes and what you pay.

Meta's official APILinked device
SetupA Meta business account and Meta's onboarding, done yourself or through a provider.Scan a QR code or enter a pairing code, the way you open WhatsApp Web. The app on your phone keeps working.
Messages you startApproved templates only.Any message. No templates.
CostMeta charges per message, by country and type. Chatbot platforms add a monthly fee.A flat monthly fee, or free at low volume. No per-message fee.
StandingOfficial. Built for large support teams and marketing to opted-in lists.Not official. WhatsApp can restrict a number that behaves like spam.

This guide covers the second route, because it is the one that needs no Meta approval. The trade-offs are set out in full in our comparison of the official API and linked devices.

What Meta's AI rule allows

Meta's terms for the WhatsApp Business Platform have a section on AI providers. It bans companies that build AI models and assistants from using the official API to offer that AI when the AI is the main thing on offer. Meta decides which services that covers.

Kind of botUnder Meta's rule
A general assistant anyone can chat with, such as a public AI model offered over WhatsAppThis is what the rule bans on the official API.
A shop's bot that answers questions about its own orders, prices and bookingsThe AI here supports the business. It is not the product. The rule is not aimed at it, though the judgment is Meta's.

That rule sits in the terms for the official API. A linked device falls under WhatsApp's ordinary terms instead, and WhatsApp's help page says unofficial apps can get an account banned. On either route the safe design is the same: a bot that answers your own customers about your own business.

Three ways to build it

Three paths to the same phone: a single switch, a chain of linked blocks, and a set of loose parts with a wrench

All three use a linked device. They differ in how much you set up and run yourself.

WaySkill neededYou runFits
1. Built in. AI replies in ChatRail's dashboardNoneNothingOwners who want it working today
2. n8n. A workflow between ChatRail and an AI modelNo code, some setupn8n and a model keyTeams that already automate with n8n
3. Your own code. A webhook, a model call and a sendA developerA server, a model key and your own safety checksProducts that need full control

1. Built in, with no code

  1. Pair your number. Create a free account, open Connections and scan the QR code with WhatsApp on your phone.
  2. Add your business info. In the number's AI replies panel, choose Add business info. Give it your website, a PDF, a Word file or your own notes, and ChatRail drafts a facts page. Read it, fix the lines marked CHECK: and save it.
  3. Switch on AI replies. Draft mode is the default: the AI proposes each reply and a person sends it.
  4. Go automatic when the drafts are right. It is one setting, and you can switch it back.

The AI answers from the facts page you saved, so a price you change there is the price customers get. When the page does not cover a question, the default instruction has the AI say it will pass the question to your team.

If your own system sends order or booking updates, attach the order's data to each message. A customer's follow-up question is then answered from that order. How AI replies work has the detail.

2. With n8n

Use a Webhook node to receive ChatRail's message.received event, an AI node with your facts in its instructions, and an HTTP Request node to send the answer. You bring the model key and keep n8n running. Our n8n guide and the step-by-step tutorial cover the send and reply workflows.

3. With your own code

The loop is small: receive the message, ask a model, send the reply. This sketch is Node.js. verified and answerFromFacts are yours to write.

bot.js
app.post("/webhooks/chatrail", async (req, res) => {
  if (!verified(req)) return res.status(401).end(); // check the signature first
  res.status(200).end(); // acknowledge fast, then work

  const event = req.body;
  if (event.type !== "message.received" || event.data.kind !== "text") return;

  const answer = await answerFromFacts(event.data.body); // your model call
  if (!answer) return; // not covered: leave it for a person

  await fetch("https://www.chatrail.dev/v1/messages/text", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.CHATRAIL_KEY}`,
      "Content-Type": "application/json",
      "Idempotency-Key": `reply-${event.id}`,
    },
    body: JSON.stringify({
      connection: event.data.connection,
      to: event.data.from.phone,
      body: answer,
    }),
  });
});

The parts that take the time are around the loop: the facts the model may use, memory of the chat, a person taking over, and a stop when something loops. The signature guide and quickstart cover the two ChatRail calls.

What it costs

Prices were read on 1 December 2026. Model costs for your own key are extra.

SetupMonthly priceAI replies
ChatRail Sandbox$050 a month included
ChatRail Core + AI$2910,000 a month included, with no model key
n8n or your own code on ChatRail Core$15, plus n8n or a serverYou pay your model provider
An official-API platform, for example WATIFrom $39 a month billed annually, plus Meta's fees for template messages2,000 AI credits a month on that plan

On the official route, Meta also prices messages by country and type. Our WhatsApp API pricing guide has the rates.

Keep the number safe

A chatbot does not get a number banned. Behaviour does. These habits matter more than which tool you pick.

HabitWhy
Only answer people who wrote to you firstMessages nobody asked for get reported, and reports get numbers restricted.
Start with replies you approveYou see what the AI would say before a customer does.
Let it say "I'll pass this to the team"A wrong price costs more than a slow answer.
Keep the facts page currentThe AI repeats what the page says.
Cap messages per personA bug should not send one customer fifty replies. ChatRail refuses the 11th message to the same person within 5 minutes.

In ChatRail, when someone on your team answers a chat by hand, automatic replies pause in that chat, for a day by default. More on limiting what an AI can read is in our AI privacy checklist, and on bans in how to avoid a WhatsApp ban.

When to use Meta's official API instead

  • You send marketing to opted-in lists, or need message templates.
  • You want Meta's verified business badge.
  • A large support team needs a shared inbox with routing and reports.
  • Your compliance rules require an official integration.

Our comparison of WhatsApp APIs covers the official options, including Twilio and WATI.

Who wrote this, and what we checked

ChatRail sells a linked-device WhatsApp API with AI replies, so we have a stake in this guide. Meta's rule is from its platform terms, last modified 23 September 2026. WhatsApp's help page and WATI's pricing page were opened on 1 December 2026, and ChatRail's limits were read from our code the same day. Terms and prices change, so check the source before you decide.

Related reading

How AI replies work →Draft and automatic modes, what reaches the model, and what never does.Official API or linked devices →Cost, rules, setup and risk, side by side, with sources.AI privacy checklist →Give an AI one event's data, not the whole inbox.Avoid a WhatsApp ban →What gets a number restricted, and how to stay clear of it.
BUILD IT

Try it on your own number.

The free Sandbox includes one number, 500 messages and 50 AI replies a month, with no Meta approval and no card.

Start free