
notebooklm-automation
Automate creation of multiple audio overviews in Google NotebookLM using Playwright. Use when the us
by christag|Open Source
NotebookLM Automation
Automate creation of multiple audio overviews in Google NotebookLM with different prompts and focus areas.
Installation
- Download and extract this zip file to your server:
scp notebooklm-automation.zip your-server:~
ssh your-server
unzip notebooklm-automation.zip
cd notebooklm-automation
- Install dependencies:
pip install playwright --break-system-packages
playwright install chromium
- Make script executable:
chmod +x scripts/generate_audio_overviews.py
Quick Start
- Create an input file (
my_project.json):
{
"sources": [
"https://example.com/article1",
"https://example.com/article2"
],
"audio_overviews": [
{
"prompt": "Focus on technical concepts for developers",
"length": "longer"
},
{
"prompt": "Create executive summary for business leaders",
"length": "default"
}
]
}
- Run the automation:
python scripts/generate_audio_overviews.py my_project.json
- Audio files download to current directory
Usage Options
Basic (with visible browser for authentication)
python scripts/generate_audio_overviews.py input.json
Headless mode (after initial auth)
python scripts/generate_audio_overviews.py input.json --headless
Custom timeout (default is 10 minutes)
python scripts/generate_audio_overviews.py input.json --timeout 900
Input File Format
{
"sources": [
"URL1",
"URL2"
],
"audio_overviews": [
{
"prompt": "What the AI should focus on",
"length": "default" // or "longer" (never "shorter")
}
]
}
See references/example_input.json for a complete example.
How It Works
The script uses Playwright to:
- Open NotebookLM and create a new notebook
- Add all source URLs
- Wait for sources to process
- Create each audio overview with its specific prompt/length
- Wait ~10 minutes for generation
- Download all audio files
For Your iOS + SSH Workflow
Since you operate from iOS via SSH:
- Initial setup (one time):
ssh your-server
cd ~/notebooklm-automation
pip install playwright --break-system-packages
playwright install chromium
- Each time you need audio overviews:
ssh your-server
cd ~/notebooklm-automation
vim input.json # or upload via SFTP
python scripts/generate_audio_overviews.py input.json
-
Files download to
/home/claude/on your server -
Retrieve files via SFTP or set up a simple web server
Authentication Handling
First run requires Google sign-in:
- Run without
--headlessflag - Use X11 forwarding:
ssh -X your-server - Or use VNC to see the browser
- After first auth, subsequent runs can use
--headless
Troubleshooting
See references/troubleshooting.md for:
- Updating selectors if NotebookLM UI changes
- Common failure scenarios
- Debugging tips
File Structure
notebooklm-automation/
├── README.md # This file
├── SKILL.md # Detailed skill documentation
├── INSTALL.md # Installation guide
├── scripts/
│ └── generate_audio_overviews.py # Main automation script
└── references/
├── example_input.json # Example input file
└── troubleshooting.md # Troubleshooting guide
Limitations
- Max ~10 audio overviews per run
- Sources must be publicly accessible websites
- Requires Google account with NotebookLM access
- Generation takes ~5-10 minutes per overview
- UI automation may break if NotebookLM updates