Skip to content
Guides

OpenClaw Telegram rich messages and approvals

HTML by default, opting into Bot API 10.3 blocks, the five inline-button scopes, the buttons block and Mini App buttons, the message actions with their gates, emoji lists, and exec approvals from inside Telegram

6 min read

Text is only the start of what a Telegram bot can send: formatted blocks, a keyboard under a message, a Mini App launcher, a reaction on someone else's message, an approval prompt with two buttons. OpenClaw exposes each of those through a small set of config keys and message actions, most of them off until you turn them on. Here is the formatting contract, the button scopes, the actions with their gates, and how an exec approval reaches an approver inside Telegram.

Formatting

  • Outbound text uses standard Telegram HTML by default, readable across current clients, with bold, italic, links, code, spoilers and quotes, and fenced code keeps its literal content and spacing, including fence examples inside the block; the rich-only blocks of Bot API 10.3, native tables, details, rich media and formulas, are not used unless you opt in.
  • With the rich-messages flag on, the agent is told rich messages are available for this bot or account with the supported Markdown and HTML-island authoring contract, Markdown renders through OpenClaw's Markdown intermediate representation as typed rich blocks, headings, tables, details, checklists, rich media, formulas, maps and collages, while media captions still use HTML captions capped at 1024 characters; ordinary rich body text preserves parsed spaces and newlines, entities decode once, escaped tags stay visible text, unsupported HTML stays visible without suppressing the Markdown inside it, long rich text splits automatically across Telegram's limits, and tables over the 20-column limit fall back to a code block.
  • The flag is off by default for client compatibility, because some current Desktop, Web, Android and third-party clients render accepted rich messages as unsupported; keep it off unless every client used with the bot can render them, and the status command shows whether the current session has rich messages on or off.
  • Link previews are on by default, and the link-preview key set to false disables automatic entity detection for rich text; keeping model text away from Telegram's rich-Markdown sigils is also why a currency range like 400 to 600 K dollars is not parsed as a formula.
Mini App buttons only work in private chats between a user and the bot.

Inline buttons

The inline-button capability has five scopes, off, dm, group, all and allowlist, with allowlist as the default, set at the channel and overridden per account; the legacy array form maps to all, an account with an empty capabilities array inherits the channel capabilities, and an explicit off disables buttons. The ask-user tool uses these native controls for one single-select question, one row per choice, with an Other choice that opens Telegram's reply input. A message action carries a presentation with a buttons block, each button a label, an action and an optional style such as success or danger; a callback action returns its value, and a web-app action opens a Mini App URL, which only works in private chats between a user and the bot. Callback values not claimed by a registered plugin interactive handler are passed to the agent as text prefixed with callback data. With durable ingress the callback acknowledgement is sent right after the update is stored, without waiting for earlier handlers in that chat's lane, so Telegram clears its loading indicator early while the button's action still follows normal authorisation and ordered processing.

Actions and approvals

  • The actions are send-message with a target, content and optional media URL, reply ID and thread ID, react with a chat, message and emoji, emoji-list with an optional chat and limit, delete-message, edit-message with content or caption and optional inline buttons where a button-only edit updates the reply markup, and create-forum-topic with a name and optional icon colour or custom emoji, plus the aliases send, react, delete, edit, sticker, sticker-search and topic-create; the send-message, delete-message, reactions and sticker gates default to disabled, reactions covers both react and emoji-list, edit and the forum-topic actions are enabled with no dedicated toggle, and runtime sends use the config and secrets snapshot from startup or reload rather than re-resolving secret references per send.
  • Emoji-list inspects the reactions allowed in the current trusted chat and account, agents cannot inspect another chat while direct operators may pass a different chat ID, the limit defaults to and cannot exceed 100, a chat without restrictions returns the standard reactions with a note saying all of them are allowed, a rejected reaction returns a short sample of allowed standard reactions and custom emoji identifiers unless the lookup itself failed, and you pass a Unicode emoji or a numeric custom emoji identifier straight to react.
  • Exec approvals work in approver DMs and can optionally post prompts in the originating chat or topic, approvers must be numeric user IDs, the enabled key on auto turns them on when at least one approver is resolvable, the approvers list falls back to the numeric owner IDs from the owner allowlist, the target is dm by default with channel and both as alternatives, agent and session filters narrow them, the allowlists that decide who can talk to the bot do not make anyone an approver although the first approved pairing bootstraps the owner list, channel delivery shows the command text so channel or both belong only in trusted groups, a prompt landing in a forum topic keeps that topic for the follow-up, approvals expire after 30 minutes by default, inline approval buttons require the button capability to allow the target surface, and approval IDs prefixed with plugin resolve through plugin approvals while the rest try exec approvals first.

OpenClaw on Telegram is the channel post these surfaces extend, and OpenClaw Telegram message behaviour the delivery model underneath them.

Buttons across channels

The buttons block, the callback value and the approval prompt keep the same shape on every channel that has native components, which is why an agent can ask a yes-or-no question without knowing where it will be answered. OpenClaw Discord components and approvals shows the Discord side of that contract, and OpenClaw reactions the reaction semantics that react and emoji-list implement.

On Diali

Telegram is one of the channels Diali connects from the dashboard, and the generated runtime config is replaced at each release, so the formatting and button keys here describe what a hosted bot can do rather than settings you edit by hand. Telegram on Diali is the channel on Diali and Diali security the boundary that applies to every action a bot can take.

  • HTML by default; rich blocks only when every client can render them.
  • Buttons follow a scope; Mini Apps open in private chats only.
  • Sends, deletes, reactions and stickers stay off until gated on.
Get started

Stop reading about it, build one

Set up an agent, pick a channel, and have it working inside the app you already keep open.