Working with Chats¶
Bots and accounts connected to Hotline can be in Telegram chats of different types: groups, topic groups and channels. This allows organizing communication monitoring, team prompt responses and content posting on behalf of connected bot or account.
Chat Work Features¶
When activating MONITOR_GROUPS or MONITOR_CHANNELS parameters in connection settings, the following functions become available:
- Receiving messages from chats to corresponding topic of Hotline backend group
- Sending messages to chats on behalf of connected bot or account through backend group
- Keyword filtering — automatic broadcast activation when specified words appear in parameters
GROUPS_KEYWORDSandCHANNELS_KEYWORDS
Free Version Features
In the free version of Hotline, when activating each chat topic, a welcome message with Hotline copyright from the WELCOME parameter will be sent to it.
Also, topics are automatically closed after the timeout from the AUTOCLOSE parameter when there is no activity in them.
To configure topic auto-closing and disable the welcome message, purchase the paid version of the system, contact the support service.
Limitations with Content Protection
If a chat has content protection enabled (Content Protection), attachments from such chat will not be forwarded to the backend group, but message text will be transmitted.
Connection Features¶
Capabilities:
-
Bot can see all messages in chats where it was added by a chat administrator
-
Team can respond on behalf of bot in chats through backend group
- Chat filtering by keywords
- Monitoring and duplicating messages from private chats
Important Features:
Adding Bot to Chat
Only a chat administrator can add bot to a chat. Bot cannot independently join groups.
If you need to send messages from bot in chat, make sure the bot has sufficient rights for this.
Disable Privacy Mode in BotFather
If you plan to work in groups through bot, be sure to disable the Privacy Mode parameter for it in @BotFather. By default, the mode is active for bots and they don't see all messages in groups.
How to disable:
- Open @BotFather
- Send
/mybots - Select your bot
Bot Settings→Group Privacy→Turn off
Capabilities:
- Can independently join public and private chats, including topic groups (joining chats with
/newcommand by specifying link or chat name) - Creating new chats on behalf of connected account
-
Actions API for programmatic chat management
-
Your operator team can respond on behalf of account in chats
- Chat filtering by keywords
- Monitoring and duplicating messages from private chats
Adding to Chats¶
Only a chat administrator can add bot to chat:
- Open the needed chat in Telegram
- Click on chat name → Add Members
- Find your bot by
username - Select it and add to chat
- Grant administrator rights if needed
Method 1: Standard Way in Telegram
An account can independently join a public chat or be invited to a private group in the usual way through the Telegram app.
Method 2: /new Command Through Backend Group
Use the /new command in the General topic of Hotline backend group:
/new CHAT_USERNAME
or
/new https://t.me/CHAT_USERNAME
or
/new https://t.me/+INVITE_HASH
Topic Activation and Management¶
With active MONITOR_GROUPS or MONITOR_CHANNELS, a topic for the chat on the backend group side is created and activated automatically:
- When mentioning (@mention) the connected account or bot in chat
- When replying (reply) to a message from the connected account or bot
- When keywords appear from parameters
GROUPS_KEYWORDSorCHANNELS_KEYWORDS - On any incoming message with active parameter
LEAVE_CLOSED
Broadcast Management¶
Continuous broadcast of all messages from chat to backend group topic is conducted only when the topic has a status different from closed (yellow 🟨 or purple 🟪, activated by /wait or /hold commands).
If you close the topic with the /close command, message broadcast to it stops.
Learn more about topic statuses
LEAVE_CLOSED Parameter
With active LEAVE_CLOSED parameter, new topics are created in closed state. Only messages with keywords will be forwarded to it, and broadcast is activated only by operator decision.
Feature of Broadcasts from Other Topic Groups
When monitoring a topic group, each topic is perceived by the system as a separate chat. Accordingly, each topic must be activated separately (by mention, reply or keyword).
Chat Filtering by Keywords¶
Topics for chats can be created and activated automatically when messages with specified keywords appear in them.
Keywords and rules for filtering are set in parameters GROUPS_KEYWORDS or CHANNELS_KEYWORDS.
As a unified set of stop-words, the parameter RESTRICTED_KEYWORDS_FRONTEND may be useful.
Working with Activated Topics¶
When a topic is activated by keywords:
- All messages from the chat are broadcast to the topic, starting with the message containing the keyword
- Broadcast messages show profile links of authors
- Operators can respond in chat on behalf of bot/account
- Can write to DM of message author
- Or passively follow the conversation without participation
To stop the broadcast, send the /close command in the topic.
Advanced Filter Configuration
If you need more flexible filter settings (regular expressions, exact match, complex conditions), contact the Hotline support service.
Used Parameters¶
Activating message monitoring from groups or channels:
MONITOR_GROUPS
Create and activate topics when new messages appear in group chats in which the connected account or bot is a member.
Default value: FALSE (groups are not monitored).
MONITOR_CHANNELS
Create and activate topics when new messages appear in channels to which the connected account is subscribed or in which the bot is a member.
Default value: FALSE (channels are not monitored).
Disabling greeting:
WELCOME
Welcome message that user receives on first contact and when their request was closed (switched to /close status). Can be completely disabled on paid version. Free version requires Hotline link in welcome message.
Default value: standard welcome message in English.
Disabling automatic topic closing:
AUTOCLOSE
Dialog auto-close period after last operator response, specified in hours.
If topic with user was closed, they'll receive welcome message from WELCOME parameter on next contact. Free version has maximum auto-close period of 48 hours.
Default value: 48 hours.
Keywords and rules for filtering are set in parameters:
GROUPS_KEYWORDS
Array of keywords and phrases for filtering messages from group chats. Activates topics only when matching specified words.
Default value: OFF (no filtering).
CHANNELS_KEYWORDS
Array of keywords and phrases for filtering messages from channels. Activates topics only when matching specified phrases.
Default value: OFF (no filtering).
Hiding information about chat participants from operators:
HIDE_INFO
Determines what client information is hidden from operators (names, group titles, user links, /info command output).
Default value: NONE (all information is available).
Controlling outgoing messages by keywords:
RESTRICTED_KEYWORDS_FRONTEND
Array of prohibited keywords for incoming messages. Messages with specified words are not forwarded to the backend group.
Default value: NONE (no filtering).
Controlling incoming messages by keywords:
RESTRICTED_KEYWORDS_BACKEND
Array of prohibited keywords for outgoing messages. Triggers an error when attempting to send a message with specified words.
Default value: NONE (no filtering).
Practical Usage Scenarios¶
-
Team Chat Support
24/7 customer chat support by operator team on behalf of bot or account.
-
Lead Search
Automatic search for potential customers in Telegram chats by keyword queries.
-
Mention Monitoring
Track mentions of your brand or product in thematic Telegram chats.
-
Community Management
Manage multiple community chats from a single operational interface.
-
Content Moderation
Automated moderation of group chats with keyword filters and operator control.
-
Channel Management
Team posting to channels with content approval and scheduling.
Related Use Cases¶
---
Tracking mentions of company, products or competitors in thematic chats and channels.
-
Regular Posting
Publishing news, announcements or content in chats on behalf of account or bot through backend group.
-
Message Backup
Saving and duplicating messages from closed or important chats in your private backend group.