GrokBot on Telegram

Talk to your GrokBot from Telegram, and add it to group chats where friends and other bots can reach it too. Switchboard sets it up from one pasted line and runs on the Bot's own computer.

Updated

🎁 What you get

Your DM is your GrokBot

Messaging the Telegram bot is the same conversation as the Grok Bot you set it up in.

A Grok Bot per group

Each group gets its own Grok Bot, with its own memory. One Bot covers all of a group’s forum topics. By default it’s named “Telegram: <group>”.

Fast group replies

Once a group is connected, its messages go straight to that group’s Bot, skipping the router.

Images in the chat

GrokBot can generate images, so it pairs well with agents that can’t, like Claude. See how to put several agents in one group.

The usual Switchboard features

A “Thinking…” placeholder with a Stop button, rich Markdown, buttons, owner-only Approve / Deny, photos and files.

🧰 What you need

  • A GrokBot account.
  • A Telegram account, to make a bot with @BotFather.
  • About 5 minutes.

🚀 How to set it up

Paste this into GrokBot:

Set up https://github.com/useswitchboard/switchboard/blob/main/SETUP.md

It walks you through the rest:

  1. A dedicated Bot

    If your GrokBot already has other chats, routines or memory, it offers to create a new Bot named Switchboard, so the Telegram bot’s routine, secrets and memory stay separate. This is recommended. If you accept, it creates that Bot and starts the setup there: continue in the Switchboard Bot.
  2. Make a Telegram bot

    Send /newbot to @BotFather, then /setprivacy → pick the bot → Disable, so it sees @mentions in groups.
  3. Save the token as a secret

    GrokBot asks for it as a secret named TELEGRAM_BOT_TOKEN. Paste it in the secret prompt, never in the chat.
  4. Install

    GrokBot downloads Switchboard and starts a small poller on its computer, then tells you the bot is up and running.
  5. Claim the bot

    DM your bot /start before you share its username. The first person to DM it becomes its owner.

⚙️ How it works

GrokBot has no session that stays awake, so each Telegram message starts a fresh routine run. Switchboard handles that with three parts:

Part What it does
Poller A small program on the Grok Bot’s Linux computer. It’s the only thing that reads from Telegram. It applies the access rules and loop guards, then posts each message to a webhook. Don’t stop it: it’s the bot’s only connection to Telegram.
Router routine A webhook routine on your setup Bot. It answers your DM itself and sets up a Bot for every other chat.
Chat Bots One Grok Bot per group. Once a group is connected, the poller sends its messages straight to that Bot’s own webhook, and the Bot replies to Telegram itself.

A new group posts its setup status in the chat, then ”✅ Direct connection ready”. The full design is in the GrokBot architecture doc.

🏷️ Choose which Bot answers in a group

Give the Telegram bot a tag (title) in the group to pick the Grok Bot that answers there: one with that name, or a new one. Changing the tag later sets the group up again. If you pick an existing Bot, it may wait until you approve it in the GrokBot app; the group then gets a notice with the exact sentence to send that Bot. Or set the tag to Telegram: <group> to get a fresh Bot instead.

⏱️ Limits

GrokBot allows each routine 200 runs an hour, and all your routines together 300. Each message the bot handles uses a run, so keep busy groups on /mode mention (the default), where the bot only reacts to @mentions and replies.

❓ Common questions

🖥️ Does it need a server?

No. The poller runs on the Grok Bot’s own computer.

🔁 What if the poller crashes?

A supervisor restarts it, with a growing pause between tries.

👥 Can friends use it?

Only you can DM it. In groups you added it to, anyone can @mention it, up to 20 messages an hour per member by default.

More answers are in the FAQ.