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 free version of Hotline, when activating each chat topic, a welcome message with Hotline copyright from WELCOME parameter will be sent to it.
Also topics are automatically closed after timeout from AUTOCLOSE parameter when there is no activity in them
To configure topic auto-closing and disable welcome message, purchase paid version of system, contact support service for this.
Limitations with content protection
If chat has Content Protection enabled, attachments from such chat will not be forwarded to backend group, but message text will be transmitted.
Connection Features¶
Features:
-
Bot can see all messages in chats where chat administrator added it
-
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 chat administrator can add bot to chat. Bot cannot independently join groups.
If bot needs to send messages in chat, make sure bot has sufficient rights for this.
Disable Privacy Mode in BotFather
If you plan to work in groups through bot, be sure to disable Privacy Mode parameter for it in @BotFather. By default, 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
Features:
- 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 chat administrator can add bot to chat:
- Open 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
Account can independently join public chat or be invited to private group in usual way through Telegram app.
Method 2: /new command through backend group
Use /new command in 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, topic for chat on backend group side is created and activated automatically:
- When mentioning (@mention) connected account or bot in chat
- When replying (reply) to message from 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 topic has status different from closed (yellow 🟨 or purple 🟪, activated by /wait or /hold commands).
If you close topic with /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 keyword will be forwarded to it, and broadcast is activated only by operator decision.
Broadcast feature from other topic groups
When monitoring a topic group, each topic is perceived by system as 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 unified set of stop-words, parameter RESTRICTED_KEYWORDS_FRONTEND may be useful
Working with Activated Topics¶
When topic is activated by keywords:
- All messages from chat are broadcast to topic, starting with message with 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 conversation without participation
To stop broadcast, send /close command in topic.
Advanced filter configuration
If you need more flexible filter settings (regular expressions, exact match, complex conditions), contact Hotline support service.
Used Parameters¶
Activating message monitoring from groups or channels:
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:
Hiding information about chat participants from operators:
Controlling outgoing messages by keywords:
Controlling incoming messages by keywords:
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
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.