Telegram Integration

Complete guide to connecting Clawdbot to Telegram. Create a bot, configure access, and start chatting with your AI.

How to Connect Clawdbot to Telegram: Step-by-Step Guide

Last updated: February 2026

Telegram is the easiest way to get started with Clawdbot. In about 15 minutes, you’ll have an AI assistant living in your Telegram that can read messages, respond intelligently, and take actions on your behalf.

This guide covers everything: creating a bot, configuring Clawdbot, handling groups, and troubleshooting common issues.


Table of Contents

  1. Prerequisites
  2. Create Your Telegram Bot
  3. Find Your User ID
  4. Configure Clawdbot
  5. Test Your Setup
  6. Advanced: Groups and Channels
  7. Advanced: Multiple Bots
  8. Troubleshooting
  9. FAQ

Prerequisites

Before you start, you need:

  • Clawdbot installed — If not, follow our complete Clawdbot setup guide first
  • An AI model configured — Claude or GPT-4 API key in Clawdbot
  • Telegram account — The one you’ll message your bot from
  • 5-15 minutes — This is a quick process

Create Your Telegram Bot

Telegram bots are created through BotFather — Telegram’s official bot for managing bots.

Step 1: Open BotFather

Open Telegram and search for @BotFather, or click this link: t.me/BotFather

Make sure it’s the official one (blue checkmark, “Telegram” as creator).

Step 2: Create a New Bot

Send the command:

/newbot

BotFather will ask for two things:

  1. Display name — What users see (e.g., “Felix Assistant”)
  2. Username — Must end in bot (e.g., felix_assistant_bot)

Step 3: Copy Your Token

After creation, BotFather gives you an API token. It looks like this:

123456789:ABCdefGHIjklMNOpqrsTUVwxyz

Keep this token secret. Anyone with it can control your bot.

Copy it somewhere safe — you’ll need it in the next section.

While in BotFather, set these useful options:

Enable inline mode (optional):

/setinline

Set description (what users see when they open your bot):

/setdescription

Set about text:

/setabouttext

Set profile picture:

/setuserpic

Find Your User ID

Clawdbot needs your Telegram user ID to know who’s allowed to message the bot. This prevents random people from using your AI.

Method 1: Use @userinfobot

  1. Open Telegram
  2. Search for @userinfobot
  3. Send any message to it
  4. It replies with your user ID
Id: 123456789
First: John
Lang: en

Your ID is the number (e.g., 123456789).

Method 2: Use @RawDataBot

  1. Search for @RawDataBot
  2. Send any message
  3. Find "id": in the response

Method 3: Forward a message

  1. Forward any message from yourself to @userinfobot
  2. It shows the sender’s ID (yours)

Configure Clawdbot

Now connect your bot to Clawdbot.

Step 1: Open Your Config

Your Clawdbot configuration is at ~/.clawdbot/clawdbot.json.

Open it in any text editor:

nano ~/.clawdbot/clawdbot.json
# or
code ~/.clawdbot/clawdbot.json

Step 2: Add the Telegram Channel

Find your agent configuration and add a Telegram channel:

{
  "agents": [
    {
      "id": "main",
      "name": "My Assistant",
      "workspace": "~/clawd",
      "model": "anthropic/claude-sonnet-4-20250514",
      "channels": [
        {
          "type": "telegram",
          "token": "YOUR_BOT_TOKEN_HERE",
          "allowedUsers": [YOUR_USER_ID]
        }
      ]
    }
  ]
}

Replace: - YOUR_BOT_TOKEN_HERE with the token from BotFather - YOUR_USER_ID with your numeric Telegram ID

Step 3: Allow Multiple Users (Optional)

To let multiple people use the bot:

{
  "type": "telegram",
  "token": "YOUR_BOT_TOKEN",
  "allowedUsers": [123456789, 987654321, 111222333]
}

Add each user’s Telegram ID to the array.

Step 4: Restart Clawdbot

Save your config and restart:

clawdbot gateway restart

Test Your Setup

Step 1: Message Your Bot

  1. Open Telegram
  2. Search for your bot’s username (e.g., @felix_assistant_bot)
  3. Click “Start” or send any message

Step 2: Wait for Response

If everything is configured correctly, your AI should respond within a few seconds.

Step 3: Verify It’s Working

Try a few test messages: - “Hello, are you there?” - “What’s the weather like?” (if web search is enabled) - “What time is it?”

If you get intelligent responses, congratulations — your Telegram AI assistant is live!


Advanced: Groups and Channels

Adding Your Bot to a Group

  1. Add the bot to your group — Open group info → Add members → Search for your bot
  2. Get the group ID — Send a message in the group, then check Clawdbot logs for the chat ID (negative number for groups)
  3. Add group ID to allowedUsers (or use a separate allowedChats config)

Group Configuration

For groups, you might want additional settings:

