How to Build an AI WhatsApp Chatbot for Your Business

March 3, 2026
Architecture diagram showing the custom AI WhatsApp chatbot stack with WhatsApp Business API, BSP, n8n, LLM, and knowledge base connected by message flow arrows.

WhatsApp is where a large share of UK small business customer communication happens. Enquiries, order updates, support questions, booking confirmations — for many businesses, the volume is significant and the manual effort is constant.

This post covers two routes to automating it: SaaS chatbot platforms for businesses that want something running quickly, and a custom AI stack for businesses that need a chatbot that actually understands context, connects to their systems, and handles conversations a rule-based bot cannot. Both routes are covered honestly, with real cost figures for each.


Why WhatsApp Is Worth Automating

WhatsApp has over 2 billion active users and a message open rate that sits consistently above 90 percent. For UK SMBs in sectors with high customer contact volume — trades, hospitality, retail, professional services, healthcare — it is often the primary channel for inbound enquiries.

The problem is that WhatsApp does not scale with a human team. Every message needs someone to read it, decide what it needs, and respond. When volume increases, response times slip, staff time gets consumed, and the customer experience degrades.

Three categories of WhatsApp message are worth automating first. Frequently asked questions — pricing, availability, location, hours — that your team answers identically every time. Triage and routing — identifying what the customer needs and directing them to the right person or next step. Status updates — order confirmations, appointment reminders, follow-ups — that are triggered by events in your other systems.

A well-built chatbot handles all three. A poorly scoped one handles none of them reliably. The difference is usually in the build approach, not the channel.


Two Approaches: Platform Builder vs Custom AI Stack

There are two fundamentally different ways to build a WhatsApp chatbot. The right choice depends on how complex your conversations are, how much control you need, and what your budget is.

Platform builders — tools like ManyChat, Botpress, and Tidio — give you a visual interface to design conversation flows. You map out the likely paths a conversation will take and define the responses for each. Setup is fast, no coding required, and costs are predictable. The ceiling is also fixed. These tools handle scripted conversations well and fall over the moment a customer says something outside the defined flow.

A custom AI stack uses a language model — Claude or GPT-4o — as the intelligence layer, with n8n handling the orchestration and the WhatsApp Business API as the channel. The chatbot reads the customer’s message, understands the intent in natural language, queries your systems if needed, and generates a contextually appropriate response. It handles variation, ambiguity, and multi-turn conversations that platform builders cannot.

Where no-code platforms hit their ceiling on real business chatbot requirements covers the specific points where platform tools break down on production requirements. The short version: if your customers ask questions that do not follow a predictable pattern, or if your chatbot needs to retrieve information from your own systems to answer, a platform builder will frustrate both you and your customers.


The Custom Build Architecture (n8n + WhatsApp API + LLM)

The custom stack has four components. Understanding how they connect is the foundation for building one that works reliably.

The WhatsApp Business API is the channel layer. It is Meta’s official API for programmatic WhatsApp messaging — the only compliant route for businesses sending and receiving messages at scale. You access it through an approved Business Solution Provider (BSP) such as 360dialog or Twilio, which handles the connection between the API and your infrastructure.

n8n is the orchestration layer. When a message arrives via the WhatsApp API, it triggers a webhook in n8n. n8n manages the workflow: retrieving conversation history, querying your knowledge base or CRM if needed, calling the language model API, and sending the response back via WhatsApp. It is the connective tissue that links the channel to the intelligence.

The language model is the intelligence layer. Claude and GPT-4o are both strong choices for customer-facing chatbots. How Claude performs as the intelligence layer in a customer-facing chatbot covers the practical differences in tone, instruction-following, and context handling. For most customer support use cases, Claude’s tendency to stay on-task and follow system prompt instructions precisely makes it the more predictable choice in production.

The knowledge base is the context layer. The chatbot needs to know about your business — your products, prices, policies, FAQs, and procedures. This can be a simple document store that n8n queries, or a more sophisticated retrieval system for larger document sets. How to connect a knowledge base to your chatbot without overbuilding the retrieval layer covers the architecture options and when each is appropriate.

For how we scope and build custom AI chatbot projects for UK businesses — including what a realistic project looks like end to end — that covers the full picture.


Step-by-Step: Setting Up the WhatsApp Business API

Access to the WhatsApp Business API requires a Meta Business account and approval from Meta. The process takes two to five working days if your documentation is in order.

