Blog

How to Connect OpenClaw to Telegram (Step-by-Step With Screenshots)

Complete guide to connecting your OpenClaw AI agent to Telegram. Create a bot, get your API token, configure webhooks, and start chatting with your agent in under 10 minutes.

10 min read
Mar 14, 2026
Ampere Team

Telegram is one of the most popular platforms for AI bots. With over 800 million active users, it offers a simple, secure, and feature-rich environment for deploying your OpenClaw AI agent. If you're also considering other platforms, check out our guides for Discord and WhatsApp.

In this guide, you'll learn how to connect OpenClaw to Telegram step-by-step. By the end, you'll have a fully functional AI bot that can respond to messages, handle commands, and interact with users in real-time.

Telegram Integration Flow
Create Bot
Get Token
Configure
Go Live
From bot creation to live AI agent in 10 minutes. No coding required.
Telegram bots work on all platforms: mobile, desktop, and web

What You'll Need

  • A Telegram account (free)
  • An OpenClaw agent set up on Ampere.sh
  • About 10 minutes of your time

Step 1: Create a Telegram Bot with @BotFather

BotFather is Telegram's official bot for creating and managing bots. Here's how to use it:

  1. Open Telegram and search for @BotFather in the search bar
  2. Start a conversation with BotFather by clicking the Start button
  3. Type /newbot and send the message
  4. BotFather will ask for a name for your bot (this is the display name)
  5. Next, provide a username for your bot (must end in 'bot', e.g., MyOpenClawBot)

Tip: Choose a descriptive name that reflects your bot's purpose. The username must be unique across all of Telegram.

Step 2: Get Your API Token

Once you've created your bot, BotFather will send you a message with your HTTP API token. It looks like this:

123456789:ABCdefGHIjklMNOpqrSTUvwxyzABCdefGHI

Important: This token is like a password for your bot. Keep it secure and never share it publicly. Anyone with this token can control your bot.

Copy this token and save it somewhere safe. You'll need it in the next step.

Step 3: Configure OpenClaw on Ampere

Now let's connect your Telegram bot to your OpenClaw agent:

  1. Log in to your Ampere dashboard
  2. Navigate to your agent's settings
  3. Click on the "Integrations" tab
  4. Find Telegram in the list of available integrations
  5. Click "Connect"
  6. Paste your Telegram API token from Step 2
  7. Click "Save"

Step 4: Set Up Webhook (Optional but Recommended)

For production deployments, you should configure a webhook instead of polling. This ensures faster message delivery and better performance.

Ampere automatically handles webhook configuration for you. Once you've connected your token in Step 3, your webhook URL is automatically generated and registered with Telegram.

Webhook URL Format:

https://api.ampere.sh/webhooks/telegram/{your-agent-id}

Step 5: Test Your Bot

Your bot should now be live! Let's test it:

  1. Open Telegram and search for your bot by its username
  2. Click Start or send the /start command
  3. Your OpenClaw agent should respond with a welcome message
  4. Try sending a few messages to see how your agent responds

If your bot doesn't respond immediately, wait a few seconds for the connection to fully establish, then try again.

Step 6: Customize Your Bot

Now that your bot is working, let's customize it:

Set a Profile Picture

  1. Go back to @BotFather
  2. Type /setuserpic
  3. Select your bot from the list
  4. Upload an image

Set a Description

  1. In @BotFather, type /setdescription
  2. Select your bot
  3. Enter a description (up to 512 characters)

Set Commands

You can define commands that users can see in the bot menu:

  1. Type /setcommands in @BotFather
  2. Select your bot
  3. Enter commands in this format:
start - Start the conversation help - Get help and instructions status - Check agent status reset - Reset conversation

Troubleshooting

Bot Not Responding?

  • Verify your API token is correct
  • Check that your OpenClaw agent is running on Ampere
  • Look at the logs in your Ampere dashboard for errors
  • Try revoking and regenerating your token in @BotFather

Bot Responding Slowly?

  • Ensure you're using webhook mode, not polling
  • Check your agent's response time in Ampere
  • Review our memory optimization guide for performance tips

Bot Not Receiving Group Messages?

  • In @BotFather, go to /setprivacy
  • Select your bot
  • Set it to Disable (allows bot to read all group messages)

Frequently Asked Questions

Is the Telegram Bot API free?
Yes, the Telegram Bot API is completely free to use. There are no charges for sending messages or running your bot.
Can I use my bot in group chats?
Yes, you can add your OpenClaw bot to group chats. Just add the bot to the group and it will respond to messages. You may need to configure privacy settings to allow the bot to read group messages.
How do I keep my bot token secure?
Never share your bot token or commit it to public repositories. Use environment variables or a secrets manager. If your token is compromised, you can revoke it using @BotFather and generate a new one.
Can I run multiple bots with OpenClaw?
Yes, you can configure multiple Telegram bots with different OpenClaw agents. Each bot will need its own API token and webhook configuration.
What commands can I use with my bot?
By default, your OpenClaw agent will respond to all text messages. You can also configure specific commands like /start, /help, or custom commands that trigger specific agent behaviors.

Final Thoughts

You've successfully connected your OpenClaw AI agent to Telegram! Your bot is now ready to interact with users, answer questions, and perform tasks on one of the world's most popular messaging platforms.

From here, you can continue to enhance your bot by adding more skills to your OpenClaw agent, configuring custom commands, setting up group chat functionality, and integrating with other platforms simultaneously.

Ready to Deploy Your Telegram Bot?

Get started with Ampere and connect your OpenClaw agent to Telegram in minutes.

Get Started →