WhatsApp Bot Development with Bitrix24 Integration
WhatsApp is a closed platform. Official API access for business is only available through the WhatsApp Business API (Meta), and obtaining it directly is not straightforward: you need a verified Meta business account and an approved provider. Everything else involves unofficial libraries with a risk of being blocked. This is the first thing to understand before developing a bot.
Options for Connecting WhatsApp to Bitrix24
Official path — via a BSP provider: Meta does not distribute access to the WhatsApp Business API directly. It works through Business Solution Providers (BSP): 360dialog, Twilio, MessageBird, WABA.cloud, and others. The provider registers your number with WhatsApp Business and provides API keys.
Popular options for various markets:
- Green API — a provider with fast registration and a ready-made module for Bitrix24.
- Wazzup — native Bitrix24 integration, official app in the marketplace.
- Chat2Desk — omnichannel service with WhatsApp and Bitrix24 support.
Direct integration via Green API + custom bot: Green API provides a REST interface to WhatsApp, bypassing Meta directly (via the web client). Technically this is not the official path; numbers periodically require re-authorization. But for mid-size businesses it is a working option.
Bot Architecture via Green API + Bitrix24
Client in WhatsApp
↓
Green API (webhook instanceId + apiTokenInstance)
↓
Bot server
↓ ↓
Bot logic Bitrix24 REST API
(crm.lead.add, crm.contact.list, etc.)
Receiving incoming messages:
GET https://api.green-api.com/waInstance{instanceId}/receiveNotification/{apiTokenInstance}
Replying in WhatsApp:
POST https://api.green-api.com/waInstance{instanceId}/sendMessage/{apiTokenInstance}
{
"chatId": "[email protected]",
"message": "Hello! How can I help you?"
}
The Bitrix24 integration is identical to the Telegram bot: find contact by phone number, create lead, write activities to the timeline.
Key Differences from Telegram
Formatting. WhatsApp supports a limited set: italic, bold, strikethrough, monospace. No HTML tags, no Reply buttons (only buttons via official API Templates).
Buttons. In unofficial APIs (Green API), buttons are not available — only text menus: "Type 1 for order status, 2 to speak with an operator." Through the official WhatsApp Business API, Interactive Messages with buttons are available, but only within approved templates.
Message templates. The first message the bot sends to a client (not a reply to an incoming message) must use an approved Template Message. Templates go through Meta moderation — 24–72 hours. Free-form text in outbound messages — only in reply to an incoming message within 24 hours.
Media. WhatsApp handles images, documents, and voice messages well. The bot can accept photos (e.g., for a return request) and save them to Bitrix24 Drive via disk.folder.uploadfile.
Integration via the Ready-Made Wazzup Module
If there is no need for complex bot logic — it is simpler to use Wazzup or a similar service with a ready-made integration:
- Register in Wazzup, connect a WhatsApp number.
- Install the Wazzup app from the Bitrix24 marketplace.
- Configure mapping: incoming WhatsApp messages → open line → lead/deal in CRM.
- Operators reply directly from Bitrix24; the client receives the reply in WhatsApp.
Limitation: no custom bot logic. Routing to operators only.
Case: Delivery Status Notification Bot
Task: online store, 200–400 orders per day. Clients flood support with "where is my order" questions. An automated response is needed.
Solution: when the order status changes in CRM (deal stage) → webhook → bot server → send notification in WhatsApp via Green API.
def on_deal_stage_change(deal_id, new_stage):
deal = bitrix.get_deal(deal_id)
phone = deal['CONTACT_PHONE']
whatsapp_id = f"{phone.replace('+', '')}@c.us"
messages = {
'ACCEPTED': 'Order accepted for processing. Order number: {order_num}',
'SHIPPED': 'Order shipped. Tracking number: {track}',
'DELIVERED': 'Order delivered. Thank you for your purchase!'
}
if new_stage in messages:
green_api.send_message(whatsapp_id, messages[new_stage].format(**deal))
Additionally: the bot accepts an incoming reply "track" → replies with a tracking link. "Operator" → transfers to the support queue.
Result: support inquiries about delivery status decreased by 60% in the first two weeks.
| Component | Effort |
|---|---|
| Connecting Green API / Wazzup | 4–8 h |
| Basic bot (text commands) | 16–24 h |
| Bitrix24 CRM integration | 8–16 h |
| Outbound notifications on CRM events | 8–16 h |
| Receiving media and uploading to Drive | 4–8 h |
| Deployment and monitoring | 4–8 h |







