Connecting Telegram to Bitrix24 Open Lines
Telegram connects to open lines via the official Bot API. Technically this is one of the cleanest messenger integration options with Bitrix24: no third-party providers, no intermediate services, a direct webhook connection.
What Happens After Connecting
A client writes to the bot in Telegram → the message enters the open line queue → the operator sees the chat in Bitrix24 and responds → the reply arrives to the client in Telegram. The conversation history is saved in the CRM card of the lead or deal.
For the client it looks like a regular conversation with a bot. For the operator — a standard Bitrix24 chat, regardless of where the message came from.
Step-by-Step Connection
Step 1. Create a Telegram bot. Write to @BotFather in Telegram:
-
/newbot→ enter the bot's name (visible to the client, e.g., "Support - Acme Co."). - Enter the bot's username (Latin characters, must end in
bot, e.g.,acme_support_bot). - BotFather provides a token:
1234567890:AAF....
Save the token — it will be needed in the Bitrix24 settings.
Step 2. Connect to the open line. Bitrix24 → CRM → Contact Center → Open Lines → select the needed line → Channels → Telegram → "Connect."
Enter the bot token. Bitrix24 automatically sets up the webhook on its server — no additional configuration needed.
Step 3. Verify. Write to the bot in Telegram → confirm that the message appeared in the open line operator queue.
Step 4. Bot settings in Bitrix24. In the settings of the connected Telegram channel you can specify:
- A welcome message for the
/startcommand. - How frequently requests are allowed (spam throttling).
Common Issues
"Bot doesn't respond" after connecting. The most common cause — the token was copied with a trailing space or incorrectly. Double-check: copy the token fresh from BotFather, delete the channel in Bitrix24, and add it again.
One token cannot be used twice. If the bot is already connected to another service or a different open line — the webhook is overwritten. The bot will only work wherever it was connected last. Different bots with different tokens are needed for different purposes.
Media files are not received. Bitrix24 accepts from Telegram: text, photos, videos, documents, voice messages, stickers (as images). Video messages (circles/video notes) — supported in some versions only. If a client sends an unsupported type — the operator sees an empty message. Solution: ask clients in the welcome text to send photos rather than videos.
Leads are not created in CRM. Check the open line settings: CRM integration must be enabled. Telegram users are identified by telegram_id, not by phone — if there is no contact with that telegram_id in CRM, a new lead will be created.
Multiple operators see the same chat. Normal behavior when the "all at once" distribution mode is configured. Any operator can reply first — after that the chat is assigned to them. If individual responsibility is needed — switch to "round-robin" mode.
Limitations of the Native Integration
- No automatic replies or bot logic — routing to an operator only.
- No interactive Telegram buttons in operator responses.
- Chat history is stored in Bitrix24, but not in Telegram itself on the client side (it looks like a regular conversation with a bot).
- On repeated contact, the client enters the same line but not necessarily the same operator (depends on settings).
For more complex scenarios — with bot logic, buttons, and CRM commands — custom development using the Telegram Bot API directly is required (a separate task).







