Automated multilingual news digest delivered to Telegram every 6 hours via GitHub Actions. Fetches from 6 RSS feeds, filters ads, deduplicates, categorizes into News/Tech, and writes one-line summaries in each article's native language using AI.
Total cost: $0/month
┌──────────┐ ┌──────────────┐ ┌───────────────┐ ┌──────────┐
│ 6 RSS │───>│ rss_digest.py│───>│ GitHub Models │───>│ Telegram │
│ Feeds │ │ (feedparser) │ │ gpt-4o / mini │ │ Bot API │
└──────────┘ └──────────────┘ │ / nano │ └──────────┘
│ └───────────────┘
sent.json (dedup, committed to repo)
- Cron every 6h -> fetch up to 10 newest articles per feed
- Filter ads by title prefixes, keywords, and link patterns
- Deduplicate across feeds using word-overlap similarity
- Deduplicate against
sent.jsonhistory (committed to repo) - One AI call categorizes (News/Tech), writes a one-line summary per article in its native language, and filters any remaining ads
- Send compact digest to Telegram (typically 1-2 messages)
| Feed | Language | Type |
|---|---|---|
| Google News DE | German | General news |
| News Mail.ru | Russian | General news |
| Golem | German | Tech |
| Heise | German | Tech |
| MacTechNews | German | Tech (Apple) |
| WinFuture | German | Tech (Windows) |
NEWS
• Bundestag beschließt verschärfte CO2-Ziele ab 2027
• Россия и Китай подписали торговое соглашение на 15%
• EU einigt sich auf strengere KI-Regulierung
TECH
• Apple stellt M5-Chip mit 40% mehr Leistung vor
• Linux 7.0 bringt bessere Energieeffizienz auf Laptops
• Microsoft streicht Windows-Funktion für Millionen Nutzer
• ChatGPT bekommt Langzeitgedächtnis über Sitzungen hinweg
.github/workflows/rss-digest.yml <- GitHub Actions cron job
config.py <- Feeds, models, ad filters, limits
rss_digest.py <- Main script
requirements.txt <- Python dependencies
sent.json <- Dedup state (auto-managed)
- Message @BotFather on Telegram ->
/newbot - Copy the bot token
- Add the bot to your group/channel, send any message
- Visit
https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates - Find the
"chat": {"id": ...}value -- that's your chat ID
Go to Settings -> Secrets and variables -> Actions -> New repository secret:
| Secret | Value |
|---|---|
TELEGRAM_BOT_TOKEN |
Token from BotFather |
TELEGRAM_CHAT_ID |
Chat/channel ID (can be negative for groups) |
GITHUB_TOKENis automatically provided by GitHub Actions -- nothing to configure.
Go to your repo -> Settings -> Copilot -> GitHub Models and enable access. Alternatively, verify at github.com/marketplace/models.
git pushThen: Actions tab -> RSS News Digest -> Run workflow (manual trigger to test).
The bot tries models in order until one succeeds (configured in config.py):
| Priority | Model | Role |
|---|---|---|
| 1 | openai/gpt-4o |
Most capable |
| 2 | openai/gpt-4o-mini |
Good balance |
| 3 | openai/gpt-4.1-nano |
Smallest, fastest |
If all models fail, the bot falls back to sending raw headlines without AI processing.
| Limit | Value | Our Usage |
|---|---|---|
| Requests/day | 150 | 4 (one per 6h run) |
| Requests/min | 15 | 1 |
| Input tokens/req | 8,000 | ~3,000 |
| Output tokens/req | 4,000 | ~2,000 |
| Quota used | ~3%/day |
| Limit | Value | Our Usage |
|---|---|---|
| Minutes/month | 2,000 | ~120 (~1 min x 4 runs/day x 30 days) |
| Quota used | ~6%/month |
Three layers of ad removal:
- Title prefixes --
Anzeige:,Sponsored:,Heise-Angebot:,Реклама:, etc. - Title keywords --
Schnäppchen,Deal des Tages,Rabattaktion,промокод, etc. - Link patterns --
/deal/,/affiliate/,track.adform, etc. - AI filtering -- the AI prompt instructs the model to skip any remaining promotional content
Edit config.py to:
- Add/remove RSS feeds (
FEEDS) - Change articles per feed (
ITEMS_PER_FEED, default: 10) - Reorder or swap AI models (
AI_MODELS) - Adjust temperature or token budget (
AI_TEMPERATURE,AI_MAX_TOKENS) - Add ad filter patterns (
AD_TITLE_PREFIXES,AD_TITLE_KEYWORDS,AD_LINK_KEYWORDS) - Limit stories per section (
MAX_NEWS_STORIES,MAX_TECH_STORIES, default: 15)
- No API keys in code -- all secrets via GitHub encrypted secrets
- GITHUB_TOKEN is auto-scoped per job, expires after the run
- Minimal permissions: only
contents: write(for sent.json) andmodels: read - No external services beyond Telegram API and GitHub Models
- Timeout: workflow limited to 5 minutes, feed fetches limited to 15 seconds each