An automated daily news briefing system that fetches headlines, curates them via AI, generates audio, and delivers via email.
# Install dependencies
npm install
# Configure API keys
cp .env.example .env
# Edit .env with your keys
# Test the pipeline (dry run)
npm run dev -- --dry-run --verbose
# Run full pipeline
npm run dev- Multi-source Headlines: GNews (primary) + NewsAPI (fallback)
- AI Curation: NVIDIA NIM (Nemotron) or Perplexity for intelligent story selection
- Category Mix: Strict 50% AI, 25% Finance, 25% General distribution
- Audio Briefing: ~5 minute spoken summary via TTS
- Email Delivery: HTML newsletter + MP3 attachment via SMTP
| Service | Purpose | Free Tier |
|---|---|---|
| GNews | Primary headlines | 100 req/day |
| NewsAPI | Fallback headlines | 100 req/day |
| Perplexity | AI curation (optional) | ~$5/month |
| NVIDIA NIM | AI curation (optional) | Free tier available |
| SMTP (Gmail App Password or other provider) | Email delivery | Free |
Provide either PERPLEXITY_API_KEY or NVIDIA_API_KEY to enable LLM curation (otherwise the local scorer is used).
See GMAIL_SETUP.md for app-password SMTP instructions (Gmail) or use your SMTP provider details.
npm run dev -- [options]
Options:
--dry-run Test without sending email
--skip-email Skip email delivery
--skip-audio Skip audio generation
--verbose Show detailed logs
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ GNews │────▶│ Normalize │────▶│ Perplexity │
│ NewsAPI │ │ Dedupe │ │ Curate │
└─────────────┘ └─────────────┘ └─────────────┘
│
┌─────────────┐ ┌──────▼──────┐
│ Gmail │◀────│ TTS │
│ Send │ │ Audio │
└─────────────┘ └─────────────┘
- N = 12 total stories (configurable)
- AI:
ceil(0.50 × N)= 6 stories - Finance:
floor(0.25 × N)= 3 stories - General:
N - AI - Finance= 3 stories
Priority for multi-category stories: AI > Finance > General
To run the scheduler persistently in the background (even after restarts):
# Install PM2 globally
npm install -g pm2
# Start the scheduler
pm2 start scheduler.js --name "news-briefing"
# Ensure PM2 starts on boot
pm2 startup
pm2 savepm2 status: Check if the scheduler is running.pm2 logs news-briefing: View the scheduler logs.pm2 restart news-briefing: Restart the scheduler.pm2 stop news-briefing: Stop the scheduler.
MIT
This project includes a GitHub Actions workflow for automated daily briefings.
- Go to your repository Settings > Secrets and variables > Actions.
- Add the following Repository secrets:
GNEWS_API_KEYNEWSAPI_KEY(Optional)PERPLEXITY_API_KEY(Optional)NVIDIA_API_KEY(Optional)SMTP_HOSTSMTP_PORTSMTP_USERSMTP_PASS
- Scheduled: Runs automatically every day at 00:00 UTC (8:00 AM SGT).
- Manual: Go to Actions > Daily News Briefing > Run workflow. You can toggle
dry_run,skip_email, andskip_audioinputs.