Route OpenClaw agent notifications and responses through a private Telegram group using Topics for clean per-bot threading.
| Item | Details |
|---|---|
| OpenClaw with Telegram bot | OpenClaw must already be set up and working with a Telegram bot on your phone before proceeding. This guide only covers configuring it to post into a specific group topic. |
| Telegram account | Active account with admin rights on a Telegram group |
| Telegram group with Topics | A Telegram group with the Topics feature enabled |
| SingIDBot | @SingIDBot — a custom bot built by the author of this guide, used to retrieve the chat ID and topic thread ID. Responds in Singlish, so don't be surprised by the personality. |
With Topics enabled on your group, create a dedicated topic for your OpenClaw bot to keep its messages isolated from other group activity.
Tap the pencil / new topic icon in your group and give it a clear name such as:
Note the topic thread ID — you will retrieve this precisely in Step 2 using SingIDBot.
SingIDBot (@SingIDBot) returns the exact numeric IDs that OpenClaw needs: the group's chat ID and the topic's thread ID.
- Add @SingIDBot to your group and grant it member access.
- Navigate into your OpenClaw-Bot topic (not the General topic) before sending the command.
- Inside the topic, send:
/getids - SingIDBot will reply with a block like this:
Thread ID : 42
User ID : 987654321
Copy the Chat ID and Thread ID. You will pass them to OpenClaw in Step 4.
Rather than editing the .env file manually, ask the OpenClaw agent to write a Python tool that does it for you. The tool only needs the chat ID and topic thread ID — the bot token is already present in the .env from initial setup and does not need to be passed in. Use this prompt in your OpenClaw chat interface:
OpenClaw will scaffold the tool, register it, and confirm it is ready to call. Proceed to Step 4 once the agent confirms the tool is available.
With the IDs from Step 2 in hand, instruct OpenClaw to run the tool using your actual values:
Replace the placeholder values with the IDs from Step 2. After the tool executes, reload OpenClaw so the new environment variables are picked up:
Navigate into the OpenClaw-Bot topic in your Telegram group and post any message. Wait for your OpenClaw bot to reply.
If the group ID and topic ID have been configured correctly, your OpenClaw bot will respond directly inside the topic. If there is no response, double-check the IDs from Step 2 and rerun Step 4.
@SingIDBot is a custom Telegram bot built by the author of this guide. It does one job well: return the IDs you need for bot configuration. It also speaks Singlish, so expect replies like “Wah, your chat ID here lah” — perfectly normal, just read past the flavour text and grab your numbers.
| Command | What it returns | Notes |
|---|---|---|
/getids |
Chat ID, Thread ID (topic), and your User ID | Must be run inside the target topic to get the correct Thread ID |
update_telegram_config tool and environment variable structure are identical — simply run the same steps with Hermes Agent in place of OpenClaw.
✦ This article was generated with the assistance of Claude by Anthropic ✦
Share this:
- Share on X (Opens in new window) X
- Share on Facebook (Opens in new window) Facebook
- Print (Opens in new window) Print
- Email a link to a friend (Opens in new window) Email
- Share on LinkedIn (Opens in new window) LinkedIn
- Share on Reddit (Opens in new window) Reddit
- Share on Tumblr (Opens in new window) Tumblr
- Share on Threads (Opens in new window) Threads
- Share on Pinterest (Opens in new window) Pinterest
- Share on Telegram (Opens in new window) Telegram
- Share on WhatsApp (Opens in new window) WhatsApp
- Share on Bluesky (Opens in new window) Bluesky