Telegram Integration
Connect your agent to Telegram and let users chat with it directly in the Telegram app.
Overview
Telegram integration provides:
- Direct messaging with your bot
- Group chat support
- Rich message formatting
- Inline keyboards for interactions
Prerequisites
- A Telegram account
- BotFather access (Telegram's bot creation tool)
Setup Steps
1. Create a Telegram Bot
- Open Telegram and search for @BotFather
- Start a chat and send
/newbot - Follow the prompts:
- Enter a name for your bot (e.g., "My Support Bot")
- Enter a username (must end in "bot", e.g., "mysupportbot")
- BotFather will give you a Bot Token — save this securely
2. Connect to Cuneiform Chat
- Go to Agents → Select your agent
- Navigate to Integrations tab
- Click Telegram
- Paste your Bot Token
- Click Connect
3. Configure Your Bot
Optional bot settings via BotFather:
/setdescription— What the bot does/setabouttext— Information in the bot profile/setuserpic— Profile picture for your bot
4. Test Your Bot
- Find your bot in Telegram by searching its username
- Start a conversation with
/start - Send a message and verify you get a response
How It Works
User sends message → Telegram → Cuneiform Chat → Agent processes → Response sent backMessages are processed in real-time. The agent searches your knowledge base and generates responses based on your configuration.
Features
Direct Messages
Users can chat with your bot one-on-one for private support conversations.
Group Chats
Add your bot to group chats:
- Add the bot to a group
- Make it an admin (for message access)
- Users can mention the bot or use commands
In groups, the bot only responds when mentioned or when using commands, to avoid spam.
Rich Formatting
Your agent's responses support:
- Bold and italic text
- Links
- Code blocks
- Lists
Bot Commands
You can configure custom commands via BotFather:
| Command | Description |
|---|---|
/start | Begin conversation |
/help | Show help message |
/ask [question] | Ask a specific question |
Troubleshooting
Bot Not Responding
- Verify the bot token is correct
- Check the integration is connected in Cuneiform Chat
- Ensure your agent is properly configured
- Test the agent in Playground first
Token Issues
If you need a new token:
- Go to BotFather
- Send
/mybots→ Select your bot → API Token → Revoke - Update the new token in Cuneiform Chat
Group Chat Issues
- Ensure the bot has admin permissions
- Check privacy mode settings via BotFather (
/setprivacy)
Security
- Bot tokens are encrypted and stored securely
- Conversations are processed through secure connections
- No message content is stored beyond your configured retention period
Disconnecting
To remove the Telegram integration:
- Go to Agents → Select agent → Integrations
- Click Telegram → Disconnect
This stops the bot from responding but doesn't delete the Telegram bot itself. Delete via BotFather if needed.