One-tap
execapprovals in Telegram β no more typing/approve <uuid> allow-once.
OpenClaw's Discord has built-in approval buttons. Telegram doesn't β you're stuck typing long /approve commands. This plugin fixes that.
Features:
- β One-tap approvals β Allow Once Β· π Always Β· β Deny
- π Auto-resolve β edits the message after decision (removes buttons, shows result)
- β° Expiry handling β stale approvals auto-cleaned and marked as expired
- π©Ί Self-diagnostics β
/approvalstatuschecks health and stats - π‘οΈ Graceful fallback β if buttons fail, the original text goes through
- π¦ Zero dependencies β uses only Node.js built-in
fetch
openclaw plugins install telegram-approval-buttonsThat's it β OpenClaw downloads it from npm and enables it automatically.
Alternative: install from source (for development)
git clone https://github.com/JairFC/openclaw-telegram-approval-buttons.gitThen add the path manually to your openclaw.json:
Open your ~/.openclaw/openclaw.json and add two things:
- Exec approvals targeting Telegram β without this, approvals stay as plain text
- Plugin config with your bot token and chat ID β the plugin needs these to send buttons
{
"approvals": {
"exec": {
"enabled": true,
"mode": "targets",
"targets": [
{
"channel": "telegram",
"to": "<your_telegram_chat_id>"
}
]
}
},
"plugins": {
"entries": {
"telegram-approval-buttons": {
"enabled": true,
"config": {
"botToken": "<your_bot_token>",
"chatId": "<your_telegram_chat_id>"
}
}
}
}
}π‘ Where to find these values:
- Bot token β the token you got from @BotFather when creating your bot. It's the same token OpenClaw uses for Telegram.
- Chat ID β your Telegram user ID. Send a message to @userinfobot to get it, or check
openclaw logs --followafter sending a message to your bot.
openclaw gateway restartThen send /approvalstatus in your Telegram chat. You should see:
π’ Approval Buttons Status
Config: chatId=β Β· token=β
Telegram: β connected (@your_bot)
Pending: 0 Β· Processed: 0
Uptime: 1m
β οΈ If you seeDISABLED β missing config, the plugin can't find your bot token or chat ID. Double-check thatbotTokenandchatIdare set inplugins.entries.telegram-approval-buttons.configin your~/.openclaw/openclaw.json.
That's it! Next time the AI triggers an exec approval, you'll get inline buttons instead of text.
- OpenClaw β₯ 2026.2.9 installed and running
- Node.js β₯ 20 (uses built-in
fetch) - Telegram configured in your
openclaw.json(bot token +allowFrom) - Exec approvals targeting Telegram β see Step 2 above
βββββββββββββββ message_sending ββββββββββββββββββββ
β OpenClaw β ββ approval text βββ β Plugin β
β Gateway β β β
β β cancel original β 1. Parse text β
β β βββββββββββββββββββββ β 2. Send buttons β
βββββββββββββββ β 3. Track pending β
ββββββββββ¬ββββββββββ
β
Telegram Bot API
β
ββββββββββΌββββββββββ
β Telegram Chat β
β β
β π Exec Approval β
β [β
Allow] [π] β
β [β Deny] β
ββββββββββββββββββββ
When you tap a button, OpenClaw converts the callback_data into a synthetic text message β no webhook needed.
The plugin auto-detects botToken and chatId from your Telegram channel config. Most setups need zero extra configuration.
| Setting | Priority 1 (explicit) | Priority 2 (shared config) | Priority 3 (env) |
|---|---|---|---|
botToken |
pluginConfig.botToken |
channels.telegram.token |
TELEGRAM_BOT_TOKEN |
chatId |
pluginConfig.chatId |
channels.telegram.allowFrom[0] |
TELEGRAM_CHAT_ID |
{
"plugins": {
"entries": {
"telegram-approval-buttons": {
"enabled": true,
"config": {
"chatId": "123456789", // Override auto-detected chat ID
"botToken": "123:ABC...", // Override auto-detected bot token
"staleMins": 10, // Minutes before stale cleanup (default: 10)
"verbose": false // Diagnostic logging (default: false)
}
}
}
}
}Q: I installed the plugin but I still get old text approvals.
A: Most likely your approvals.exec section is missing or doesn't target Telegram. Make sure you have "mode": "targets" with a target pointing to "channel": "telegram" β see Step 2 above. Restart the gateway after changing the config.
Q: I installed the plugin but no buttons appear at all.
A: Make sure tools.exec.ask is NOT set to "off" in your config. If it's "off", there are no approvals to buttonize. Set it to "on-miss" or "always".
Q: How do I find my Telegram Chat ID?
A: Send /start to @userinfobot on Telegram β it replies with your ID. Alternatively, check https://api.telegram.org/bot<TOKEN>/getUpdates after sending a message to your bot.
Q: Do I need to set up a webhook?
A: No! OpenClaw's Telegram integration automatically converts button taps into synthetic text messages. No extra setup needed.
Q: What happens if the plugin fails to send buttons?
A: The original plain-text approval message goes through normally. The plugin never blocks approvals.
Q: Does this work in group chats?
A: Yes, but the bot needs to be an admin or it needs permission to edit its own messages.
| Problem | Fix |
|---|---|
DISABLED β missing config in logs |
Add botToken and chatId to plugins.entries.telegram-approval-buttons.config in your ~/.openclaw/openclaw.json. See Step 2. |
| Still getting old text approvals | Your approvals.exec config must target Telegram. See Step 2. |
/approvalstatus says "unknown command" |
Plugin didn't load. Run openclaw plugins install telegram-approval-buttons and restart the gateway. |
| No buttons appear | Check tools.exec.ask is not "off". Run /approvalstatus to check config. |
| Buttons show but nothing happens | Bot needs message editing permission. Use a private chat or make bot admin. |
/approvalstatus says "token=β" |
Set botToken in plugin config. See Step 2. |
/approvalstatus says "chatId=β" |
Set chatId in plugin config. See Step 2. |
| Buttons say "expired" | Approval timed out before you tapped. Adjust staleMins if needed. |
telegram-approval-buttons/
βββ index.ts # Entry point β orchestration only
βββ types.ts # Shared TypeScript interfaces
βββ lib/
β βββ telegram-api.ts # Telegram Bot API client (isolated)
β βββ approval-parser.ts # Parse OpenClaw approval text format
β βββ message-formatter.ts # HTML formatting for Telegram messages
β βββ approval-store.ts # In-memory pending approval tracker
β βββ diagnostics.ts # Config resolution, health checks
βββ openclaw.plugin.json # Plugin manifest
βββ package.json
Issues and PRs welcome. Each file in lib/ is self-contained with a single responsibility.

{ "plugins": { "load": { "paths": ["/path/to/openclaw-telegram-approval-buttons"] } } }