Telegram Integration
Set up a Telegram bot for customer support
Connect a Telegram bot to receive and respond to customer messages through Open Lines.
Prerequisites
- Telegram account
- Admin access to Astervis
- A queue set up for Telegram conversations
Setting Up
Create a Telegram Bot
- Open Telegram and search for @BotFather
- Send
/newbot - Follow prompts:
- Enter bot name (e.g., "ACME Support")
- Enter username (must end in
bot, e.g.,acme_support_bot)
- Copy the bot token provided
Keep your bot token secret. Anyone with the token can control your bot.
Add Channel in Astervis
- Go to Settings → Open Lines → Channels
- Click Add Channel
- Select Telegram
- Enter:
- Channel name (for internal reference)
- Bot token (from BotFather)
- Click Save
Assign to Queue
- Go to Settings → Open Lines → Queues
- Edit the queue that will handle Telegram messages
- Enable the Telegram channel
- Save
Test the Connection
- Open your bot in Telegram
- Send a test message
- Check Astervis Open Lines — you should see the conversation
- Reply from Astervis
- Verify reply appears in Telegram
Configuring the Bot
Welcome Message
Set up an automatic greeting:
- Go to Settings → Open Lines → Bots
- Select your Telegram channel
- Enable Welcome Message
- Enter greeting text for each language:
- English: "Hello! How can we help you today?"
- Russian: "Здравствуйте! Чем можем помочь?"
- Uzbek: "Assalomu alaykum! Qanday yordam bera olamiz?"
- Set Auto-transfer delay (seconds before human takes over)
- Save
Bot Commands
Configure what happens when users send commands:
| Command | Typical Use |
|---|---|
/start | Initial greeting, menu |
/help | List available options |
/status | Check order/ticket status |
/contact | Request human operator |
Set up command responses in bot settings.
Message Types
Supported
| Type | Receive | Send |
|---|---|---|
| Text | ✅ | ✅ |
| Photos | ✅ | ✅ |
| Documents | ✅ | ✅ |
| Voice messages | ✅ | ❌ |
| Video | ✅ | ❌ |
| Stickers | ✅ | ❌ |
| Location | ✅ | ❌ |
Handling Media
When customers send photos or documents:
- Media appears in chat with preview
- Click to view full size
- Download if needed
- Reply with text or your own files
Conversation Flow
New Customer Messages
- Customer sends message to your bot
- Session created in Waiting status
- Auto-assigned to available operator (if enabled)
- Operator sees notification
- Operator responds through Astervis
- Reply sent via Telegram bot
Session States
| State | What Happens |
|---|---|
| Waiting | Bot replied (if configured), awaiting operator |
| Active | Operator assigned and responding |
| Closed | Conversation ended |
Multiple Bots
You can connect multiple Telegram bots for different purposes:
- Sales Bot — Pre-sales inquiries
- Support Bot — Technical support
- Orders Bot — Order status updates
Each bot connects to its own queue with dedicated operators.
Security
Token Security
- Never share bot token publicly
- Regenerate token if compromised (via @BotFather →
/revoke) - Astervis encrypts tokens at rest
Webhook Verification
Astervis uses secret tokens to verify incoming webhooks are from Telegram.
Troubleshooting
Messages Not Appearing
- Verify bot token is correct
- Check channel is active
- Ensure queue has available operators
- Check webhook status in channel settings
Bot Not Responding
- Verify Astervis service is running
- Check welcome message settings
- Ensure operators are available (or auto-assign enabled)
Delayed Messages
- Check operator workload
- Verify auto-assign is enabled
- Review queue settings
Best Practices
- Quick responses — Telegram users expect fast replies
- Clear welcome message — Set expectations immediately
- Use quick replies — Speed up common responses
- Monitor queue — Don't let sessions wait too long
- Test regularly — Send test messages to verify flow
- Descriptive bot name — Customers should recognize your brand