Your intelligent, automated daily briefing on the cutting-edge world of Artificial Intelligence
An advanced serverless system that intelligently curates, summarizes, and delivers the most important AI/tech news directly to your inbox every day.
- π Overview
- β¨ Key Features
- ποΈ Architecture
- π Project Structure
- π Quick Start
- π API Keys Setup
- π’ Deployment Guide
- β° Automation Setup
- π§ Usage & Testing
- π Troubleshooting
- π Performance
- π€ Contributing
In the rapidly evolving world of AI, staying updated with the latest breakthroughs, research, and industry developments can be overwhelming. AI News Automation solves this by providing an intelligent, fully automated solution that:
- π Scans 10+ premium AI/tech news sources daily
- π€ Uses Google Gemini AI to evaluate and rank articles by importance
- βοΈ Generates intelligent summaries for the most valuable content
- π§ Delivers professional email briefings with 10-15 top articles
- β‘ Completes the entire process in under 200 seconds
- π― Focuses on the last 3 days for maximum relevance
- Smart Source Selection: Curates from MIT Technology Review, VentureBeat, MarkTechPost, Google Research, and 6+ other premium sources
- AI Quality Evaluation: Each article is rated 1-10 by Gemini AI for interest and knowledge value
- Recency Filter: Only processes articles from today, yesterday, and the day before yesterday
- Duplicate Detection: Advanced algorithms remove duplicate content based on title similarity
- Google Gemini 2.5 Pro Integration: Creates comprehensive 4-5 sentence summaries
- Context-Aware Processing: Understands technical content and industry significance
- Fallback System: Generates detailed summaries even when AI processing fails
- Quality Assurance: Ensures all summaries meet minimum length and quality standards
- Responsive HTML Design: Clean, mobile-friendly email templates
- Source Attribution: Clear crediting of original news sources
- Performance Metrics: Execution time and article count reporting
- Reliable Delivery: Uses Brevo (SendinBlue) for enterprise-grade email delivery
- Vercel Deployment: Zero-maintenance serverless architecture
- 5-Minute Timeout: Optimized for complex AI processing workflows
- Health Monitoring: Built-in diagnostics and environment validation
- Automated Scheduling: GitHub Actions for reliable daily execution at 11:30 PM IST
graph TD
A[GitHub Actions] --> B[Vercel Function]
B --> C[Parallel RSS Fetcher]
C --> D[Article Filter & Deduplication]
D --> E[Fast AI Summarization]
E --> F[Email Generation]
F --> G[Brevo Email Delivery]
H[Health Check Endpoint] --> I[Environment Validation]
J[Performance Monitor] --> K[Step-by-Step Timing]
Optimized Data Flow:
- Parallel Collection: Fetch articles from 3 fastest RSS feeds (parallel processing)
- Smart Selection: Choose top 8 articles for processing
- Fast Summarization: Generate AI summaries using Gemini 1.5 Flash
- Performance Monitoring: Track timing for each step
- Delivery: Send professional HTML email via Brevo
Performance Target: <200 seconds total execution
ai-news-automation/
βββ api/
β βββ index.py # π Main automation logic (RSS β AI β Email)
β βββ check.py # π©Ί Health check & environment validation
β βββ simple.py # β
Basic availability endpoint
βββ vercel.json # βοΈ Vercel deployment config (5-min timeout)
βββ requirements.txt # π¦ Python dependencies
βββ .gitignore # π« Git ignore rules
βββ README.md # π This documentation
api/index.py
: Core automation engine handling RSS fetching, AI processing, and email deliveryapi/check.py
: Diagnostic endpoint for validating environment variables and configurationapi/simple.py
: Lightweight health check for basic service availabilityvercel.json
: Configures 300-second timeout for AI processing workflowsrequirements.txt
: Python dependencies including Gemini AI, feedparser, and Brevo SDK
- Python 3.9+ (for local development)
- GitHub account (for deployment)
- Google account (for Gemini API)
- Email address (for Brevo account)
- Fork this repository to your GitHub account
- Get your API keys (detailed instructions below)
- Deploy to Vercel with one click
- Set environment variables in Vercel dashboard
- Configure EasyCron for daily automation
- Visit Google AI Studio: Go to https://makersuite.google.com/app/apikey
- Sign in with your Google account
- Create API Key: Click "Create API Key" button
- Copy the key: Save it securely (starts with
AIzaSy...
)
Important Notes:
- β Free tier includes generous quotas for this project
- β No credit card required for basic usage
β οΈ Keep your API key secure and never commit it to code
- Sign up at Brevo: Visit https://www.brevo.com/
- Verify your email: Complete the email verification process
- Access API Keys: Go to Account β SMTP & API β API Keys
- Create new key: Click "Generate a new API key"
- Copy the key: Save it securely (starts with
xkeysib-...
)
Email Setup Requirements:
- β Sender Email: Must be verified in your Brevo account
- β Domain Verification: Recommended for better deliverability
- β
Recipient Format: Comma-separated list (e.g.,
user1@email.com,user2@email.com
)
- Click the "Fork" button on this repository
- Clone to your GitHub account
- Visit Vercel: Go to https://vercel.com/
- Sign up/Login: Use your GitHub account
- Import Project: Click "New Project" β Import from GitHub
- Select Repository: Choose your forked repository
- Deploy: Vercel will automatically detect the configuration
In your Vercel project dashboard:
- Go to Settings β Environment Variables
- Add the following variables:
Variable Name | Description | Example Value |
---|---|---|
GEMINI_API_KEY |
Google AI Studio API key | AIzaSyC... |
BREVO_API_KEY |
Brevo (SendinBlue) API key | xkeysib-... |
SENDER_EMAIL |
Verified sender email address | news@yourdomain.com |
RECIPIENT_EMAILS |
Comma-separated recipient list | user1@email.com,user2@email.com |
- Save and redeploy the project
Visit your health check endpoint:
https://your-app-name.vercel.app/api/check
β
Success: All variables show "β
Set"
β Issues: Follow the troubleshooting guide below
The system runs automatically via GitHub Actions workflow:
- Schedule: Daily at 11:30 PM IST (6:00 PM UTC)
- Reliability: Built-in retry logic and error handling
- Monitoring: Detailed execution logs and performance metrics
- Zero Configuration: Works automatically once deployed
Benefits:
- β Completely Free: No external services required
- β Reliable: GitHub's infrastructure handles scheduling
- β Transparent: Full execution logs in Actions tab
- β Performance Tracking: Step-by-step timing analysis
You can also trigger the automation manually:
- Create Account: Visit https://www.easycron.com/
- Sign up for a free account (supports 2 cron jobs)
- Create Cron Job:
- URL:
https://your-app-name.vercel.app/api/index
- Schedule:
29 18 * * *
(6:29 PM UTC / 11:59 PM IST daily) - Name: "AI News Daily Automation"
- URL:
- Enable the cron job
- Test: Use "Execute Now" to verify it works
0 9 * * *
- 9:00 AM UTC daily30 17 * * *
- 5:30 PM UTC daily0 0 * * 1
- Midnight UTC every Monday29 18 * * *
- 6:29 PM UTC daily (recommended)
- β Free tier available (2 cron jobs)
- β Reliable execution with detailed logs
- β Web-based interface for easy management
- β Better timeout handling than alternatives
- β Execution history and monitoring
Health Check (Verify configuration):
curl https://your-app-name.vercel.app/api/check
Manual Trigger (Run automation now):
curl https://your-app-name.vercel.app/api/index
Basic Availability (Service status):
curl https://your-app-name.vercel.app/api/simple
Your daily email will include:
- π§ Professional HTML design with responsive layout
- π° 10-15 curated articles from the last 3 days
- π€ AI-generated summaries (4-5 sentences each)
- π·οΈ Source attribution and publication dates
- π Direct links to full articles
- β±οΈ Performance metrics (execution time, article count)
β Successful execution:
- Health check shows all variables set
- Manual trigger returns success message
- Email delivered within 200 seconds
- EasyCron shows successful execution
Problem: Health check shows "β Missing" variables Solution:
- Verify variables are set in Vercel dashboard
- Check for typos in variable names
- Redeploy after adding variables
- Ensure no extra spaces in values
Problem: No emails received Solutions:
- Check Brevo account: Verify sender email is confirmed
- Check spam folder: Emails might be filtered
- Verify API key: Ensure Brevo API key is valid
- Check recipient format: Use comma-separated emails without spaces
- Review Brevo logs: Check delivery status in Brevo dashboard
Problem: "No articles found" message Solutions:
- Check internet connectivity: Ensure Vercel can access RSS feeds
- Verify feed URLs: Some feeds may have changed
- Check date filtering: Articles might be older than 3 days
- Review Vercel logs: Look for specific feed errors
Problem: Articles show basic summaries instead of AI summaries Solutions:
- Verify Gemini API key: Check Google AI Studio dashboard
- Check API quotas: Ensure you haven't exceeded limits
- Review rate limiting: AI requests are automatically throttled
- Fallback system: Basic summaries are used when AI fails (this is normal)
Problem: EasyCron shows timeout errors Solutions:
- Check email delivery: If email arrives, the function succeeded
- Review execution time: Target is <200 seconds
- Vercel function logs: Check for actual errors vs. HTTP timeouts
- Increase EasyCron timeout: Set to 300+ seconds in EasyCron settings
Problem: Execution takes longer than 200 seconds Solutions:
- Reduce RSS feeds: Modify the feed list in
api/index.py
- Decrease article count: Lower the evaluation limit
- Optimize AI calls: Reduce delay between requests
- Check Vercel logs: Identify bottlenecks in processing
- β‘ Target Execution Time: <200 seconds
- π° Articles Processed: 10-15 high-quality articles
- π Sources Scanned: 10+ premium RSS feeds
- π Content Freshness: Last 3 days only
- π€ AI Processing: ~2-3 seconds per article
- π§ Email Delivery: <5 seconds via Brevo
- Smart Timeouts: 4-second RSS feed timeouts
- Parallel Processing: Concurrent feed fetching
- Rate Limiting: Controlled AI API calls
- Early Termination: Stops when enough articles found
- Efficient Filtering: Quick duplicate detection
We welcome contributions to improve the AI News Automation system!
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes: Improve code, documentation, or features
- Test thoroughly: Ensure all functionality works
- Commit changes:
git commit -m 'Add amazing feature'
- Push to branch:
git push origin feature/amazing-feature
- Open Pull Request: Submit for review
- Follow Python PEP 8 style guidelines
- Add comments for complex logic
- Test changes with manual triggers
- Update documentation for new features
- Ensure backward compatibility
- π New RSS Sources: Add more AI/tech news feeds
- π¨ Email Templates: Improve HTML design
- π Analytics: Add usage statistics
- π§ Configuration: More customization options
- π Internationalization: Multi-language support
Built with β€οΈ for the AI community
Stay informed, stay ahead