{
  "type": "telegram",
  "token": "YOUR_BOT_TOKEN",
  "allowedUsers": [123456789],
  "allowedChats": [-1001234567890],
  "groupBehavior": {
    "respondToMentions": true,
    "respondToReplies": true,
    "respondToAll": false
  }
}

Options: - respondToMentions — Bot responds when @mentioned - respondToReplies — Bot responds to replies to its messages - respondToAll — Bot responds to every message (use carefully!)

Privacy Mode

By default, Telegram bots in groups only see: - Messages that @mention them - Replies to their messages - Commands (messages starting with /)

To see all messages, disable privacy mode in BotFather:

/setprivacy

Select your bot → Disable

Warning: This lets the bot read all group messages. Only disable if needed.


Advanced: Multiple Bots

Run different AI personalities on separate Telegram bots.

Example: Work and Personal Assistants

{
  "agents": [
    {
      "id": "personal",
      "name": "Personal Assistant",
      "workspace": "~/clawd-personal",
      "model": "anthropic/claude-sonnet-4-20250514",
      "channels": [
        {
          "type": "telegram",
          "token": "PERSONAL_BOT_TOKEN",
          "allowedUsers": [123456789]
        }
      ]
    },
    {
      "id": "work",
      "name": "Work Assistant", 
      "workspace": "~/clawd-work",
      "model": "anthropic/claude-opus-4-5",
      "channels": [
        {
          "type": "telegram",
          "token": "WORK_BOT_TOKEN",
          "allowedUsers": [123456789]
        }
      ]
    }
  ]
}

Each bot: - Has its own BotFather token - Uses its own workspace (separate memory, instructions) - Can use different AI models

→ Full guide: Multi-Agent AI Systems

Having problems? Check our troubleshooting guide.


Troubleshooting

Bot doesn’t respond at all

Check 1: Is Clawdbot running?

clawdbot gateway status

If not running: clawdbot gateway start

Check 2: Is your user ID in allowedUsers?

cat ~/.clawdbot/clawdbot.json | grep allowedUsers

Make sure your Telegram ID is in the array.

Check 3: Is the token correct? - Token should be from BotFather - No extra spaces or characters - Check for copy/paste errors

Check 4: Check the logs

clawdbot gateway logs

Look for error messages mentioning Telegram.

Bot responds very slowly

Cause 1: AI model is slow - Claude Opus is slower than Sonnet - Try switching to a faster model for testing

Cause 2: Complex processing - If the AI is running tools (web browsing, email), it takes longer - Check logs to see what’s happening

“Unauthorized” error in logs

Cause: Bot token is invalid or was regenerated.

Fix: 1. Go to BotFather 2. Send /mybots → Select your bot → API Token → Revoke and regenerate 3. Update the new token in your config 4. Restart Clawdbot

Bot only responds to some messages

Cause: Privacy mode is enabled (groups only).

Fix: In BotFather, /setprivacy → Disable for your bot.

“Chat not found” error

Cause: User ID is wrong, or user hasn’t started the bot.

Fix: 1. User must click “Start” in the bot chat first 2. Verify user ID is correct (check with @userinfobot)

Bot responds but AI seems “dumb”

Cause: Workspace files missing or misconfigured.

Fix: 1. Check workspace path is correct in config 2. Verify AGENTS.md exists in workspace 3. Check AI model is correctly configured


FAQ

Can I change the bot’s name later?

Yes. In BotFather: /setname → Select bot → Enter new name.

Can I use the same bot for multiple agents?

No. Each bot token should connect to one agent. For multiple agents, create multiple bots.

Is Telegram secure?

Regular Telegram chats are encrypted in transit but stored on Telegram’s servers. For highly sensitive use: - Use “Secret Chats” for human-to-human (doesn’t work with bots) - Consider self-hosted alternatives - Be mindful of what data you share

Can the bot send me notifications?

Yes. Clawdbot can send proactive messages via cron jobs — daily briefings, reminders, alerts.

Do I need Telegram Premium?

No. Standard Telegram accounts work fine.

Can I use this on Telegram Web/Desktop?

Yes. The bot works across all Telegram clients — phone, desktop, web.

How many messages can I send?

Telegram allows ~30 messages per second per bot. For normal personal use, you’ll never hit this limit.


Next Steps

Your Telegram bot is live. Now:

  1. Customize your agent — Edit AGENTS.md to define personality and capabilities
  2. Add integrations — Connect Gmail, Calendar, and other tools
  3. Set up cron jobs — Automated briefings and check-ins
  4. Consider groups — Add the bot to family or team chats

→ Back to: Complete Clawdbot Setup Guide → Next: Multi-Agent AI Systems


Need help? Swarm sets up and manages AI assistants for businesses. Book a call to get started.

Need Help Setting This Up?

Swarm builds and manages AI assistants for businesses. Same tech, zero headache.

Book a Free Consultation →