Step 1: Create a Meta Business Account. Go to business.facebook.com and set up a verified business account. You need a business name, website, and business email. Personal accounts are not eligible.

Step 2: Choose a Business Solution Provider. You need a BSP to access the API. 360dialog is the most cost-effective option for small businesses — their base plan starts at approximately 49 euros per month and gives you API access with reasonable throughput limits. Twilio is more expensive but offers more flexibility for complex integrations. Both are Meta-approved.

Step 3: Register your phone number. The number you use for the WhatsApp Business API cannot be an active WhatsApp account. Use a dedicated number — a new SIM or a VoIP number works. The BSP handles the registration and verification process.

Step 4: Configure your webhook. Your BSP will give you a webhook URL configuration panel. This is where you point incoming WhatsApp messages to your n8n instance. You need an n8n instance with a publicly accessible URL — either self-hosted on a VPS or using n8n’s cloud service.

Step 5: Test message sending and receiving. Send a test message to your registered number and confirm it arrives at your n8n webhook. Send a reply from n8n and confirm it delivers to WhatsApp. This end-to-end test before building the AI logic saves significant debugging time later.

One important note on Meta’s messaging policy: the WhatsApp Business API distinguishes between user-initiated conversations and business-initiated conversations. User-initiated conversations have no per-message charge within a 24-hour window. Business-initiated conversations use approved message templates and are charged per conversation.


Step-by-Step: Building the AI Logic in n8n

With the WhatsApp API connected, the n8n workflow handles everything from receiving a message to sending the AI-generated response.

Step 1: Receive and parse the incoming message. Your n8n webhook trigger receives the raw payload from WhatsApp. Parse it to extract the message text, the sender’s phone number, and the message ID. The phone number is your session identifier — you need it to retrieve conversation history and to send the response back to the right contact.

Step 2: Retrieve conversation history. A chatbot that cannot remember what was said earlier in the conversation will frustrate users. Store conversation history in a simple database — n8n’s built-in data store works for low volume, or use Airtable or a PostgreSQL instance for production. On each new message, retrieve the last five to ten exchanges for the current phone number and include them in the language model call.

Step 3: Query your knowledge base. Before calling the language model, retrieve the relevant context from your knowledge base. For a simple FAQ store, a keyword match against a document is sufficient. For a larger document set, use a basic semantic search. Pass the retrieved context to the language model as part of the system prompt.

Step 4: Call the language model API. Structure your API call with three components: a system prompt that defines the chatbot’s role, tone, and constraints; the retrieved knowledge base context; and the conversation history followed by the new message. For how to choose the right LLM for your chatbot based on use case and budget, the key variables are response quality, instruction-following reliability, and cost per token at your expected message volume.

A well-structured system prompt for a customer-facing chatbot includes: the business name and what it does, the chatbot’s name and persona, explicit instructions on what topics are in and out of scope, how to handle requests it cannot answer, and the tone to use. Spend time on this prompt — it determines 80 percent of how the chatbot behaves.

Step 5: Send the response via WhatsApp. Take the language model’s output, clean it if needed (remove any markdown formatting that does not render in WhatsApp), and send it back via your BSP’s API. Log the exchange to your conversation history store.

Step 6: Add a human handoff trigger. Define the conditions under which the chatbot should stop responding and alert a human. Common triggers: the customer explicitly asks to speak to a person, the chatbot has failed to resolve the query after three exchanges, or the message contains specific keywords such as complaint, urgent, or cancel. Route these to a Slack notification or email alert with the full conversation thread.


What the Chatbot Can and Cannot Handle

Setting accurate expectations before deployment prevents the most common failure mode: a chatbot that overpromises and underdelivers, damaging customer trust in the channel.

A well-built AI WhatsApp chatbot handles these reliably: answering questions about your products, services, pricing, and policies from your knowledge base; booking and appointment queries when integrated with a calendar system; order status updates when integrated with your order management system; lead qualification through structured conversation; and out-of-hours responses that capture enquiries for human follow-up.

It does not handle these well without significant additional work: complex complaints requiring empathy and judgement; queries involving sensitive personal data where a human must be accountable; negotiations or disputes requiring authority to make decisions; and conversations requiring knowledge outside your defined knowledge base.

