🤖

How I Built a $0 AI News Bot That Posts to Discord (Full Guide)

AI Automation for Beginners 📖 5 min read 📅 2026-08-05

How I Built a $0 AI News Bot That Posts to Discord (Full Guide)

The Problem: 45 Minutes a Day Wasted

Every morning I was doing the same thing: opening 7 news sites, scanning headlines, deciding what mattered, writing summaries, and pasting them into a Discord community. It took 30–45 minutes a day, and honestly? I kept missing stories.

So I built a bot that does it all automatically. It's been running for months, costs $0/month, and posts curated AI news to Discord six times a day. This guide shows you exactly how it works so you can build the same thing — for your niche, your community, your use case.

Full disclosure: this is the exact system powering the Apex Nexus daily AI news digest.


What the Bot Does

Every 4 hours, on schedule:

  1. Fetches articles from 7+ RSS feeds (Hacker News, Hugging Face, Google AI, Lobste.rs, plus niche sources)
  2. Deduplicates by title so nothing repeats
  3. Categorizes each article (AI/ML, Security, Automation, Dev/Infra, Industry)
  4. Summarizes the top stories into a clean digest
  5. Posts the digest to Discord with a link back to the blog
  6. Rebuilds + deploys the website with the latest posts

Total processing: ~3 minutes. Human effort: zero.


The Architecture (Three Pieces)

1. The Fetcher (RSS + Python)

RSS feeds are the backbone. Every feed is free and structured — no APIs, no keys, no rate limits to beg for.

import feedparser

FEEDS = [
    "https://hnrss.org/frontpage",
    "https://huggingface.co/blog/feed.xml",
    "https://blog.google/technology/ai/rss/",
    # add your niche feeds here
]

def fetch_all():
    articles = []
    for url in FEEDS:
        feed = feedparser.parse(url)
        for entry in feed.entries[:10]:
            articles.append({
                "title": entry.title,
                "link": entry.link,
                "summary": clean_html(entry.summary),
                "source": url,
            })
    return articles

Key lesson: always set a User-Agent header. Many feeds reject default library requests.

2. The Brain (Filter + Categorize)

The magic is that this doesn't need to call an AI model at all. Deterministic keyword matching handles 90% of it for free:

CATEGORIES = {
    "AI/ML": ["machine learning", "llm", "openai", "anthropic", "model", "neural"],
    "Security": ["vulnerability", "breach", "malware", "ransomware", "exploit"],
    "Automation": ["automation", "workflow", "agent", "rpa", "pipeline"],
}

def categorize(title, summary):
    text = f"{title} {summary}".lower()
    for category, keywords in CATEGORIES.items():
        if any(k in text for k in keywords):
            return category
    return "General"

Why this matters: AI model calls cost money. Keyword categorization costs nothing, runs in milliseconds, and for a news digester it's plenty smart. We only call a model when we want a polished summary — and even that is optional.

3. The Output (Discord Webhook)

Posting to Discord is one HTTP request. No bot token needed — just a webhook URL:

import requests

WEBHOOK_URL = "https://discord.com/api/webhooks/..."  # from Discord channel settings

def send_to_discord(stories):
    message = "📡 **AI News Digest**\n\n" + "\n".join(
        f"• **{s['title']}**\n  {s['link']}" for s in stories
    )
    requests.post(WEBHOOK_URL, json={"content": message[:1900]})

Pro tip: use Discord embeds for prettier posts — title, link, color, footer. Same API, much better look.


Scheduling: The Piece Everyone Forgets

A bot that doesn't run on schedule isn't a bot, it's a script. We use cron through OpenClaw:

# Every 4 hours
0 */4 * * * cd /path/to/project && python3 news_bot.py

The lesson we learned the hard way: webhooks expire and break silently. Your bot should check its webhook before every run and recreate it if it's gone — ours did 404 for a week before we noticed. Add one line of health-checking, not a week of silence.


The Complete Cost Breakdown

ComponentMonthly Cost
RSS feeds (all free)$0
Python + feedparser (open source)$0
Discord webhooks (free tier)$0
Static site hosting (Vercel free tier)$0
Cron scheduling (local)$0
AI summaries (optional — only when wanted)$0–few dollars
Total$0/month

The whole thing runs on free tiers and open source. This is the killer feature: a production automation with zero recurring cost.


How to Build Yours (Today)

Beginner path (no code, 30 minutes):

  1. Create a Discord channel → Settings → Integrations → Webhooks → copy URL
  2. Use Zapier or IFTTT: trigger = RSS feed, action = Discord webhook
  3. Done. You have a news bot.

Intermediate path (n8n, 1 hour):

  1. RSS Read node → Filter node (keywords) → Discord node
  2. Add an AI node if you want summaries
  3. Schedule with the cron trigger

Advanced path (Python, this guide, 1 afternoon):

  1. Copy the three code blocks above into a project
  2. Add your niche feeds and keywords
  3. Set up cron
  4. Add error handling + webhook health checks (seriously)

What I'd Do Differently

If I built this again, I'd start with the advanced path from day one. The beginner tools work, but you hit their walls fast: per-task fees, black-box failures, no way to customize. Python + RSS + webhooks is the same effort and gives you everything.

And the one thing that made the biggest difference for growth: every digest post links back to the blog, and every blog post links back to the community. Bot → content → community → more members → more reason to build. The loop is the product.


Build It With Us

We run this exact system — and a weekly automation challenge where community members build their own versions. Free to join: https://discord.gg/E5vuXxRtu9

  • 🗺️ Roadmaps & cheat sheets: https://apexnexus.site/resources.html
  • ☕ Enjoyed this guide? Support the free hub: https://ko-fi.com/apexnexus

Ship your bot. Post your build. That's the whole assignment.

📤 Share this guide
𝕏 Post in Share f Share
💬 Build it with a community
Get help, share your build, join challenges — free.
Join AI Nexus Academy →