Configure Telegram notifications
Set up a Telegram bot to alert administrators about messages, conversations, assignments, and channel issues; choose recipients, customize templates, and test delivery.
1. Open notification settings#
Telegram notifications alert administrators on their phones while away from ChatHub. This notification bot is configured independently of Telegram channels used to chat with customers in the Inbox. You do not need to add it to the Channels list.
- 1
Sign in to ChatHub with permission to view and manage system settings.
- 2
Open Administration → Settings → Telegram notifications in the left column. The direct path is /settings?tab=notifications on your ChatHub domain.
- 3
Prepare a dedicated Telegram bot, its token, and the Chat IDs of the people or administrator groups that will receive alerts.
2. Prepare the notification bot#
- 1
Open the BotFather link below, check its username and verification badge, and use START BOT to open Telegram.
- 2
Send /newbot to BotFather in Telegram, then follow its instructions to choose a name and username.
- 3
Copy the token issued by BotFather for ChatHub. A personal Telegram API ID/API Hash or account password is not a bot token.
- 4
Open your new bot and press Start or send /start. For a group recipient, add this bot to the administrator group and make sure it can send messages.
Telegram: create a bot with BotFather ↗
3. Identify recipient Chat IDs#
- 1
For personal delivery, open @userinfobot as suggested in ChatHub, press Start in Telegram, and read your account ID from its reply. It is a third-party bot; do not send it bot tokens or customer content.
- 2
Use that ID as the recipient and also send /start to your new notification bot. Opening userinfobot alone does not let your notification bot message you.
- 3
For a group, obtain the group’s Chat ID from its administrator. Group IDs begin with a minus sign. Do not substitute your personal ID or the group’s display name.
- 4
If an administrator needs to look up a group ID with the Bot API, add the bot to the group, send a command addressed to it there, and read message.chat.id from getUpdates using a trusted internal API tool. Do not paste the token into third-party ID lookup websites. getUpdates cannot be used while a webhook is active.
- 5
Separate multiple recipient IDs with commas, for example 123456789, -100123456789. Preserve the minus sign for group IDs.
Open userinfobot to find your personal ID ↗
4. Set the token, shared recipients, and master switch#
- 1
Bot token: paste the complete token from BotFather. When a token is already saved, leave Bot token (saved) empty to retain it; enter a value only to replace the bot or update its token.
- 2
Shared recipient Chat IDs: enter at least one destination. Events without their own Chat IDs use these recipients, and test messages go here too.
- 3
Turn on Enable Telegram notifications to receive automatic alerts. Enabling and saving requires both a bot token and shared recipient Chat IDs, even if all events have separate destinations.
- 4
To check delivery first, leave the master switch off, save the token and shared recipients, and send a test. Then enable the switch and Save to start automatic alerts.
The server encrypts the token and never displays it again. Configured only means a token was saved, not that delivery works. To pause automatic alerts, turn off Enable Telegram notifications and Save; the configuration is retained.
5. Choose events, separate recipients, and templates#
Each notification type has its own switch. Enabling it reveals its Chat ID override and Message content fields. Disabling it hides those fields and stops that event’s alerts after saving; the master switch still controls all automatic delivery.
New message: a customer sends a message to a channel. Supported variables: {contact} for the customer’s name, {channel} for the channel name, and {preview} for up to 200 characters of message text. File/image-only messages may have no text preview.
New conversation: a customer starts their first conversation or reopens a closed one. Supported variables: {contact}, {channel}.
Conversation assigned: a conversation is assigned to a staff member or team. Supported variables: {contact}, {assignee}, where {assignee} is the staff or team name. Removing an assignment does not send this alert.
- 1
Enable the events you need. For example, to focus on incoming messages and channel status, disable New conversation or Conversation assigned to reduce alerts.
- 2
Leave an event’s Chat ID override empty to use shared recipients. An override replaces the shared list for that event; it does not add recipients to it. Multiple IDs can be separated by commas.
- 3
Edit the existing Message content template. For New message, for example, write 💬 {contact} sent a message via {channel}, followed by a new line and {preview}.
- 4
Keep variable names and braces exact, and use only the variables listed below that field. Messages use plain text, not HTML/Markdown formatting. Clear the content and save to restore the default template.
Channel disconnected alerts you after repeated disconnections need attention. Channel reconnected reports recovery of a channel previously reported as offline. Both types support only {channel}.
6. Save and send a test#
- 1
Review the token, every destination, and the switches, then click Save at the bottom. Wait for the confirmation that Telegram notification settings were saved.
- 2
In the test section, click Send test. This sends a real message using the saved token to shared recipient Chat IDs, even when the master switch is off.
- 3
Read the result and check Telegram at every destination. A successful result reports how many chats received the test; it does not use individual event templates.
- 4
If you set separate event recipients, verify those with an appropriate real event after enabling and saving the configuration. A successful test to shared recipients does not verify the separate destinations.
7. Troubleshoot and verify#
Cannot open Settings, save, or test: check that your account has permission to manage system settings (settings.manage). This is required to open the Settings page, save configuration, and send tests.
Invalid token or missing configuration: enter the complete BotFather token and shared recipient Chat IDs. A correctly formatted token may still be revoked, so test delivery.
Invalid Chat ID: use numeric IDs, preserve the minus sign for groups, and separate multiple recipients with commas. Do not use phone numbers, display names, or t.me links in this field.
Telegram rejected the request: check token validity, /start with the correct notification bot, and whether the bot is blocked or has left the group. Make sure it can send there. Read the error details below the test result to identify the destination to fix.
Cannot reach Telegram: check the ChatHub server’s Internet connection, DNS, and firewall access to api.telegram.org, then retry.
Tests work but automatic alerts do not: confirm the master and event switches were enabled and saved, a matching new event occurred, and an event override is not routing messages elsewhere. A missing preview for a file/image-only message can be normal.