Build Your AI Assistant on Telegram with OpenClaw
In this tutorial, we'll show you how to use OpenClaw to connect MiniMax M2.1 to Telegram, creating your personal AI assistant that you can chat with anytime, anywhere.
What is OpenClaw?
OpenClaw (prev. Clawdbot) is an open-source AI Agent gateway that bridges popular messaging platforms with AI models. It allows you to chat with AI assistants directly from your favorite messaging apps.
Core Features
| Feature | Description |
|---|---|
| Multi-Platform Support | WhatsApp, Telegram, Discord, iMessage, and more via plugins |
| AI Agent Bridge | Connect to coding agents like Pi with RPC mode and tool streaming |
| Multi-Agent Routing | Route different accounts to isolated agents with separate workspaces |
| MiniMax Integration | Native support for MiniMax M2.1 as a model provider |
With OpenClaw and MiniMax M2.1, you can create a powerful AI assistant accessible from your pocket - just send a message and get intelligent responses anywhere, anytime.
Quick Start
This guide will walk you through setting up OpenClaw with Telegram and MiniMax M2.1.
Prerequisites
- A Telegram account (phone number required)
- A MiniMax Coding Plan subscription or Pay-as-you-go API Key
- A computer with terminal access (macOS, Linux, or Windows with WSL)
Part 1: Create a Telegram Bot
Step 1: Open Telegram
Create a Telegram account if you don't have one (phone number required).
Step 2: Find BotFather
Search and select @BotFather in Telegram. This is the official bot for creating and managing Telegram bots.
Step 3: Create Your Bot
Send /newbot to BotFather, then:
- Choose your bot's display name
- Choose your bot's username (must be unique and end with "bot")
- Save the bot token - you'll need it later!
Step 4: Find UserInfoBot
Search and select @userinfobot in Telegram.
Step 5: Get Your Telegram ID
Send /start to @userinfobot. Save your Telegram ID for later use.
Part 2: Install and Configure OpenClaw
Step 1: Install OpenClaw
Run the following command in your terminal:
curl -fsSL https://molt.bot/install.sh | bash
Step 2: Start Setup Wizard
When prompted, select "Yes" to start the setup wizard.
Step 3: Select QuickStart Mode
Step 4: Select MiniMax Provider
When asked to choose a model provider, select "MiniMax".
Step 5: Select MiniMax M2.1 Model
Step 6: Enter API Key
Enter your MiniMax Coding Plan API Key. You can get it from Coding Plan Dashboard.
Step 7: Confirm Model Selection
Select "Keep current (minimax/MiniMax-M2.1)" to confirm your model choice.
Step 8: Select Telegram Channel
Choose "Telegram (Bot API)" as your messaging channel.
Step 9: Enter Bot Token
Enter the Telegram Bot token you saved from BotFather in Part 1.
Step 10: Confirm Installation
Select "Yes" when asked to confirm.
Step 11: Select Package Manager
Select "npm" as the package manager.
Step 12: Select Skills
Select any additional skills you wish to install (optional, use space to select).
Step 13: Configure API Keys
Configure additional API keys for tools that OpenClaw can use (optional).
Step 14: Skip Additional Config
Select "Skip for now" if you don't want to configure additional tools.
Step 15: Open Web UI
Select "Open the Web UI" to access the OpenClaw dashboard.
Part 3: Connect to Your Bot
Step 1: Find Your Bot
In Telegram, search and select the bot you created in Part 1.
Step 2: Start the Bot
Send /start to your bot. You should receive a message containing a pairing code.
Step 3: Approve Pairing
In your terminal, run the following command (replace <code> with the pairing code from the message):
clawdbot pairing approve telegram <code>
Step 4: Verify Connection
You should see a success message in both the terminal and Telegram.
Start Chatting!
Congratulations! Your AI assistant is now ready. You can start chatting with MiniMax M2.1 directly in Telegram.
Your OpenClaw-powered assistant can help you with:
- Answering questions and providing information
- Writing and editing text
- Coding assistance and debugging
- Creative tasks and brainstorming
- And much more!
Summary
In this tutorial, you learned how to:
- Create a Telegram Bot using BotFather
- Install and configure OpenClaw with MiniMax M2.1 as the AI provider
- Connect your bot to enable AI-powered conversations
With OpenClaw and MiniMax M2.1, you now have a personal AI assistant accessible from anywhere through Telegram.