An automated newsletter system that uses an agent to scrape the web for relevant articles based on my interests and sends me a personalized daily newsletter.
- 🤖 AI-powered content curation using LangGraph
- 📧 Automated email delivery with HTML formatting
- ⏰ Flexible scheduling (daily at 8am CT by default)
- 🎯 Customizable topics of interest
- 📰 Multi-source news aggregation from RSS feeds
- 🔧 Easy configuration via environment variables
-
Install Dependencies
uv sync
-
Configuration Copy
.env.exampleto.envand fill in your details:cp .env.example .env
Edit
.envwith:OPENAI_API_KEY: Your OpenAI API keyEMAIL_ADDRESS: Your Gmail addressEMAIL_PASSWORD: Your Gmail app password (not your regular password)TO_EMAIL: Where to send the newsletter (can be the same as EMAIL_ADDRESS)TOPICS: Comma-separated list of interests (e.g., "AI,Python,Technology,Startups")
-
Gmail App Password Setup
- Enable 2-factor authentication on your Gmail account
- Generate an app password: Google Account → Security → App passwords
- Use this app password in the
EMAIL_PASSWORDfield
- Test Configuration:
uv run python main.py test - Generate One Newsletter:
uv run python main.py run-once - Start Scheduler:
uv run python main.py start - View Configuration:
uv run python main.py config
- Scraping: The LangGraph agent fetches articles from multiple tech news sources
- Filtering: AI analyzes each article's relevance to your specified topics
- Curation: Top articles are selected and summarized
- Delivery: A formatted newsletter is sent to your email
The project includes a GitHub workflow for automated daily newsletters:
-
Set up repository secrets (Settings → Secrets and variables → Actions):
OPENAI_API_KEY=your_openai_api_key EMAIL_ADDRESS=your_email@gmail.com EMAIL_PASSWORD=your_app_password TO_EMAIL=your_email@gmail.com TOPICS=AI,Python,Technology,Startups SMTP_SERVER=smtp.gmail.com SMTP_PORT=587 NEWSLETTER_TIME=08:00 TIMEZONE=UTC -
Push to GitHub - The workflow runs automatically at 9 AM UTC daily
-
Manual trigger - Go to Actions tab → "Daily Newsletter" → "Run workflow"
-
Timezone adjustment - Modify the cron schedule in
.github/workflows/newsletter.yml:0 8 * * *= 8:00 AM UTC0 13 * * *= 8:00 AM EST (UTC-5)0 15 * * *= 8:00 AM PST (UTC-8)
- Topics: Edit the
TOPICSfield in.envor GitHub secrets - Schedule: Change cron schedule in workflow file and
NEWSLETTER_TIME - Sources: Modify the RSS feed list in
src/agent.py