Send messages or images to Jorge's Telegram chat. Use when the user wants to send a notification, message, or image to Jorge via Telegram.
Send text messages or images to Jorge's Telegram chat using the Telegram Bot API.
The following environment variables must be set in .env:
TELEGRAM_BOT_TOKEN — Bot token from @BotFatherTELEGRAM_CHAT_ID — Jorge's chat ID (already configured)TELEGRAM_RECIPIENT_NAME — Recipient name for confirmation (already configured)Use the Bash tool to make a curl request to the Telegram Bot API:
curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
-H "Content-Type: application/json" \
-d "{\"chat_id\": \"${TELEGRAM_CHAT_ID}\", \"text\": \"MESSAGE_HERE\", \"parse_mode\": \"Markdown\"}"
.env:
source <(grep -E '^TELEGRAM_' .env | sed 's/^/export /')
"ok":true means success.TELEGRAM_RECIPIENT_NAME).curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendPhoto" \
-F "chat_id=${TELEGRAM_CHAT_ID}" \
-F "photo=@/path/to/image.jpg" \
-F "caption=Optional caption here"
curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendPhoto" \
-H "Content-Type: application/json" \
-d "{\"chat_id\": \"${TELEGRAM_CHAT_ID}\", \"photo\": \"IMAGE_URL_HERE\", \"caption\": \"Optional caption\"}"
.env.-F).curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendDocument" \
-F "chat_id=${TELEGRAM_CHAT_ID}" \
-F "document=@/path/to/file.pdf" \
-F "caption=Optional caption here"
*bold*_italic_`inline code` code block [link text](URL).env before making API calls.TELEGRAM_BOT_TOKEN is not set, inform the user they need to:
.env as TELEGRAM_BOT_TOKEN=your-token-here