Install
openclaw skills install telegram-send-photoClawHub Security found sensitive or high-impact capabilities. Review the scan results before using.
Send photos via Telegram Bot API.
openclaw skills install telegram-send-photoThis skill allows sending image files to Telegram using the Bot API. Useful for sharing screenshots, images, or any visual content through Telegram.
pip install requests)import requests
# Configuration
bot_token = "YOUR_BOT_TOKEN"
chat_id = "YOUR_CHAT_ID"
photo_path = "path/to/image.png"
# Send photo
url = f"https://api.telegram.org/bot{bot_token}/sendPhoto"
files = {"photo": open(photo_path, "rb")}
data = {"chat_id": chat_id, "caption": "图片描述"}
resp = requests.post(url, files=files, data=data)
# Check response
if resp.status_code == 200:
print("Photo sent successfully!")
else:
print(f"Failed: {resp.text}")
"rb")chat_id is requiredcaption for optional description8610746914:AAHvbRYhGar_DD81-70IeWSSfkDLyvrWKY08422738233D:\mimoTool\photo\telegram_send_photo.py - Main script# Send a screenshot
photo_path = "D:\\mimoTool\\photo\\20260225_103159.png"
send_photo(photo_path, caption="截图")