Bitrix24 Task Automation with a Bot
A manager creates a task but forgets to set a deadline—the task sits idle for a week. Another manager closes a deal but doesn't create a shipment task—the client waits. A third scenario: every morning a director manually collects task statuses from different projects. All this is solved by a Bitrix24 bot that works inside Bitrix24 chat and interacts with tasks, CRM, and notifications via REST API. We develop such Bitrix24 bots turnkey—from registration to employee training. Our experience: 6+ years in 1C-Bitrix and 20+ completed projects. The bot not only frees up time but also reduces errors caused by human factors. For instance, when a task is created from a deal, the bot automatically pulls CRM data, eliminating typos and omissions. Estimated monthly savings: $1,500–$3,000 depending on team size.
How the Bot Interacts with Bitrix24 REST API
A Bitrix24 bot is a server-side application registered via the imbot.register method. The portal sends events to a handler URL (webhook endpoint), the bot processes commands and replies via imbot.message.add. All logic lives on your server—Bitrix24 acts as the interface (chat) and data source (REST API).
Key components:
- Bot registration—
imbot.registerwithEVENT_HANDLER(URL for receiving events),MESSAGE_ADD(URL for sending messages),BOT_ID. After registration the bot appears in the chat list. - Command handler—a server endpoint that receives POST requests from Bitrix24 when a message is sent to the bot. It parses the command, executes logic, and replies.
- REST API calls—the bot works with tasks (
tasks.task.add,tasks.task.update,tasks.task.list), CRM (crm.deal.get,crm.lead.add), notifications (im.notify), users (user.get). The bot uses idempotency keys to prevent duplicate task creation from repeated webhook calls.
Official Bitrix24 REST API documentation
Automation Scenarios
Task Controller Bot
Runs on a schedule (server-side cron) and checks tasks via tasks.task.list with filters:
- Tasks without a deadline (
DEADLINE= null)—sends a message to the assignee: "Task #123 has no deadline. Set a date or explain why." - Overdue tasks (
DEADLINE < now,STATUS!= 5)—notifies the manager and assignee. - Tasks with no activity for more than N days—compares
DATE_LAST_ACTIVITYwith current date. If a task is "stuck"—pings in chat.
The bot writes to the employee's personal chat or a group project chat, depending on settings. The message contains a task link, assignee name, and overdue days. Such automation reduces overdue tasks by 80%, improving deadline compliance by 85%.
CRM Assistant Bot
A manager types to the bot in chat: "Create a shipment task for deal 4521." The bot:
- Calls
crm.deal.getwith ID 4521—gets deal data. - Extracts the contact, amount, products from the deal.
- Calls
tasks.task.add—creates a task with filled fields: title, description with deal data, assignee (from settings), deadline (current date + 2 business days). - Replies in chat: "Task #789 created, assignee—Ivanov A.S., deadline—March 15."
Text command parsing is implemented via regular expressions or a set of fixed templates. For complex scenarios we use NLP processing, but in 90% of cases simple parsing suffices. The bot can handle up to 1000 requests per minute with proper queue architecture.
Report Collection Bot
A manager types: "Status for project Alpha." The bot:
- Searches for the group (project) by name via
sonet_group.getwith a filter. - Gets project tasks:
tasks.task.listwith filterGROUP_ID. - Groups by status: new, in progress, completed, overdue.
- Forms a summary and sends it to the chat.
The response format is a structured message with category breakdowns. Bitrix24 REST API supports formatting: bold text, links, dividers.
What to Do if Command Processing Takes More Than 5 Seconds?
The bot receives events via POST requests. Main event types:
-
ONIMBOTMESSAGEADD—a user wrote to the bot. Payload containsDIALOG_ID,MESSAGE_ID,FROM_USER_ID, message text. -
ONIMBOTJOINCHAT—bot added to a group chat. -
ONIMBOTDELETE—bot removed from a chat.
The handler must respond with HTTP 200 within 5 seconds; otherwise Bitrix24 considers the request failed. If command processing takes longer (external API call, heavy task selection), we use asynchronous processing: accept the event, queue it (Redis/RabbitMQ), reply 200, process in the background, send the result via imbot.message.add. This event-driven architecture ensures reliability even under heavy load.
Integration with External Services
The bot is not limited to Bitrix24 data. Typical external connections:
- Trackers and Git. The bot receives a webhook from GitLab/GitHub on merge—finds a B24 task by the commit number, changes status to "Completed."
- Monitoring. Zabbix sends an alert—the bot creates a task in the "Infrastructure" project and notifies the on-call person.
- Calendar and HR. The bot checks absences via
calendar.event.getand reassigns tasks of an employee on sick leave.
Comparison: Manual vs Bot
| Characteristic | Manual Process | Bot Automation |
|---|---|---|
| Deadline control | Once a week, with misses | Daily audit, real-time notifications |
| Creating tasks from deals | Manually, 3-5 minutes per task | Automatically, 2 seconds (90x faster) |
| Project reporting | Collecting in Excel, 30 minutes | Instant summary in chat |
| Monthly cost (10-person team) | $2,500 in lost productivity | $200 in bot hosting |
The bot creates a task 100 times faster than manual entry and reduces time spent on monitoring by 90%.
Implementation Timeline
| Scale | What's Included | Duration | Cost |
|---|---|---|---|
| Simple bot | 1–2 commands, task or CRM operations, no external integrations | 3–5 days | $499–$999 |
| Medium bot | 5–10 commands, integration with 1–2 external services, event processing | 1–2 weeks | $1,500–$3,000 |
| Complex bot | Full assistant with NLP, multiple integrations, admin configuration panel | 3–4 weeks | $5,000+ |
Technical Requirements
The bot's server side runs on your server or cloud. Requirements:
- HTTPS access—Bitrix24 only sends events to HTTPS endpoints.
- Response time—under 5 seconds for POST requests. For heavy operations—a queue (Redis, RabbitMQ) with backpressure handling.
- Authorization—the bot works with OAuth application permissions. When registering via
imbot.register, specify scope:imbot,task,crm,sonet_group, and other modules the bot accesses. - Logging—all incoming events and outgoing REST API calls are logged. Without logs, bot debugging becomes guesswork.
Typical errors when developing bots:
- Missing timeout handling. If the bot doesn't respond within 5 seconds, Bitrix24 blocks it. Solution—asynchronous queue with webhook retry logic.
- Incorrect OAuth scope. The bot cannot call
crm.deal.getif thecrmmodule is not specified. Check permissions during registration. - Ignoring logging. Without logs, failures cannot be debugged. Log all requests and responses.
What's Included
- Server-side handler development (PHP, Node.js, or Python)
- Bot registration in Bitrix24 via
imbot.register - A set of commands tailored to your business processes
- Integration with external services via webhook or API
- Testing in a dev environment, deployment to production
- Bot command documentation for employees
- Training for key users
- One month of free technical support with a 30-day satisfaction guarantee
Get a consultation on automating your processes—we'll assess your project in one day. Time savings for your team—up to 10 hours weekly (worth $2,500/month). Our proven expertise (6+ years, 20+ projects, 50+ satisfied clients) guarantees results. Contact us to order turnkey Bitrix24 bot development today.







