Send Telegram bot messages using token and chatIds stored in ~/.codex/telegram-bridge.json. Use this when a user asks to send any text update to Telegram; if news is requested, research it first, then send the composed summary text.
Use this skill to send outbound Telegram messages via bot token from ~/.codex/telegram-bridge.json.
Expected file shape:
{
"botToken": "<telegram-bot-token>",
"chatIds": [123456789]
}
chatIds[0] is used by default when --chat-id is not passed.
Use this skill when the user asks to:
~/.codex/telegram-bridge.json exists and contains botToken.--chat-id is not provided, script uses chatIds[0]; if missing, it falls back to Telegram updates.Send a custom message:
python3 /Users/igor/.codex/skills/telegram-bridge-send/scripts/send_telegram.py \
--message "Build completed successfully"
Send to a specific chat id:
python3 /Users/igor/.codex/skills/telegram-bridge-send/scripts/send_telegram.py \
--chat-id 123456789 \
--message "Hello from Codex"
python3 /Users/igor/.codex/skills/telegram-bridge-send/scripts/send_telegram.py \
--message "Latest AI news:\n1) ...\n2) ..."
Create a helper script (example path: ~/bin/send_ai_news_daily.sh):
#!/usr/bin/env bash
set -euo pipefail
NEWS_TEXT="$(codex exec 'Get latest news about AI (top 5), with short bullet summary and links. Return plain text only, max 1200 chars.')"
python3 /Users/igor/.codex/skills/telegram-bridge-send/scripts/send_telegram.py \
--message "$NEWS_TEXT"
Make it executable:
chmod +x ~/bin/send_ai_news_daily.sh
Add daily cron (every day at 09:00):
crontab -e
0 9 * * * /Users/igor/bin/send_ai_news_daily.sh >> /Users/igor/.codex/logs/send_ai_news_daily.log 2>&1
codex exec is what fetches and composes the news text./start to your bot once, then rerun.