executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
telegramSend messages, photos, and files via Telegram Bot API. Use when you need to send notifications, alerts, or content to Telegram chats, channels, or groups. Supports text formatting, media, and inline keyboards.
Independent GitHub snapshot · Automated classification · Original documentation governs
Send messages to Telegram using a bot token.
mkdir -p ~/.config/telegram
echo "YOUR_BOT_TOKEN" > ~/.config/telegram/bot_token
/start to your bot, then visit:
https://api.telegram.org/bot<TOKEN>/getUpdatesTOKEN=$(cat ~/.config/telegram/bot_token)
CHAT_ID="123456789"
curl -s -X POST "https://api.telegram.org/bot${TOKEN}/sendMessage" \
-H "Content-Type: application/json" \
-d "{\"chat_id\": \"${CHAT_ID}\", \"text\": \"Hello from Clawdbot!\"}"
curl -s -X POST "https://api.telegram.org/bot${TOKEN}/sendMessage" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "'$CHAT_ID'",
"text": "*Bold* _italic_ `code` [link](https://example.com)",
"parse_mode": "MarkdownV2"
}'
Escape these chars in MarkdownV2: _*[]()~>#+-=|{}.!
# From URL
curl -s -X POST "https://api.telegram.org/bot${TOKEN}/sendPhoto" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "'$CHAT_ID'",
"photo": "https://example.com/image.jpg",
"caption": "Image caption"
}'
# From file
curl -s -X POST "https://api.telegram.org/bot${TOKEN}/sendPhoto" \
-F "chat_id=${CHAT_ID}" \
-F "photo=@/path/to/image.jpg" \
-F "caption=Image caption"
curl -s -X POST "https://api.telegram.org/bot${TOKEN}/sendDocument" \
-F "chat_id=${CHAT_ID}" \
-F "document=@/path/to/file.pdf" \
-F "caption=File description"
curl -s -X POST "https://api.telegram.org/bot${TOKEN}/sendMessage" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "'$CHAT_ID'",
"text": "Choose an option:",
"reply_markup": {
"inline_keyboard": [[
{"text": "Option A", "callback_data": "option_a"},
{"text": "Option B", "callback_data": "option_b"}
]]
}
}'
curl -s -X POST "https://api.telegram.org/bot${TOKEN}/sendMessage" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "'$CHAT_ID'",
"text": "Silent notification",
"disable_notification": true
}'
curl -s "https://api.telegram.org/bot${TOKEN}/getUpdates" | jq
Check ok field in response:
{"ok": true, "result": {...}}
{"ok": false, "error_code": 400, "description": "Bad Request: chat not found"}
123456789)-123456789)@channel_username or negative ID