Telegram Connector
The Telegram integration lets you control your MQTT broker and interact with BunkerAI through a Telegram bot. Chat with the bot to check broker status, query topics, manage clients, and receive anomaly alerts - from your phone, anywhere.
Prerequisites
- BunkerAI Cloud account with available credits
- BunkerM instance with BunkerAI Cloud connected (Settings > Integrations)
- A Telegram account
Step 1: Create a Telegram Bot via BotFather
- Open Telegram and search for @BotFather (the official Telegram bot manager).
- Start a conversation and send
/newbot. - Enter a display name for your bot (e.g., "My BunkerM Bot").
- Enter a username for your bot - must end in
bot(e.g.,mybunkerm_bot). - BotFather gives you a bot token that looks like:
1234567890:ABCdefGHIjklMNOpqrSTUvwxYZ Step 2: Connect the Bot in BunkerM
- Go to Settings > Integrations in the BunkerM dashboard.
- Find the Telegram Bot section.
- Paste your bot token into the field.
- Click Connect.
BunkerM verifies the token and links the bot to your BunkerAI instance. The section shows a connected status with your bot's username.
Step 3: Start Chatting
- Open Telegram and search for your bot by username.
- Click Start or send
/start. - Try: "What is my broker status?"
What You Can Do via Telegram
Broker status
Show me the broker status.
How many clients are connected?
What is the current message rate? Client queries
List all online clients.
When did sensor-kitchen-01 last connect?
Show me all clients that connected in the last hour. Topic queries
What is the latest value on sensor/kitchen/temperature?
Show me all active topics under home/.
Which topics are receiving messages right now? ACL management
Create a client called new-device with password pass123.
Disable client compromised-device.
Add client sensor-01 to the sensors group. Anomaly queries
Are there any anomalies I should know about?
Show me critical anomalies from today.
Summarize the last 24 hours. Receiving Anomaly Alerts
To get anomaly alerts forwarded to Telegram:
- Go to Settings > Integrations.
- Make sure the Telegram bot is connected.
- Enable Alert Forwarding.
BunkerAI will now send anomaly messages directly to your Telegram conversation.
Shared Memory
Conversation history is shared across Telegram, Slack, and Web Chat. Start a conversation on Telegram and continue it in Web Chat without losing context. See Shared AI Memory for details.
Disconnecting
Go to Settings > Integrations, find the Telegram Bot section, and click Disconnect. Your broker and AI features continue working normally - only the Telegram channel is removed.