Tickd.ai
← The Tickd Guide

Tutorials & Guides

How to Build an Automated RSS Feed Summariser and Slack Alert Bot Using Gemini 1.5 Flash and Python

Drown in RSS feeds no more. Build an automated cron job that fetches RSS updates, uses Gemini 1.5 Flash to generate technical summaries, and sends direct reports to your Slack.

Updated 10/27/2026

In our quest to stay updated with the latest updates, software engineering patterns, and developer tools, we often end up subscribing to dozens of RSS feeds. The inevitable result? A massive backlog of unread articles that sits in our RSS reader, mocking us.

Let’s automate this. Instead of manually parsing through hundreds of raw headlines, we can build a lightweight pipeline that polls your favourite feeds, uses Gemini 1.5 Flash to generate highly concise, bulleted summaries of the day’s top tech news, and pushes them directly into a private Slack channel.

Why Gemini 1.5 Flash? Because its cost-to-performance ratio is unmatched for processing large text batches, and its context window handles verbose articles without breaking a sweat. If you're comparing engines, you can see why many choose this for heavy lifting over other setups on our /platforms/gemini page.

Architectural Overview

Our automation script will perform the following steps: 1. Parse a list of pre-defined RSS feeds using Python's feedparser. 2. Filter out already-read articles using a simple local file-based database (SQLite). 3. Send the raw text of new articles to the Gemini API using the gemini-1.5-flash model. 4. Compile the summaries into a clean Slack markdown payload. 5. Post the payload directly to a Slack incoming webhook.

Which AI should I use for this?

Tickd is independent and not affiliated with any AI company.

Prerequisites

Make sure you have a Python 3.9+ environment ready and install the necessary dependencies:

`bash pip install feedparser google-generativeai requests `

You will also need: - A Gemini API key, which you can get via Google AI Studio. - A Slack Incoming Webhook URL for the channel you want to post to.

Step 1: Setting Up the SQLite Database

We don't want to get alerted about the same articles every time the cron job runs. A lightweight SQLite database keeps track of previously processed URLs so that we only parse new content.

Create a file called summariser.py and start with the database initialization code:

`python import sqlite3 import os

DB_FILE = "processed_articles.db"

def init_db(): conn = sqlite3.connect(DB_FILE) cursor = conn.cursor() cursor.execute(""" CREATE TABLE IF NOT EXISTS articles ( url TEXT PRIMARY KEY, processed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ) """) conn.commit() conn.close()

def is_article_processed(url): conn = sqlite3.connect(DB_FILE) cursor = conn.cursor() cursor.execute("SELECT 1 FROM articles WHERE url = ?", (url,)) result = cursor.fetchone() conn.close() return result is not None

def mark_article_processed(url): conn = sqlite3.connect(DB_FILE) cursor = conn.cursor() cursor.execute("INSERT OR IGNORE INTO articles (url) VALUES (?)", (url,)) conn.commit() conn.close() `

Step 2: Fetching and Parsing RSS Feeds

Now we’ll write the logic to fetch and parse your RSS feed array. We will grab the title, link, and content summary:

`python import feedparser

FEEDS = [ "https://hnrss.org/frontpage", # Hacker News Front Page "https://simonwillison.net/atom/entries/", # Simon Willison's Weblog ]

def fetch_new_articles(): new_articles = [] for feed_url in FEEDS: feed = feedparser.parse(feed_url) for entry in feed.entries[:5]: # Check the latest 5 entries per feed url = entry.link if not is_article_processed(url): # Fallback to summary if full content isn't in feed content = entry.get("content", [{"value": entry.get("summary", "")}])[0]["value"] new_articles.append({ "title": entry.title, "url": url, "content": content }) return new_articles `

Step 3: Getting Structured JSON Summaries

Instead of letting the model output raw markdown text, we can use Gemini's structured output generation to get a reliable JSON schema back. This ensures we can format our Slack block kit nicely without relying on fragile regex parsers.

Let's write the LLM call using the official Google GenAI SDK:

`python import google.generativeai as genai import json

genai.configure(api_key=os.environ.get("GEMINI_API_KEY"))

def generate_summaries(articles): if not articles: return None

Setup structure definition prompt = "You are a technical news filter. Summarise these articles with a technical, clear tone.\n\n" for idx, art in enumerate(articles): prompt += f"ID: {idx}\nTitle: {art['title']}\nURL: {art['url']}\nContent: {art['content']}\n---\n"

Request JSON output structure generation_config = { "response_mime_type": "application/json", "response_schema": { "type": "ARRAY", "items": { "type": "OBJECT", "properties": { "title": {"type": "STRING"}, "url": {"type": "STRING"}, "key_takeaways": { "type": "ARRAY", "items": {"type": "STRING"} } }, "required": ["title", "url", "key_takeaways"] } } }

model = genai.GenerativeModel("gemini-1.5-flash") response = model.generate_content(prompt, generation_config=generation_config) return json.loads(response.text) `

If you run into any rate limits or strange API payload issues while scaling this up, refer to our debugging documentation at /platforms/gemini/articles.

Step 4: Formatting and Posting to Slack

Now we take that clean JSON data and convert it into Slack-friendly Markdown blocks before sending it via a webhook:

`python import requests

SLACK_WEBHOOK_URL = os.environ.get("SLACK_WEBHOOK_URL")

def format_slack_message(summaries): blocks = [ { "type": "header", "text": {"type": "plain_text", "text": "🤖 Daily Developer Briefing", "emoji": True} } ]

for item in summaries: bullets = "\n".join([f"• {takeaway}" for takeaway in item["key_takeaways"]]) blocks.append({ "type": "section", "text": { "type": "mrkdwn", "text": f"<{item['url']}|{item['title']}>\n{bullets}" } }) blocks.append({"type": "divider"})

return {"blocks": blocks}

def post_to_slack(payload): if not payload: return response = requests.post(SLACK_WEBHOOK_URL, json=payload) if response.status_code != 200: raise ValueError(f"Slack API error: {response.status_code}, {response.text}") `

Step 5: Putting It All Together

Let’s assemble our main runner function. It initialises our database, checks for new articles, processes them, sends them to Slack, and updates our SQLite store:

`python def main(): init_db() print("Polling RSS feeds...") articles = fetch_new_articles()

if not articles: print("No new articles since last check.") return

print(f"Found {len(articles)} new articles. Processing with Gemini...") summaries = generate_summaries(articles)

if summaries: print("Formatting and posting to Slack...") payload = format_slack_message(summaries) post_to_slack(payload)

Mark processed only after successful transmission for art in articles: mark_article_processed(art["url"]) print("Completed successfully!")

if __name__ == "__main__": main() `

Automation and Scheduling

To make this run reliably on autopilot, schedule this script using a standard cron job. Open your crontab config file:

`bash crontab -e `

And add the following line to run the summariser every weekday morning at 8:00 AM:

`bash 0 8 1-5 export GEMINI_API_KEY="your_api_key_here" && export SLACK_WEBHOOK_URL="your_webhook_url_here" && /usr/bin/python3 /path/to/summariser.py `

Now, you have an automated feed assistant that parses high-volume noise into high-value text digests, keeping you sharp without losing half your morning to feed scrolling.

geminipythonautomationrssslack

Keep going

Build something with the prompt generator, decode the jargon in the glossary, or compare the tools on our platform deep-dives.