Urgent.News

What's breaking now, across thousands of outlets.

AI

Building a Serverless AI Tech-News Bot with Node.js, Gemini and GitHub Actions

I wanted to build a project that combined several technologies into one practical automation pipeline: Node.js Web scraping RSS Offline NLP Generative AI Telegram Discord GitHub Actions Vercel The result is the Chaos Routine Bot , a serverless technology-news agent that runs every morning and generates an AI-assisted briefing. GitHub repository:…

The Chaos Routine Bot is a serverless AI technology-news bot that runs automatically every morning to generate an AI-assisted briefing on the latest tech stories. The bot is built using Node.js and combines several technologies for a practical automation pipeline.

The high-level pipeline includes:

1. Randomly selecting two technology news sources from a pool that includes Hacker News, Reddit, Lobste.rs, Dev.to, InfoQ, BleepingComputer, Krebs on Security, TechCrunch, AI ServeTheHome, Phoronix, TechXplore, ScienceDaily, and Nanotechnology.

2. Filtering out non-technology content using a negative keyword list and a technology whitelist. This ensures only relevant tech articles are processed further.

3. Cleaning the extracted article content using JSDOM and Mozilla Readability libraries to produce a more readable structure.

4. Applying offline NLP with the Compromise library to create a concise summary of the article, taking the first three sentences after processing.

5. Generating the final briefing using Gemini 2.5 Flash. The model is given a persona of a tired senior software engineer to create a consistently sarcastic and engaging editorial style.

6. Providing a graceful AI fallback that uses offline summaries if no Gemini API key is available.

7. Delivering the generated briefing to both Telegram and Discord platforms using the Telegram Bot and Discord webhook APIs, respectively.

8. Creating a static JSON file and an RSS feed containing the briefing information for easy access by readers.

9. Automating the entire process using GitHub Actions, which runs at 02:30 UTC (08:00 IST) and deploys the generated output using the Vercel CLI. The workflow keeps all credentials in GitHub secrets to avoid committing real API keys or bot tokens to Git.

This architecture separates the responsibilities of each component, making it easier to debug and providing a useful fallback path if external APIs become unavailable. The complete source code is available on GitHub at https://github.com/starJeet000/Telegram-News-Scraper-Bot.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

Stop Burning AI Tokens: Why 'kern' is the Local Code-Intelligence Engine We've Been Waiting For , Face off Graphify vs Code Review Graph vs Kern

If you are using AI coding assistants like Claude Code, Cursor, or Codex , you already know the sinking feeling of watching your context window evaporate.

  • kern is a local code-intelligence engine with pure-Go implementation
  • 500-2,500 token usage reduces AI coding assistant context window exhaustion by 45%-80%
  • kern employs zero-telemetry, local-first policy with sandboxing for enterprise security

More from Monday 21 September →