When a chatbot is the right tool and when you need a full AI agent instead covers the boundary in detail. The practical rule: if the task requires the system to take actions in external systems — update a record, process a refund, make a booking — you are moving from chatbot territory into agent territory, which is a different architecture and a different cost profile.

The difference between a chatbot and a full AI agent and when each is the right call is worth reading before you scope your build — many businesses that think they need an agent actually need a well-built chatbot, and vice versa.


Cost Breakdown: Platform vs Custom Build

The cost difference between a platform builder and a custom AI stack is significant at the build stage and narrows over time as usage scales.

Cost ComponentPlatform BuilderCustom AI Stack
Build cost£0 to £500 (setup only)£3,000 to £8,000
Monthly platform fee£30 to £200£10 to £50 (n8n + hosting)
WhatsApp BSP fee£49 to £150/month£49 to £150/month
AI API cost per 1,000 messagesIncluded or £5 to £20£8 to £40
Customisation flexibilityLowHigh
Knowledge base integrationLimitedFull
Multi-system integrationLimitedFull
Typical payback period1 to 3 months4 to 10 months

For most SMBs handling under 500 WhatsApp conversations per month, the AI API cost for a custom build is £15 to £60 per month depending on average message length and model choice. At 2,000 conversations per month, this rises to £60 to £200. These figures assume Claude Haiku or GPT-4o Mini as the primary model, with escalation to a more capable model only for complex queries.

How WhatsApp chatbot costs sit within the wider picture of AI automation pricing for small businesses gives the broader context for budgeting an automation project at this level.

The decision framework is straightforward. Choose a platform builder if your conversations follow predictable patterns, you need something live within a week, and you do not need integration with your own systems. Choose a custom AI stack if your customers ask unpredictable questions, you need to retrieve information from your own data, or you want a chatbot that handles conversations the way a knowledgeable team member would.


Do I need a separate phone number for the WhatsApp Business API?

Yes. The number you register with the WhatsApp Business API cannot be an active personal or WhatsApp Business app account. You need a dedicated number — a new SIM, a VoIP number, or a number ported from an existing landline. The number does not need to receive SMS or calls, it just needs to be verifiable via a code at registration time. Many businesses use a virtual UK number from a provider like Vonage or Twilio for this purpose.

What happens to existing WhatsApp conversations when I switch to the API?

Switching a number to the WhatsApp Business API removes it from the WhatsApp app entirely. You will no longer be able to send or receive messages through the app on that number — everything goes through the API and your n8n workflow. For most businesses, this means using a new dedicated number for the automated chatbot while retaining a separate number for human-managed conversations during the transition period.

Can the chatbot handle voice messages?

Not natively with a basic build. WhatsApp voice messages arrive as audio files via the API. Handling them requires an additional transcription step — sending the audio to a speech-to-text service like OpenAI Whisper before passing the text to the language model. This adds latency and cost but is achievable. For businesses where voice messages are common, it is worth including in the initial build scope rather than adding later.

How do I keep the chatbot’s knowledge base up to date?

Build your knowledge base as a document you can edit rather than hardcoding information into the system prompt. A Google Doc, a Notion page, or a simple text file that n8n reads at query time means you can update product information, prices, or policies without touching the workflow. For larger knowledge bases, a more structured retrieval system is appropriate — but for most SMBs, a well-organised document works reliably up to around 20,000 words of content.

Is a WhatsApp chatbot compliant with UK GDPR?

Using the WhatsApp Business API involves processing personal data (phone numbers and message content) through Meta’s infrastructure, which has its own data processing terms. Under UK GDPR, you need a lawful basis for processing — typically legitimate interests or contract performance for customer support conversations. You should update your privacy policy to disclose WhatsApp data processing, ensure conversation logs are retained only as long as necessary, and confirm your BSP’s data processing agreement covers UK GDPR requirements. This is not legal advice — consult a qualified solicitor if you are processing sensitive data categories.

How long does it take to build and deploy a custom AI WhatsApp chatbot?

A focused chatbot handling one primary use case — customer support FAQ, lead qualification, or appointment booking — takes two to four weeks to build and deploy to production, including API setup, n8n workflow build, knowledge base preparation, testing, and refinement. The timeline extends if you need multiple system integrations or if your knowledge base requires significant preparation work. Allow one to two additional weeks for calibration after go-live, where you review conversations and refine the system prompt based on real usage.

Discover more from Innovate 24-7

Subscribe now to keep reading and get access to the full archive.

Continue reading