Free cron that checks Channel i Noticeboard every 10 minutes and sends you a Telegram message when a new latest notice appears.
Stack:
- Python stdlib only (
notice_alert.py) - Official, free Telegram Bot API for delivery
- GitHub Actions schedule (free on a public repo)
- Heading
- Direct notice link (
https://channeli.in/noticeboard/notice/{id}) - Category, uploader, created/modified time, expiry, important flag
- Short plain-text summary from the notice body
- Useful links found in the notice (forms, PDFs, etc.)
- Open @BotFather in Telegram.
- Send
/newbot, choose a name and username, then copy the bot token. - Open your new bot and press Start (or send it any message).
- Visit this URL in a browser, replacing
<TOKEN>:https://api.telegram.org/bot<TOKEN>/getUpdates - Find
message.chat.idin the JSON response. That number is your chat ID. - Keep both values private as GitHub Actions secrets.
- Create a public GitHub repository and push this project.
- Scheduled workflows are free for public repos.
- On free private repos,
scheduletriggers are typically disabled.
- In the repo: Settings → Secrets and variables → Actions, add:
TELEGRAM_BOT_TOKEN— token issued by BotFatherTELEGRAM_CHAT_ID— numericmessage.chat.idfromgetUpdates
- Optional (only if Channel i starts requiring login for the API):
CHANNELI_COOKIES— full cookie header, orCHANNELI_CSRFTOKEN+CHANNELI_SESSION
- Open Actions → Noticeboard Telegram Alert → Run workflow.
- First try with
dry_run = trueto verify fetch/format. - Then run with defaults to send a real Telegram message.
- First try with
- Leave the workflow enabled. Cron is
*/10 * * * *(every 10 minutes UTC).
GitHub may delay scheduled jobs by several minutes. That is expected.
# Print the latest notice message without sending
python3 notice_alert.py --dry-run
# Send for real (requires env vars)
export TELEGRAM_BOT_TOKEN='123456789:your-token'
export TELEGRAM_CHAT_ID='123456789'
python3 notice_alert.py
# Resend current latest even if already notified
python3 notice_alert.py --forceState is stored in .notice_state.json (gitignored). On GitHub Actions the same file is restored/saved via the Actions cache so duplicates are skipped across runs.
python3 -m unittest discover -s tests -v- First successful send stores the notice
id. - Later runs skip Telegram if page-1 latest
idis unchanged. - When a newer notice becomes the latest, a new message is sent.
- Never commit Telegram bot tokens, chat IDs in secret files, or Channel i session cookies.
- Prefer a public repo with Actions secrets over putting credentials in code.
- Revoke exposed Telegram tokens through BotFather and rotate exposed Channel i credentials.