The Telegram bot
The fifth way to reach the agent — for when "a notification came in, it has to be answered right now, and the computer is far away". It needs no inbound route to the machine: the bot reaches out by itself.
How to link it
- Get a token from @BotFather and put it into the app settings (under docker —
TELEGRAM_BOT_TOKENin.env). - Press "Get code" and send the bot
/start CODE. The code lives for 10 minutes.
The bot sets its own command list and menu button, so there is no need to go to @BotFather for that.
What it can do
- sends the agent's questions as answer buttons — the answer goes into the session;
- sends finished replies in full;
- an ordinary message goes into a session: if you didn't pick one, it goes to the one that is working right now.
Commands: /chats, /new, /where, /agents, /status, /stop, /app. Anything more complex than a reply is opened by a button in the web UI itself.
What a reply looks like
A rich message with the original Markdown: headings, aligned tables, lists and tasks, quotes, footnotes, formulas and spoilers are rendered by Telegram itself, and the message limit is 32768 characters instead of 4096.
If the Bot API can't do that, the bot notices once and from then on sends the old HTML markup, where a wide table unfolds line by line instead of running off into horizontal scrolling.
A linked chat means the machine owner's rights
A chat linked to the bot writes to the agent with your rights. That is why linking goes through a one-time code, and why the bot stays silent to an unknown chat. For a chat that only needs notifications there is a "read only" mode.
The one trouble everybody trips over
409 Conflict means one bot is being run by two: one token, one polling loop. Clauder in docker and the same Clauder in the app cannot hold one bot together — create a second bot or switch polling off in one of them.