Home/Guides/Connecting Telegram

Connecting Telegram

Configuration8 min read

Connecting Telegram

Want to chat with your AI agent on Telegram? Sweet! It's like having your personal assistant in your pocket. Here's how to set it up.

What You'll Need

  • A Telegram account (obviously)
  • About 5 minutes
  • Your Claws agent already set up

Step 1: Create a Telegram Bot

First, you need to create a bot on Telegram. Don't worry, it's easier than making a sandwich.

Talk to BotFather

  1. Open Telegram and search for @BotFather
  2. Start a chat with BotFather (it's the official bot for creating bots)
  3. Send /newbot to start creating your bot

Set Up Your Bot

BotFather will ask you a few questions:

Bot Name: This is what people see in chats. Something like "My AI Assistant" works great.

Username: Must end with "bot" and be unique. Like myawesomeagent_bot

Once you're done, BotFather will give you a Bot Token. It looks like this:

123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11

Save this token! You'll need it in a minute.

Step 2: Get Your Chat ID

Your agent needs to know where to send messages. That's what the Chat ID is for.

  1. Open Telegram and search for @userinfobot
  2. Start a chat and send /start
  3. It will reply with your Chat ID — a number like 12345678
  4. Copy this number, you'll need it in the next step

Step 3: Connect to Claws

Now for the fun part — connecting everything together.

During Setup

If you're creating a new agent, you can add these during the setup process:

  • Telegram Bot Token: Paste the token BotFather gave you
  • Telegram Chat ID: Enter your Chat ID from Step 2

For Existing Agents

If your agent is already running:

  1. Go to your agent's dashboard
  2. Click on "Settings"
  3. Find the "Messaging" section
  4. Add your Bot Token and Chat ID
  5. Hit "Save Changes"

Your agent will restart and connect to Telegram within a minute or two.

Step 4: Test It Out

Time to see if everything works!

  1. Go to your Telegram bot
  2. Send a message like "Hello!"
  3. Your agent should respond

If it doesn't respond within a few seconds, check our Troubleshooting guide.

Pro Tips

Custom Commands

You can set up custom commands for your bot to make it feel more official:

  1. Go back to @BotFather
  2. Send /setcommands
  3. Select your bot
  4. Add some useful commands like:
    start - Start chatting with the assistant
    help - Get help and available commands
    status - Check agent status
    

Privacy Settings

By default, your bot can only see messages sent directly to it. If you want to add it to groups, you'll need to:

  1. Go to @BotFather
  2. Send /setprivacy
  3. Select your bot
  4. Choose "Disable" to let it see all messages in groups

Bot Profile

Make your bot look professional:

  1. Set a description: /setdescription - Tell people what your bot does
  2. Add a profile picture: /setuserpic - Upload a nice image
  3. Set about text: /setabouttext - Short description for the bot profile

What Now?

Your agent can now:

  • Respond to your messages on Telegram
  • Send you notifications and updates
  • Handle commands and requests
  • Work with all your installed plugins

Try asking it to:

  • "What's my GitHub activity today?"
  • "Deploy my latest project"
  • "What's the weather like?"

Troubleshooting

Bot not responding?

  • Double-check your Bot Token and Chat ID
  • Make sure you sent at least one message to the bot first
  • Check if your agent is running in the dashboard

Messages not being delivered?

  • Verify the Chat ID is correct
  • Make sure the bot hasn't been blocked

Still having issues? Check out our Troubleshooting guide or ask the community.

Nice work! Your agent is now just a Telegram message away 📱✨