Skip to content

GroveBdg/AI-Powered-Automated-Tech-Newsletter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

AI-Powered Automated Tech Newsletter

An intelligent, AI-powered newsletter automation system built with n8n that collects, categorizes and distributes technology news from multiple RSS feeds.

Workflow Overview

Overview

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

Architecture

Workflow Components

1. Schedule Trigger

  • Triggers every Saturday at 7:00 AM
  • Initiates the entire newsletter generation pipeline

2. RSS Feeds

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

3. Split Out RSS Items

  • Converts the RSS feed array into individual items
  • Enables parallel processing of each feed

4. RSS Read

  • Fetches article content from each RSS feed
  • Extracts: title, link, publication date, content snippet
  • Handles XML/RSS parsing

5. Remove Duplicates

  • Eliminates duplicate articles by comparing titles
  • Ensures unique content in the newsletter

6. Filter

  • 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

7. Normalize Fields

Standardizes article data structure:

{
  "title": "Article Title",
  "contentSnippet": "Article preview text",
  "pubDate": "2024-12-01T10:00:00Z",
  "link": "https://example.com/article"
}

8. Information Extractor

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'

9. Merge Articles & Category

  • 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

10. Balance Categories

Smart Relevance-Based Selection

Selects the top 2 articles per category using a three-tier ranking system:

  1. Primary: Keyword count in title (highest first)
  2. Secondary: Keyword count in content (tie-breaker)
  3. Tertiary: Publication date (newest first, final tie-breaker)

Logic - sort priority:

titleCountB - titleCountA → contentCountB - contentCountA → dateB - dateA

11. Aggregate All Articles

  • Combines balanced articles into a single JSON object
  • Prepares payload for LLM processing

12. Check if it's Saturday

  • Condition: new Date().getDay().toString() equals "6"
  • Gates the newsletter distribution
  • Only proceeds on Saturday

13. Basic LLM Chain

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

14. Markdown

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

15. Split Out LLM Output

  • Splits the output field from LLM response
  • Converts JSON array into individual article records
  • Enables simultaneous storage for:
    • CockroachDB upsert
    • Airtable upsert

16. Add HTML Styles

Wraps the newsletter content in styled HTML container.

Each category has custom:

  • Colors
  • Icons
  • Background style

Output: HTML rendered inside Gmail.

17. CockroachDB: Upsert Newsletter Table

Stores articles in PostgreSQL-compatible database.

Database View

18. Airtable: Upsert Record

Syncs articles to Airtable for easy management.

Airtable View

19. Send a message (Gmail)

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

Newsletter Example

20. Gemini Model (LLM Provider)

  • Provides Google Gemini AI capabilities
  • Connected to both:
    • Information Extractor (for category assignment)
    • Basic LLM Chain (for summary generation)
  • Model: gemini-2.5-flash

Newsletter Format

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

Key Features

  • 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

About

AI-powered system that gathers RSS articles, filters and categorizes them, generates summaries, builds a styled HTML newsletter, stores structured records and emails a weekly tech digest automatically.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors