Creating a Telegram Bot with OpenClaw
Create a Telegram bot and connect it to OpenClaw for AI-powered conversations.
Telegram Bot Setup
Telegram is the easiest channel to set up with OpenClaw. You create a bot through Telegram's BotFather, paste the token, and you're live.
Step 1: Create a Bot with BotFather
- Open Telegram and search for @BotFather
- Send
/newbot - Choose a display name (e.g., "My AI Assistant")
- Choose a username ending in "bot" (e.g., "myai_assistant_bot")
- BotFather gives you an API token — save this securely
Step 2: Configure OpenClaw
Add your Telegram bot token to the OpenClaw configuration:
{
"channels": {
"telegram": {
"enabled": true,
"token": "YOUR_BOT_TOKEN_HERE"
}
}
}
Or via the onboarding wizard — it prompts for the token automatically.
Step 3: Pair the Bot
- Start the OpenClaw gateway
- Open your Telegram bot and send any message
- OpenClaw receives a pairing code
- Enter the code when prompted in your terminal
Step 4: Test It
Send a message to your bot on Telegram. You should get an AI-powered response within seconds.
Customizing Your Bot
Bot Profile
Use BotFather to customize:
/setdescription— What users see before starting the bot/setabouttext— Bot bio/setuserpic— Bot avatar
Bot Commands
Register commands with BotFather using /setcommands:
/start— Introduction message/help— List capabilities/clear— Reset conversation
Group Chat Behavior
To use your bot in Telegram groups:
- BotFather:
/setjoingroups→ Enable - Add the bot to your group
- Configure mention-only mode to avoid spam
Pro Tips
- Inline mode: Enable inline queries for quick lookups
- Markdown: Telegram renders Markdown in bot messages automatically
- File sharing: Send documents to your bot for analysis
- Location sharing: Send locations for context-aware responses
相关指南
Setting Up OpenClaw on WhatsApp
Connect OpenClaw to WhatsApp so your AI assistant responds directly in your chats.
Integrating OpenClaw with Discord
Set up an OpenClaw-powered Discord bot for your server with slash commands and chat.
Using OpenClaw with iMessage
Connect OpenClaw to iMessage on macOS using the BlueBubbles bridge.