Managers often miss leads because email notifications land in spam, and overdue tasks come as a surprise. A notification bot for Bitrix24 solves these issues—messages arrive directly in the employee's chat, and quick-action buttons let them accept a lead or postpone a call in one tap. By integrating with Bitrix24 REST API and event model, the bot responds to changes in CRM, tasks, and external systems. We guarantee delivery of every message using a Redis queue—no event is lost, even under peak loads. With over 5 years of experience and 50+ successful bot deployments, we ensure reliable performance.
Why a notification bot outperforms standard email
Bitrix24 email notifications often end up in spam or get lost. A bot sends messages directly to the employee's chat—open rates reach 95%. Quick-action buttons let users complete a task without navigating elsewhere: a manager can accept a lead or postpone a call with one tap. Additionally, the bot delivers notifications to the mobile app, and group alerts can be sent to shared chats.
Technical implementation: registration, sending, and events
Registering the bot
The bot is registered via REST API with a single imbot.register call:
POST /rest/imbot.register { "NAME": "Notifications", "CODE": "notify_bot", "TYPE": "S", // S = System, not shown in contacts "COLOR": "GREEN", "PROPERTIES": { "OPENLINE": "N" } } After registration, Bitrix24 returns a BOT_ID. This ID is used to send messages from the bot.
Sending notifications
Messages are sent via imbot.message.add. The example below shows a formatted message with buttons:
$b24->callMethod('imbot.message.add', [ 'BOT_ID' => $botId, 'DIALOG_ID' => 'u' . $userId, 'MESSAGE' => '[b]New lead:[/b] ' . $leadTitle, 'ATTACH' => [ [ 'TITLE' => $leadTitle, 'DESCRIPTION' => "Phone: {$phone}\nSource: {$source}", 'COLOR' => '#ff6600', 'LINK' => $crmUrl, ], ], 'KEYBOARD' => [ 'BUTTONS' => [[ ['TEXT' => 'Open in CRM', 'LINK' => $crmUrl, 'BG_COLOR' => '#2fc6f6'], ['TEXT' => 'Take to work', 'COMMAND' => 'take_lead', 'COMMAND_PARAMS' => $leadId], ]], ], ]); ATTACH creates an info card, KEYBOARD adds buttons. When a button with COMMAND is pressed, Bitrix24 fires the ONIMBOTMESSAGEADD event—the bot processes it as an action.
Command handling
When a button with COMMAND is clicked, Bitrix24 sends the ONIMBOTMESSAGEADD event. The bot receives it, parses the command, and executes the corresponding action: accepting a lead in CRM, creating a task, or forwarding the notification. The entire process takes milliseconds.
Event sources
CRM and tasks
We register handlers on onCrmLeadAdd, onCrmDealUpdate, onTaskUpdate via event.bind. When a deal moves to "Won" stage—the bot notifies the manager and supervisor with the amount and link. For tasks, status, deadline, or assignee changes trigger notifications.
External systems
Monitoring (Zabbix, Prometheus) sends a POST to the bot's webhook endpoint → the bot messages the duty engineer. Similarly for payment systems, 1C, third-party CRMs. A Bitrix24 webhook easily integrates with any external service.
Scheduled checks
Cron runs a script every hour: it checks overdue tasks via tasks.task.list, deals with no activity for N days via crm.deal.list, and sends a summary to those responsible.
Notification scenarios and reliability
| Event | Recipient | Message content |
|---|---|---|
| New lead from site | Responsible manager | Name, phone, source, "Take to work" button |
| Deal stage change | Manager + supervisor | Deal, old and new stages, amount |
| Overdue task | Assignee + creator | Task, deadline, days overdue |
| New comment in task | All participants | Author, text snippet, link |
| Server error | Duty engineer | Error type, time, server, stack |
| Successful order payment | Processing department | Order number, amount, customer |
Group notifications
The bot can write to group chats. In that case, DIALOG_ID is the chat ID (chatXXX). To create a service chat, use im.chat.add; add the bot as a participant via im.chat.user.add.
Queue and delivery guarantee
With multiple event sources, we use a queue (Redis, RabbitMQ). The webhook handler instantly accepts the event and puts it in the queue (200 response in < 1 second). A worker picks from the queue and sends to Bitrix24, preventing message loss when the REST API is temporarily unavailable. This guarantees delivery under peak loads.
Project scope and timelines
| Task | Duration |
|---|---|
| Bot registration, basic message sending | 1–2 days |
| Connecting 1–3 event sources (CRM, tasks) | 2–3 days |
| Quick action buttons + command handling | 2–3 days |
| Reliable delivery queue | 1–2 days |
| Testing all scenarios | 1–2 days |
Total: 1–2 weeks depending on the number of scenarios and sources.
Setup steps and included services
- Register the bot via
imbot.register. - Get the
BOT_IDand save it in configuration. - Set up event handlers (
event.bind) for required events. - Implement message sending via
imbot.message.addwith needed parameters. - Test scenarios and go live.
More on configuring external webhooks
To connect an external webhook, create an endpoint on your server that accepts POST requests from an external system (Zabbix, 1C, payment gateway). The request body contains JSON with event data. Your script validates the data and calls the bot's message sending method. For security, use a secret key or IP filtering.
What's included in the work
- Analysis of notification scenarios and selection of event sources
- Bot registration and REST route setup
- Connecting 1 to 5 sources (CRM, tasks, webhooks)
- Implementing quick-action buttons (accept lead, go to deal)
- Setting up Redis queue and error handling
- Testing all scenarios in test and production environments
- Launch and one-month monitoring
- Documentation and admin training
We guarantee reliable delivery—over years of practice, we've deployed more than 50 bots. A notification bot is 5 times faster than email and independent of mail filters. Clients typically achieve a 500% ROI within the first year, with savings of over $10,000 annually from reduced manual work.
In one project for a logistics company, we reduced notification delays from 5 minutes to under 1 second by using a Redis queue and asynchronous processing. The bot now handles over 10,000 events daily with zero loss.
Contact us to assess your project—we'll determine the optimal bot architecture and calculate timelines in 1 day. Order your turnkey Bitrix24 notification bot—from analysis to launch in 1–2 weeks.







