An intelligent, AI-powered newsletter automation system built with n8n that collects, categorizes and distributes technology news from multiple RSS feeds.
This n8n workflow automatically:
- Fetches articles from technology RSS feeds
- Filters and deduplicates content
- Uses AI to categorize articles into 5 tech domains
- Ranks articles by relevance using keyword frequency
- Generates AI-powered summaries
- Creates a beautifully formatted HTML newsletter
- Stores data in CockroachDB and Airtable
- Sends weekly newsletters via Gmail
- Triggers every Saturday at 7:00 AM
- Initiates the entire newsletter generation pipeline
Aggregates content from curated sources:
- AI/ML: TechCrunch, MIT News, Ars Technica, Wired, TechXplore
- Cloud Computing: AWS Blog, Google Cloud Blog, Cloud Computing News, CloudTweaks, Thomas Maurer
- IoT: Ars Technica IoT, IoT Now, IoT Analytics, IoT Tech News
- Automation: n8n Blog
- Converts the RSS feed array into individual items
- Enables parallel processing of each feed
- Fetches article content from each RSS feed
- Extracts: title, link, publication date, content snippet
- Handles XML/RSS parsing
- Eliminates duplicate articles by comparing titles
- Ensures unique content in the newsletter
- Date Filter: Articles published after the last 4 days (pubDate > now - 4 days)
- Keyword Filter (OR logic):
- n8n
- AI / Artificial Intelligence
- ML / Machine Learning
- Cloud Computing
- IoT / Internet of Things
Standardizes article data structure:
{
"title": "Article Title",
"contentSnippet": "Article preview text",
"pubDate": "2024-12-01T10:00:00Z",
"link": "https://example.com/article"
}AI-Powered Category Assignment
Uses Google Gemini LLM to intelligently categorize articles:
- Input: Article title + content snippet
- Output: Category from predefined enum
- Categories:
- Artificial Intelligence
- Machine Learning
- Cloud Computing
- Internet of Things
- n8n / Automation
Synonym Mapping:
'ML' → 'Machine Learning'
'AI' → 'Artificial Intelligence'
'IoT' → 'Internet of Things'
'AWS', 'Azure', 'GCP' → 'Cloud Computing'
- Combines normalized articles with AI-assigned categories
- Input 1: Articles from Normalize Fields
- Input 2: Categories from Information Extractor
- Merge mode: Combine by position
- Ensures each article has complete metadata
Smart Relevance-Based Selection
Selects the top 2 articles per category using a three-tier ranking system:
- Primary: Keyword count in title (highest first)
- Secondary: Keyword count in content (tie-breaker)
- Tertiary: Publication date (newest first, final tie-breaker)
Logic - sort priority:
titleCountB - titleCountA → contentCountB - contentCountA → dateB - dateA
- Combines balanced articles into a single JSON object
- Prepares payload for LLM processing
- Condition:
new Date().getDay().toString()equals"6" - Gates the newsletter distribution
- Only proceeds on Saturday
AI-Powered Summary Generation
Uses Google Gemini Model to generate professional summaries for each article:
- Creates 3-sentence summaries in English
- Preserves original titles, links and category assignments
- Outputs structured JSON array with: title, summary, link, category_name
- Uses Structured Output Parser for JSON schema validation
Generates the complete HTML newsletter from LLM output.
Features:
- Category-based color coding
- Emoji icons per category
- Responsive card layout
- Professional typography
- Adds header: Technology Newsletter
- Converts Markdown to HTML
Output: Fully styled HTML newsletter ready for email
- Splits the output field from LLM response
- Converts JSON array into individual article records
- Enables simultaneous storage for:
- CockroachDB upsert
- Airtable upsert
Wraps the newsletter content in styled HTML container.
Each category has custom:
- Colors
- Icons
- Background style
Output: HTML rendered inside Gmail.
Stores articles in PostgreSQL-compatible database.
Syncs articles to Airtable for easy management.
Sends the newsletter via Gmail.
Configuration:
- Subject: "Technology Newsletter - [Current Date]"
- Format: "December 2, 2025"
- Body: HTML content from "Add HTML Styles"
Trigger: Only executes if "Check if it's Saturday" = true
- Provides Google Gemini AI capabilities
- Connected to both:
- Information Extractor (for category assignment)
- Basic LLM Chain (for summary generation)
- Model: gemini-2.5-flash
The generated newsletter includes:
- Header: " Technology Newsletter"
- Subtitle: "Your weekly tech digest"
- Categorized Sections: Articles grouped by topic with:
- Category icon and name
- Article title (clickable link)
- 3-sentence AI-generated summary
- "Read article" call-to-action
- Color-coded Design: Each category has unique colors
- AI-Powered: Automatic categorization and summarization
- Smart Ranking: Relevance-based article selection
- Automated: Runs & sends weekly
- Professional Design: Beautiful HTML formatting
- Multi-Storage: CockroachDB + Airtable backup
- Deduplication: Ensures unique content
- Structured Data: JSON schema validation



