SaarNews
Send a personalised daily newsletter about a user's investments in their own language
Core trick
Fetches yesterday's YouTube transcripts, indexes chunks in ChromaDB, and has Gemini write a digest that embeds matching video clips.
Tags
Description
Send a personalised daily newsletter about a user's investments in their own language
README excerpt
# AI-Powered YouTube Newsletter Generator
This tool automates the process of tracking YouTube channels, processing their content, and generating high-quality AI newsletters. It fetches video transcripts, indexes them using semantic search (ChromaDB), and uses Google Gemini to write comprehensive digests with embedded video clips.
## 🚀 Features
- **Automated Monitoring**: Scans specified YouTube channels for videos published yesterday.
- **Smart Retrieval**: Fetches transcripts (manual or auto-generated) and chunks them for granular search.
- **Semantic Search**: Uses **ChromaDB** and **Google Vertex AI** embeddings to find relevant video clips based on your keywords.
- **AI Writing**: Uses **Google Gemini** to synthesize information from multiple videos into a cohesive news article.
- **Rich Output**:
- **HTML Newsletter**: Beautifully styled with **embedded video clips** that start exactly at the right timestamp.
- **WhatsApp**: Formatted messages with timestamped links, ready to send via Twilio.
## 🛠️ Prerequisites
- **Python 3.8+**
- **Google Cloud Platform Project** with Vertex AI API enabled.
- **API Keys**:
- YouTube Data API v3
- Google Gemini API
- Twilio (optional, for WhatsApp)
## 📦 Installation
1. **Clone the repository:**
```bash
git clone <your-repo-url>
cd saar
```
2. **Install dependencies:**
```bash
pip install -r requirements.txt
```
3. **Configure Environment Variables:**
Create a `.env` file in the root