Build a serverless Node.js AI news bot with Gemini, GitHub Actions, Telegram, RSS scraping, NLP, Discord and Vercel
What if you could wake up every morning and have a bot deliver a concise briefing about what's happening across the technology world—without running a server 24/7?
That's the idea behind my Chaos Routine Bot, an automated Telegram news agent built with Node.js, Gemini 2.5 Flash, GitHub Actions and Vercel.
The project is available on GitHub:
https://github.com/starJeet000/Telegram-News-Scraper-Bot
What Does It Do?
The bot automatically collects technology news from multiple sources, removes irrelevant stories, extracts useful facts, sends the cleaned information to Gemini, and delivers an AI-generated briefing.
The interesting part isn't simply calling an AI API.
The project creates a pipeline around the AI.
The flow looks roughly like this:
News Sources → Filtering → Article Extraction → Offline NLP → Gemini → Telegram/Discord → Web Dashboard/RSS
![]() |
The project uses GitHub Actions as its scheduler.
A workflow runs every morning at 08:00 IST. An Ubuntu runner starts the Node.js application, executes the scraping pipeline, generates the briefing and deploys the generated public files.
This means there is no traditional server that needs to remain running.
The workflow can also be triggered manually through GitHub Actions.
2. Randomized Tech-News Sources
Instead of depending on a single news website, the scraper contains a pool of sources covering areas such as:
Hacker News
Reddit technology communities
Dev.to
Lobste.rs
InfoQ
BleepingComputer
Krebs on Security
TechCrunch AI
MIT Technology Review AI
Phoronix
ServeTheHome
TechXplore
Ars Technica
For every execution, the bot randomly selects two sources.
That creates a slightly different information mix each day.
3. Filtering Before AI Processing
One of the things I wanted to avoid was sending everything directly to an LLM.
The scraper applies a technology-focused filter before the article reaches the AI stage.
It uses:
A negative keyword blocklist
A technical keyword whitelist
Source-specific extraction logic
This helps reduce irrelevant stories before spending AI processing on them.
4. Cleaning Articles Before Summarization
Once a story is selected, the application fetches its HTML.
Instead of passing the entire webpage to Gemini, the project uses Mozilla Readability + JSDOM to extract the actual article content and remove things such as navigation and webpage clutter.
This is followed by offline NLP processing using Compromise.
The current implementation extracts up to three sentences from the cleaned article.
So the pipeline effectively becomes:
Web Page
↓
HTML
↓
Mozilla Readability
↓
Clean Article Text
↓
Compromise NLP
↓
Core Facts
↓
Gemini
5. Gemini Generates the Briefing
The extracted facts are then passed to Gemini 2.5 Flash.
Instead of asking for a generic summary, the project uses a specific persona: an exhausted senior software engineer who has already had four cups of coffee.
The result is designed to be a short, sarcastic briefing about the latest technology stories.
That gives the output a personality rather than making it feel like another generic RSS digest.
6. There Is an Offline Fallback
This is one of the more important engineering details.
If the Gemini API key isn't available, or if the Gemini request fails, the application doesn't simply stop.
It falls back to the previously extracted offline NLP facts.
That means the pipeline can still produce useful output without the AI generation step.
Gemini available?
│
┌──┴──┐
YES NO
│ │
Gemini Offline NLP
│ │
└──┬───┘
↓
Briefing
7. More Than Just Telegram
Although Telegram is the primary delivery channel, the project also supports Discord through a webhook.
The application additionally generates:
index.htmlbriefing.jsonrss.xml
The JSON file acts as a static API containing the briefing and evidence behind it.
The RSS feed makes the generated briefings accessible through RSS-compatible readers.
8. Vercel Deployment
The GitHub Actions workflow also handles deployment.
After generating the public files, the workflow installs the Vercel CLI and deploys the production output.
So the complete automation looks like:
GitHub Actions
↓
Node.js scraper
↓
News filtering
↓
Article extraction
↓
Offline NLP
↓
Gemini
↓
Telegram + Discord
↓
JSON + RSS + Dashboard
↓
Vercel
Tech Stack
The project currently uses:
Node.js
Google Gemini 2.5 Flash
Cheerio
JSDOM
Mozilla Readability
Compromise NLP
RSS Parser
Feed
Telegram Bot API
Discord Webhooks
GitHub Actions
Vercel
dotenv
The dependencies are defined in the project's package.json.
Why I Built It
The goal wasn't to build another RSS reader.
I wanted to experiment with a more complete automation pipeline:
collect → filter → extract → understand → generate → distribute → deploy
It also demonstrates how AI can be used as one component inside a larger software system rather than being the entire application.
What's Interesting About the Architecture?
The biggest lesson from this project is that the AI doesn't have to do everything.
Traditional approach:
News → LLM → Summary
This project takes a more structured approach:
News
↓
Filtering
↓
Content Extraction
↓
Offline NLP
↓
Small Context
↓
Gemini
↓
Distribution
That separation makes the system easier to reason about and gives the application a fallback when the AI service isn't available.
Try the Project
The complete source code is available on GitHub:
https://github.com/starJeet000/Telegram-News-Scraper-Bot
If you're interested in Node.js automation, web scraping, NLP, generative AI, GitHub Actions or serverless applications, this project is a useful example of how those pieces can fit together.

Comments
Post a Comment
Thanks for reading! Feel free to drop a question or feedback