A Telegram bot that sends alerts ~2 hours before coding contests on:
- 🟦 Codeforces
- 🟨 LeetCode (optional extension)
- 🟫 CodeChef (optional / unstable API)
🚀 Fully serverless — runs on GitHub Actions (FREE) ⚡ No backend required 🔔 No spam (duplicate-safe)
your-repo/
├── contest_alert.py
├── sent.json
└── .github/
└── workflows/
└── contest_alert.yml
- Open Telegram → search @BotFather
- Send
/newbot - Follow steps → copy your Bot Token
- Start chat with your bot (send "hi")
- Open:
https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates
- Find:
"chat": { "id": 123456789 }
-
Go to GitHub → New Repository
-
Upload:
contest_alert.py.github/workflows/contest_alert.yml
Go to:
Repo → Settings → Secrets → Actions
Add:
| Name | Value |
|---|---|
| TELEGRAM_BOT_TOKEN | your bot token |
| TELEGRAM_CHAT_ID | your chat id |
- Open Actions tab
- Enable workflows
- Click Run workflow (for testing)
- Runs every 30 minutes (optimized for free tier)
- Checks contests starting in:
105 to 125 minutes (≈ 2 hours)
- Sends alert via Telegram
- Stores sent contests in
sent.jsonto avoid duplicates
⏰ Contest Alert — 112 mins left!
🔵 Codeforces Round 987 (Div. 2)
📌 Platform: Codeforces
🕐 Starts: 2026-04-10 14:35 UTC
🔗 https://codeforces.com/contest/987
- ✅ Serverless (GitHub Actions)
- ✅ Duplicate prevention
- ✅ Free forever (within limits)
- ✅ Easy setup (5 min)
- ✅ Extendable
GitHub provides:
2000 minutes/month
Runs every 30 min → 48 runs/day
→ ~1440 min/month ✅ SAFE
❌ Do NOT use 15 min cron (will exceed limit)
| Issue | Fix |
|---|---|
| No alerts | Run workflow manually & check logs |
| Telegram 401 | Invalid bot token |
| Telegram 400 | Start chat with bot first |
| No contests detected | Check API response / timing window |
- 🔔 10-minute reminder before contest
- 👥 Multi-user support (multiple chat IDs)
- 🧠 AI contest recommendations
- 📅 Google Calendar sync
- 📊 Difficulty-based filtering
- Codeforces API is reliable ✅
- LeetCode uses GraphQL (can be added)
- CodeChef API is unstable
⚠️
Pull requests are welcome! Feel free to add:
- New platforms
- UI improvements
- Smarter alerts
If you like this project:
- ⭐ Star the repo
- 🍴 Fork it
- 📢 Share with friends
Build once. Never miss a contest again.
Happy Coding 🚀