Updated on October 29, 2026
To integrate a CRM with the official WhatsApp Business API, you connect two systems through events: the WhatsApp webhook tells the CRM when a customer writes (to create a lead or log the conversation), and the CRM webhook tells your integration when a deal changes stage (to send a template). Pipedrive, RD Station and Kommo each offer some native WhatsApp option, but each covers a different part; the rest you build with the CRM’s API, with n8n/Make or with your own code.
The three integration patterns
Almost every WhatsApp–CRM integration is a mix of these three flows:
| Pattern | Trigger | CRM action | WhatsApp action |
|---|---|---|---|
| Log the conversation | Meta messages webhook | Create a note or activity on the contact/deal | None |
| Create a lead from the webhook | First message from an unknown number | Create person and lead/deal in the pipeline | Optional: automatic reply inside the window |
| Template on stage change | CRM webhook (deal updated) | None (or a “sent” note) | Send an approved template |
1. Log the message as an activity
Each incoming message arrives in the webhook with the phone number (from), the BSUID (from_user_id), the type and the content. Your integration looks up the contact in the CRM and saves the text as a note or activity. Status events (sent, delivered, read, failed) show whether the customer saw the proposal.
Two things to watch:
- Idempotency. Meta may deliver the same webhook more than once. Store the message
id(wamid...) and skip repeats, or the CRM fills up with duplicate notes. - Volume. Logging every “ok” as an activity clutters the timeline; grouping the day’s conversation into one note solves it.
2. Create a lead from the webhook
When a message arrives from a number that is not in the CRM, the integration creates the person and a lead or deal in the first pipeline stage, tagging the source (for example “WhatsApp”, or the Click-to-WhatsApp ad when the webhook includes the referral object). From there, a sales rep takes over or a bot asks the first questions. If you want AI to qualify leads before handing them to sales, see the AI SDR on WhatsApp flow.
3. Send a template on stage change
The CRM fires a webhook when a deal moves to a new stage (“Proposal sent”, “Won”, “Payment pending”). Your integration reads the new stage, picks a template and sends it. The template category matters here, because it sets both the price and the approval. According to Meta’s template categorization docs, utility messages are non-promotional and specific to, or requested by, the user; a template that mixes utility with promotion is marketing.
| CRM stage | Example message | Likely category |
|---|---|---|
| Proposal sent | “Your proposal #{{1}} is available at this link” | Utility |
| Payment pending | “The invoice for proposal #{{1}} is due on {{2}}” | Utility |
| Won | “Contract signed. Your access will be enabled on {{1}}” | Utility |
| Lost | “How about picking this up again with 10% off?” | Marketing |
Rates depend on the recipient’s country. For recipients in Brazil, since October 1, 2026, marketing costs BRL 0.3217 per delivered message and utility costs BRL 0.0350. Our article on template categories explains how Meta decides. Before sending any template, check that the contact has a recorded opt-in for that category in the CRM.
Phone number as key, and the BSUID
The phone number is the most common key for finding a contact in the CRM, with two weak spots:
- Format. WhatsApp sends the number as digits only, with the country code (
5511999999999). In the CRM, the same number may be stored as(11) 99999-9999or, for Brazilian mobiles, without the extra leading 9. Normalize before searching. - Usernames. When a customer turns on a WhatsApp username, the phone number may stop showing up in the webhook, and the guaranteed identifier becomes the BSUID (business-scoped user ID). Our article on usernames and BSUID explains when this happens.
In practice: create a custom field for the BSUID in the CRM, save phone and BSUID whenever they arrive together and, when a message comes in, search by BSUID first and by phone second.
Want to try it while you read? Create a Vectalk account and send your first message through the official API. Create free account →
What each CRM offers natively
Before writing code, check what the CRM already does. The scopes are quite different.
Pipedrive
Pipedrive’s WhatsApp integration connects a number to the Sales Inbox and shows conversations in a WhatsApp tab on deals, people, leads and projects. According to its help center:
- new messages are automatically linked to the person with the same phone number; if two contacts share the number, the conversation stays unlinked until someone links it manually;
- Meta-approved templates are used to start a conversation and to resume it after the 24-hour window; supported templates have a text body and an optional text header, without media, footers or buttons;
- history starts at connection: earlier messages are not imported;
- Meta charges per delivered message, by category and country;
- it is available on the Growth plan and above, in beta, and the article mentions numbers set up for coexistence.
For automations (templates per stage, lead creation with your own rules), use the Pipedrive API. It offers webhooks v2 by object and action (deal + change, for example), with a payload split into meta, data and previous; previous only contains the fields that changed, which makes stage changes easy to detect.
RD Station
RD Station is a Brazilian marketing and sales platform. In RD Station CRM, the WhatsApp Web integration adds a WhatsApp icon to deal contacts that have a mobile number in the Phone field: it is a shortcut to chat through WhatsApp Web, not an API integration. The official API channel lives in RD Station Conversas, which the product page describes as natively integrated with RD Station CRM and RD Station Marketing, with the conversation history saved and sent to the CRM.
If you use a different connection to the official API and want to plug it into RD Station CRM, the RD Station developer docs cover the CRM API, with endpoints for deals, contacts, tasks and webhooks. Check the event names and payload format in the reference before building the flow.
Kommo
Kommo has a native WhatsApp Cloud API integration, installed from Settings > Integrations, with conversations in the inbox alongside other channels. According to its help article on templates:
- you need a payment method on your WhatsApp Business account in Meta;
- templates are created in Kommo, submitted to Meta and can only be sent once approved;
- sending a template manually from a chat works on any plan; sending through Salesbot or Broadcasting requires the Advanced, Pro or Enterprise plan.
For custom integrations, Kommo webhooks cover events such as lead added, stage changed and incoming message, and expect a response within 2 seconds. Managing webhooks through the API requires the Advanced, Pro or Enterprise plan. To make an external WhatsApp provider show up as a channel inside Kommo, there is the Chats API, which requires registering the channel with Kommo support.
Summary
| Pipedrive | RD Station | Kommo | |
|---|---|---|---|
| Native WhatsApp | Sales Inbox integration (beta, Growth plan and up) | Through RD Station Conversas; in the CRM, a WhatsApp Web shortcut | Cloud API integration |
| Templates in the CRM | Text only | In Conversas | Yes; Salesbot automation on Advanced and up |
| Webhooks for custom integrations | Webhooks v2 | CRM API with webhooks | General and Digital Pipeline webhooks |
Native, n8n/Make or your own code?
- Native CRM integration: your team works inside the CRM and the number can live only in that integration. It is the fastest route, with each tool’s limits (text-only templates in Pipedrive, minimum plan in Kommo).
- n8n or Make: you already receive WhatsApp webhooks in another tool (a bot, a help desk) and only want to mirror them in the CRM or send templates per stage. Our guides on n8n with the WhatsApp Business API and Make and Zapier show the setup.
- Your own code: a SaaS serving many customers, BSUID deduplication, opt-in per category or high volume. A small service between the two webhooks pays off.
If the number is also in the WhatsApp Business app (coexistence), see what happens to messages sent from the phone in coexistence with a CRM.
Example: WhatsApp and Pipedrive in Node.js
The code below implements patterns 1 and 3. When a message arrives, it searches Pipedrive for the person by phone (GET /api/v2/persons/search with fields=phone), creates the person if missing (POST /api/v2/persons) and saves the message as a note (POST /api/v1/notes). When the deal-updated webhook arrives, it compares previous.stage_id with data.stage_id and sends a template.
import express from "express";
const app = express();
app.use(express.json());
const PD = `https://${process.env.PD_DOMAIN}.pipedrive.com`;
const pdHeaders = { "x-api-token": process.env.PD_TOKEN, "Content-Type": "application/json" };
const PROPOSAL_STAGE = 3; // stage_id of the "Proposal sent" stage
const seen = new Set(); // use a database or Redis in production
async function pd(path, opts = {}) {
const r = await fetch(PD + path, { ...opts, headers: pdHeaders });
return r.json();
}
// 1) WhatsApp -> CRM
app.post("/webhook/whatsapp", async (req, res) => {
res.sendStatus(200);
const value = req.body.entry?.[0]?.changes?.[0]?.value;
const msg = value?.messages?.[0];
if (!msg || seen.has(msg.id)) return;
seen.add(msg.id);
const phone = msg.from; // may be missing if the customer uses a username
if (!phone) return; // resolve by BSUID (msg.from_user_id) in your database
const name = value.contacts?.[0]?.profile?.name ?? phone;
const search = await pd(`/api/v2/persons/search?term=${phone}&fields=phone&exact_match=true`);
let personId = search.data?.items?.[0]?.item?.id;
if (!personId) {
const created = await pd("/api/v2/persons", {
method: "POST",
body: JSON.stringify({ name, phones: [{ value: phone, primary: true, label: "mobile" }] }),
});
personId = created.data.id;
}
const text = msg.type === "text" ? msg.text.body : `[${msg.type}]`;
await pd("/api/v1/notes", {
method: "POST",
body: JSON.stringify({ person_id: personId, content: `<b>WhatsApp received:</b> ${text}` }),
});
});
// 3) CRM -> WhatsApp
app.post("/webhook/pipedrive", async (req, res) => {
res.sendStatus(200);
const { meta, data, previous } = req.body;
if (meta?.entity !== "deal" || meta?.action !== "change") return;
if (!previous?.stage_id || data.stage_id !== PROPOSAL_STAGE) return;
const person = await pd(`/api/v2/persons/${data.person_id}`);
const phone = person.data?.phones?.find((p) => p.primary)?.value?.replace(/\D/g, "");
if (!phone) return;
await fetch("https://apis.vectalk.com.br/api/messages", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.VECTALK_TOKEN}`, "Content-Type": "application/json" },
body: JSON.stringify({
messaging_product: "whatsapp",
to: phone,
type: "template",
template: {
name: "proposal_sent",
language: { code: "en_US" },
components: [{ type: "body", parameters: [{ type: "text", text: String(data.id) }] }],
},
}),
});
});
app.listen(3000);
The example leaves out webhook signature validation, the opt-in check and a retry queue. Since Pipedrive treats any non-2XX response, or one slower than 10 seconds, as a failure (and retries 3 times), the code replies 200 before processing.
How to do it with Vectalk
Vectalk is a proxy for the official WhatsApp API: the send call in the example above uses POST https://apis.vectalk.com.br/api/messages with the same JSON as the Cloud API, and the webhooks you register with POST /api/webhooks receive Meta’s payload unchanged, BSUID fields included. Vectalk has no inbox or CRM of its own: it provides the API connection, and your team works in your CRM or whatever tool you plug in. Each delivered message is deducted from a prepaid balance, with no card registered at Meta. See the webhooks documentation and sign up at apps.vectalk.com.br/register.
Frequently asked questions
Do I need a CRM with native WhatsApp to integrate?
No. Any CRM with an API and webhooks can be connected with your own code or with n8n/Make. A native integration saves work when your team handles conversations inside the CRM.
Can I send a free-form message when a deal changes stage?
Only if the customer wrote in the last 24 hours. Outside the customer service window, the API only accepts approved templates, and the category (utility or marketing) sets the price.
How do I avoid duplicate contacts in the CRM?
Normalize the phone to WhatsApp’s format (digits only, with country code) before searching, store the BSUID in its own field and skip webhooks whose message id you already processed.
Official sources checked on October 29, 2026: Template categorization (Meta), Business-scoped user IDs (Meta), WhatsApp integration (Pipedrive), Guide for Webhooks v2 (Pipedrive), Persons and Notes in the Pipedrive API, WhatsApp Web in RD Station CRM, RD Station Conversas + CRM, RD Station Developers, WhatsApp Business Integration (Kommo), Send templates with WhatsApp Business (Kommo), Webhooks (Kommo), Vectalk quickstart.
Put your business on the official WhatsApp
Create your account, connect your number to the official API (you can keep the app with coexistence) and start serving customers and sending messages.
