Intelligent YouTube channel monitoring with AI-powered summaries delivered via Telegram. Never miss important content from your favorite creators.
- Multi-Channel Monitoring - Track unlimited YouTube channels simultaneously using RSS feeds (no API quota limits)
- AI-Powered Summaries - Automatic video summarization using Google's Gemini 2.0 Flash
- Telegram Integration - Get notifications with relevance scores, key takeaways, and watch recommendations
- Smart Retry Logic - Attempts to fetch transcripts for up to 48 hours for videos that don't have them immediately
- Interest-Based Filtering - Customizable interest profile for personalized relevance scoring
- Skip Shorts - Automatically filters out YouTube Shorts and videos under 5 minutes
- Interactive Bot Commands - Manage channels, check health, and view status via Telegram
- State Tracking - Tracks video processing status and retry attempts
- Hourly Monitoring: Checks all configured YouTube channels for new videos via RSS feeds
- Transcript Fetching: Attempts to download video transcripts (retries every hour for up to 48 hours if unavailable)
- AI Analysis: Generates structured summaries using Gemini 2.0 with your interest profile
- Smart Notifications: Only sends Telegram notifications when summaries are successfully generated
- Interactive Management: Use Telegram bot commands to add/remove channels and check system health
- Python 3.8+
- Google Gemini API key (Get one here)
- Telegram Bot token (Create via @BotFather)
-
Clone the repository
git clone https://github.com/yourusername/youtube-monitor-bot.git cd youtube-monitor-bot -
Install dependencies
pip install -r requirements.txt
-
Configure environment variables
cp .env.example .env # Edit .env with your actual API keys -
Set up your interests (optional)
Edit
config/my_interests.txtto customize the AI's relevance scoring for your preferences. -
Add YouTube channels
Edit
config/channels.txtand add channels (one per line):@GregIsenberg https://www.youtube.com/@MyFirstMillionPod
# Check for new videos
./monitor.sh check
# Start interactive Telegram bot
./monitor.sh bot
# Check system health
./monitor.sh health
# Test Telegram notifications
./monitor.sh testRun a one-time check for new videos:
python3 src/youtube_monitor_telegram.py --checkStart the interactive bot:
python3 src/telegram_bot_commands.py --runSet up hourly checks by adding to your crontab:
crontab -eAdd this line (adjust paths as needed):
0 * * * * cd /path/to/youtube-monitor-bot && ./monitor.sh check >> data/logs/monitor.log 2>&1
Or run the bot in the background:
nohup ./monitor.sh bot >> data/logs/bot-commands.log 2>&1 &Send these commands to your bot on Telegram:
| Command | Description |
|---|---|
/list |
Show all monitored channels |
/add @channel |
Add a new channel to monitor |
/remove @channel |
Stop monitoring a channel |
/health |
Check system status and cron job health |
/help |
Show help message |
Examples:
/add @GregIsenberg
/add https://youtube.com/@MyFirstMillionPod
/remove @GregIsenberg
Download transcripts from any YouTube video without API keys:
# Basic usage (readable format)
python3 src/youtube_transcript.py "https://www.youtube.com/watch?v=VIDEO_ID"
# Plain text format
python3 src/youtube_transcript.py "VIDEO_ID" --format plain
# Save to file
python3 src/youtube_transcript.py "VIDEO_ID" --output data/transcripts/video.txt
# Specify language preference
python3 src/youtube_transcript.py "VIDEO_ID" --languages en de frAvailable formats:
readable(default) - Clean, paragraph-formatted textplain- Single continuous texttimestamped- Includes timestamps for each lineparagraphs- Auto-grouped into paragraphsjson- Structured JSON with timestamps
Check the monitoring system's health status:
./monitor.sh health
# or
python3 src/healthcheck.py| File | Purpose |
|---|---|
.env |
API keys and tokens (create from .env.example) |
config/channels.txt |
List of YouTube channels to monitor |
config/my_interests.txt |
Your interest profile for AI relevance scoring |
data/state.json |
Runtime state (auto-generated) |
data/video_state.json |
Video retry tracking (auto-generated) |
youtube-monitor-bot/
├── src/ # Source code
│ ├── youtube_monitor_telegram.py # Main monitoring script
│ ├── telegram_bot_commands.py # Interactive Telegram bot
│ ├── telegram_notifier.py # Notification formatting & sending
│ ├── youtube_transcript.py # Standalone transcript downloader
│ └── healthcheck.py # System health checker
├── config/ # User configuration
│ ├── channels.txt # Channels to monitor
│ └── my_interests.txt # Your interest profile
├── data/ # Runtime data (gitignored)
│ ├── logs/ # Log files
│ ├── transcripts/ # Downloaded transcripts
│ ├── summaries/ # Generated AI summaries
│ ├── state.json # Channel state
│ └── video_state.json # Video retry tracking
├── monitor.sh # Convenience wrapper script
├── .env.example # Environment template
├── requirements.txt # Python dependencies
├── README.md # This file
└── LICENSE # MIT License
🎥 New video from Greg Isenberg
Building a $10M Side Project in Public
🔗 Watch on YouTube
Relevance: 9/10 ⭐⭐⭐⭐⭐
TL;DR:
Greg breaks down his strategy for building profitable side projects
by solving real problems and sharing the journey publicly.
Worth watching?
✅ YES - Packed with actionable advice and real revenue numbers
Key takeaways:
1. Started at $2K/mo MRR, now at $83K/mo in 18 months
2. Distribution strategy: Twitter threads + weekly updates
3. Used Supabase + Next.js stack to ship in 2 weeks
The bot uses your my_interests.txt profile to:
- Score relevance (1-10) based on how well the video matches your interests
- Generate TL;DR - One sentence summary (max 20 words)
- Explain why you'd care - 2-3 bullet points of relevance
- Extract key takeaways - Specific details, tools, numbers mentioned
- Recommend watching - YES/NO/MAYBE with reasoning
Bot not receiving videos:
- Check cron job is running:
ps aux | grep youtube_monitor - View logs:
tail -f data/logs/monitor.log - Run manual check:
./monitor.sh check
Transcripts failing:
- Some videos don't have transcripts immediately after upload
- Bot will retry every hour for up to 48 hours
- Check
data/video_state.jsonto see retry counts
Telegram notifications not working:
- Verify
.envcredentials are correct - Test notifications:
./monitor.sh test - Check bot token with @BotFather
Health check issues:
./monitor.sh healthCreate a .env file with these variables:
# Required for AI summaries
GEMINI_API_KEY=your_gemini_api_key_here
# Required for Telegram notifications
TELEGRAM_BOT_TOKEN=your_telegram_bot_token_here
TELEGRAM_CHAT_ID=your_telegram_chat_id_hereGemini API Key:
- Visit Google AI Studio
- Create a new API key
- Copy to
.env
Telegram Bot:
- Message @BotFather on Telegram
- Send
/newbotand follow prompts - Copy the bot token to
.env - Get your chat ID by messaging @userinfobot
Edit src/youtube_monitor_telegram.py:39:
MAX_TRANSCRIPT_RETRIES = 48 # Number of hourly attemptsEdit src/youtube_monitor_telegram.py:229:
model = genai.GenerativeModel('gemini-2.0-flash-exp')Modify the short video threshold in src/youtube_monitor_telegram.py:174:
return seconds < 300 # 300 seconds = 5 minutesContributions are welcome! Please:
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Commit changes:
git commit -am 'Add feature' - Push to branch:
git push origin feature-name - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with youtube-transcript-api
- Powered by Google Gemini AI
- Telegram Bot API
- Open an issue for bug reports or feature requests
- Star the repo if you find it useful
Made for staying on top of YouTube content without the noise.