WhatsApp has more than 2 billion active users and is the dominant communication channel for both personal and business use. It is no surprise that many companies want to use it to serve customers, answer queries or capture leads automatically. The question is not whether to be on WhatsApp, but how to manage it when volume grows.

An EstructuraBit client — JGRenovables, a renovation company — was receiving WhatsApp queries outside office hours and losing leads because nobody responded until the next day. With an n8n flow connected to the WhatsApp Business API, they went to capturing 100% of incoming queries, responding in under a minute at any time of day, and automatically registering each lead in their CRM. In this guide we explain exactly how that type of solution works.

What you need to get started: the WhatsApp Business API

The first point to clarify: WhatsApp chatbots do not work with the standard WhatsApp Business app (the one installed on your phone). To automate messages at scale, you need access to the WhatsApp Business API, which Meta manages through its developer platform.

There are two main ways to access the API:

  • Through a Business Solution Provider (BSP): companies such as 360dialog, Twilio, WATI or MessageBird act as intermediaries. They are easier to configure but add a monthly cost and a layer of dependency.
  • Direct access to the Meta Cloud API: since 2022, Meta allows direct connection without a BSP. It is slightly more technical to configure but eliminates intermediaries and reduces cost.

For most SMEs, we recommend starting with a BSP if the technical team is limited, or with direct Meta Cloud API access if there is capacity to manage it. At EstructuraBit we regularly work with both options depending on the case.

Step by step: technical configuration

1

Create and verify a Meta Business Manager account

Go to business.facebook.com and create an account for your company. You will need to verify your company's domain and provide tax information. The verification process can take between 1 and 5 business days.

2

Set up the WhatsApp application in Meta for Developers

At developers.facebook.com, create a new "Business" type application. Add the "WhatsApp" product to the application. You will receive a test phone number to run your first tests at no cost. For production, you will need to register a real number (which cannot already be using regular WhatsApp).

3

Obtain the access token and configure the webhook

Generate a permanent access token for your application. Then configure the webhook: it is the URL of your n8n server that will receive incoming messages. Meta will send an initial verification (a challenge) to that URL, and n8n must respond to it correctly to activate the webhook.

4

Create the flow in n8n with the Webhook node

In n8n, create a new workflow. The initial node will be a Webhook with the POST method. Configure the webhook URL in Meta. When a WhatsApp message arrives, n8n will receive it as an HTTP POST request with the message content in JSON format.

5

Process the incoming message

The WhatsApp payload has a specific structure. You need to extract the message text, the sender's phone number and the timestamp. Use a code node (JavaScript) or n8n transformation nodes to parse this JSON and extract the relevant data.

6

Apply the response logic

This is where you define the bot's behaviour. You can use condition nodes (Switch or If) to detect keywords and return predefined responses, or connect with an AI model (Claude, GPT) for dynamic responses. You can also query databases, register the contact in a CRM or escalate to a human agent depending on the situation.

7

Send the response via the WhatsApp API

Use n8n's HTTP Request node to call Meta's API endpoint and send the response message. The URL is https://graph.facebook.com/v18.0/{phone_number_id}/messages. Include the authentication token in the header and the message body in JSON format.

Basic flow structure in n8n

A minimum functional flow has this sequence of nodes:

  1. Webhook (trigger): receives the POST from Meta with the incoming message.
  2. Code or Set: extracts phone number, message text and metadata.
  3. If / Switch: evaluates message content and decides the route.
  4. HTTP Request: sends the response through Meta's API.

For AI-powered cases, an API call node to Claude or GPT is added between the Switch node and the HTTP Request, generating a natural language response. For CRM cases, search/create contact nodes for HubSpot, Salesforce or whatever tool your company uses are added.

Want a WhatsApp chatbot for your business?

We implement the complete flow: WhatsApp API, n8n, response logic and CRM connection. Without your team having to manage anything technical.

Request a quote →

When to use rule-based vs. AI responses

This is one of the most important decisions when designing the bot and depends on the type of conversations you expect to receive.

Use rule-based flows when:

  • Queries are predictable and repetitive: opening hours, prices, directions, order status.
  • You need to capture structured data: name, phone, type of service.
  • Response speed is critical and you cannot depend on external API calls.
  • You want exact control over the tone and content of each response.

Add AI (Claude/GPT) when:

  • Queries are varied and you cannot predict all possible phrasings.
  • You want the bot to maintain conversation context and respond coherently.
  • You need responses to complex questions about your products or services.
  • The volume of unique queries justifies the cost of model API calls.

The most common and efficient combination is a hybrid flow: rules for the most frequent predictable cases (covering 70–80% of the volume) and AI for the rest. This optimises cost without sacrificing response quality.

Cost breakdown

Component Approximate cost
WhatsApp Business API (Meta): service conversations (initiated by customer) First 1,000/month free, then ~€0.05 per 24h conversation
WhatsApp Business API (Meta): marketing conversations (initiated by company) ~€0.08–0.12 per conversation depending on country
n8n self-hosted (VPS) ~€20–40/month (unlimited executions)
n8n cloud From €20/month with execution limit
Claude API (if AI is used in responses) Variable by volume; for 1,000 short conversations, approx. €2–5/month
BSP intermediary (if used, optional) From €49/month depending on provider and volume

For a company receiving 500 customer messages per month, the total infrastructure cost can be between €25 and €70/month — far below the cost of a person managing those messages manually.

Common mistakes to avoid

Mistake 1: Not handling the webhook verification token correctly. Meta sends a GET request with a hub.challenge parameter when configuring the webhook. If n8n does not return exactly that value as the response, the webhook does not activate. Configure a second path in your n8n flow to handle this verification GET request.

Mistake 2: Not filtering status messages. The WhatsApp API sends delivery and read receipts in addition to text messages. If your flow does not filter these events, it will execute the bot logic every time someone reads a message. Always check that entry[0].changes[0].value.messages exists before processing.

Mistake 3: Forgetting the 24-hour window. The WhatsApp API only allows replying to customer-initiated messages within 24 hours. Outside that window, you can only send pre-approved Meta templates. Design your flow with this in mind.

Mistake 4: No human escalation option. Every chatbot must have a clear exit for cases it cannot handle. A simple "We're connecting you with an agent" followed by a notification to your team via Telegram or email can make the difference between a won and a lost lead.

The JGRenovables case: real results

JGRenovables implemented this type of solution in early 2025. Previously, a potential client sending a WhatsApp message at 9 pm asking about a bathroom renovation would receive no reply until 9 am the next day — by which point they had often already found another company. With the n8n flow, the bot responds in under 60 seconds, collects basic details (type of renovation, square metres, location), registers the lead in the CRM, and sends a notification to the sales rep with all the information. In the morning, the sales rep has the complete data and can call directly to schedule the visit. Response time went from hours to seconds, and the incoming lead conversion rate increased significantly.

Back to blog