NotebookLM Integration Skill
This skill enables you to leverage the full power of Google NotebookLM through the unofficial notebooklm-py Python library. It provides programmatic access to features that aren't available in the web UI, including batch operations, custom format exports, and advanced automation capabilities.
When to Use This Skill
Use this skill when you need to:
- Create, list, rename, or delete NotebookLM notebooks
- Import various source types (URLs, YouTube videos, PDFs, text files, Google Drive, etc.)
- Ask questions and chat with your notebooks using custom personas
- Run web and Drive research agents with auto-import capabilities
- Generate Audio Overviews (podcasts) in multiple formats and languages
- Create Video Overviews with different visual styles
- Generate Slide Decks (PDF/PPTX) and Infographics (PNG)
- Create Quizzes and Flashcards in multiple formats (JSON, Markdown, HTML)
- Download all generated artifacts locally or export to Google Docs/Sheets
- Share notebooks with specific permissions and view level controls
Quick Start
Installation
First, ensure you have the notebooklm-py library installed:
pip install notebooklm-py
Basic Usage Patterns
Python API
from notebooklm import NotebookLMClient
# Initialize client
client = NotebookLMClient()
# Create a new notebook
notebook = client.create_notebook("My Research Project")
# Add sources
notebook.add_source(url="https://example.com/research-paper.pdf")
notebook.add_source(youtube_url="https://youtube.com/watch?v=abc123")
notebook.add_source(file_path="./documents/report.txt")
# Ask questions
response = notebook.ask("What are the main findings in these sources?")
print(response.text)
# Generate audio overview
audio = notebook.generate_audio_overview(
format="deep-dive",
length="medium",
language="en"
)
audio.save("./outputs/podcast.mp3")
CLI Usage
# Create notebook
notebooklm notebook create "My Research"
# Add sources
notebooklm notebook add-source "My Research" --url https://example.com/paper.pdf
notebooklm notebook add-source "My Research" --youtube https://youtube.com/watch?v=abc123
# Ask questions
notebooklm notebook ask "My Research" "Summarize the key points"
# Generate content
notebooklm notebook audio "My Research" --format deep-dive --length medium
notebooklm notebook video "My Research" --style cinematic
notebooklm notebook slide "My Research" --format detailed
# Download artifacts
notebooklm notebook download "My Research" --format mp3 --output ./podcasts/
Advanced Features
Research Automation
# Run web research with auto-import
research_notebook = client.research_web(
query="latest developments in quantum computing",
max_sources=10,
mode="deep" # or "fast"
)
# Run Drive research
drive_notebook = client.research_drive(
folder_id="your-drive-folder-id",
query="machine learning papers"
)
Batch Operations
# Import multiple sources at once
sources = [
{"type": "url", "value": "https://example1.com"},
{"type": "youtube", "value": "https://youtube.com/watch?v=..."},
{"type": "file", "value": "./document.pdf"}
]
notebook.add_sources(sources)
# Generate multiple content types
formats = ["mp3", "mp4", "pdf", "png"]
for fmt in formats:
notebook.download_artifacts(format=fmt, output_dir=f"./outputs/{fmt}")
Custom Personas
# Set a custom persona for more focused responses
notebook.set_persona(
"You are a technical expert specializing in machine learning. "
"Provide detailed, accurate explanations with code examples when relevant."
)
Output Formats
Audio Overview
- Formats: deep-dive, brief, critique, debate
- Lengths: short, medium, long
- Languages: 50+ supported
- Output: MP3/MP4
Video Overview
- Formats: explainer, brief, cinematic
- Styles: 9 visual styles plus cinematic-video alias
- Output: MP4
Slide Deck
- Formats: detailed, presenter
- Output: PDF, PPTX
Infographic
- Orientations: 3 (portrait, square, landscape)
- Detail levels: 3 (low, medium, high)
- Output: PNG
Quiz & Flashcards
- Configurable quantity and difficulty
- Output: JSON, Markdown, HTML
Best Practices
- Error Handling: The library uses undocumented Google APIs that may change - implement retry logic and fallback mechanisms
- Rate Limits: Be mindful of usage quotas to avoid throttling
- Cleanup: Temporary files are cleaned up automatically, but manage your output directories
- Authentication: Uses your Google credentials - ensure you're logged in via browser auth flow
- Organization: Create engagement-specific notebooks for different projects
Updating the Skill
To update this skill to the latest version from the GitHub repository, follow these steps:
Clone or pull the latest version of the notebooklm-py repository:
git clone https://github.com/teng-lin/notebooklm-py.git
# or if you already have it:
cd notebooklm-py && git pull
Re-run the installation process:
pip install -e . # for development mode, or just pip install notebooklm-py
If you're using the OpenClaw skill, you can update it by re-running the skill creation process from the latest repository.
Troubleshooting
- If APIs break, check the Troubleshooting guide in the notebooklm-py repo
- For authentication issues, re-run the login process
- Rate limit errors require reducing request frequency or implementing exponential backoff
- Some features may require specific Google Workspace permissions
Related Skills
ai-agent-development - For building agents that utilize NotebookLM capabilities
audio-transcriber - For processing generated audio content
video-frames - For extracting frames from video overviews
app-builder - For creating full applications around NotebookLM workflows
Bet, Boss. This skill puts the full power of NotebookLM at your fingertips. What notebook shall we create first? 😉
1---2name: notebooklm-integration3description: Integrate Google NotebookLM capabilities into your workflow via the unofficial notebooklm-py library. Use when you need to: create/manage notebooks, import sources (URLs, PDFs, YouTube, etc.), run research queries, generate audio/video overviews, create slide decks/infographics/quizzes/flashcards, or download generated artifacts. Provides programmatic access to NotebookLM features not exposed in the web UI.4---56# NotebookLM Integration Skill78This skill enables you to leverage the full power of Google NotebookLM through the unofficial `notebooklm-py` Python library. It provides programmatic access to features that aren't available in the web UI, including batch operations, custom format exports, and advanced automation capabilities.910## When to Use This Skill1112Use this skill when you need to:13- Create, list, rename, or delete NotebookLM notebooks14- Import various source types (URLs, YouTube videos, PDFs, text files, Google Drive, etc.)15- Ask questions and chat with your notebooks using custom personas16- Run web and Drive research agents with auto-import capabilities17- Generate Audio Overviews (podcasts) in multiple formats and languages18- Create Video Overviews with different visual styles19- Generate Slide Decks (PDF/PPTX) and Infographics (PNG)20- Create Quizzes and Flashcards in multiple formats (JSON, Markdown, HTML)21- Download all generated artifacts locally or export to Google Docs/Sheets22- Share notebooks with specific permissions and view level controls2324## Quick Start2526### Installation27First, ensure you have the notebooklm-py library installed:28```bash29pip install notebooklm-py30```3132### Basic Usage Patterns3334#### Python API35```python36from notebooklm import NotebookLMClient3738# Initialize client39client = NotebookLMClient()4041# Create a new notebook42notebook = client.create_notebook("My Research Project")4344# Add sources45notebook.add_source(url="https://example.com/research-paper.pdf")46notebook.add_source(youtube_url="https://youtube.com/watch?v=abc123")47notebook.add_source(file_path="./documents/report.txt")4849# Ask questions50response = notebook.ask("What are the main findings in these sources?")51print(response.text)5253# Generate audio overview54audio = notebook.generate_audio_overview(55 format="deep-dive",56 length="medium",57 language="en"58)59audio.save("./outputs/podcast.mp3")60```6162#### CLI Usage63```bash64# Create notebook65notebooklm notebook create "My Research"6667# Add sources68notebooklm notebook add-source "My Research" --url https://example.com/paper.pdf69notebooklm notebook add-source "My Research" --youtube https://youtube.com/watch?v=abc1237071# Ask questions72notebooklm notebook ask "My Research" "Summarize the key points"7374# Generate content75notebooklm notebook audio "My Research" --format deep-dive --length medium76notebooklm notebook video "My Research" --style cinematic77notebooklm notebook slide "My Research" --format detailed7879# Download artifacts80notebooklm notebook download "My Research" --format mp3 --output ./podcasts/81```8283## Advanced Features8485### Research Automation86```python87# Run web research with auto-import88research_notebook = client.research_web(89 query="latest developments in quantum computing",90 max_sources=10,91 mode="deep" # or "fast"92)9394# Run Drive research95drive_notebook = client.research_drive(96 folder_id="your-drive-folder-id",97 query="machine learning papers"98)99```100101### Batch Operations102```python103# Import multiple sources at once104sources = [105 {"type": "url", "value": "https://example1.com"},106 {"type": "youtube", "value": "https://youtube.com/watch?v=..."},107 {"type": "file", "value": "./document.pdf"}108]109110notebook.add_sources(sources)111112# Generate multiple content types113formats = ["mp3", "mp4", "pdf", "png"]114for fmt in formats:115 notebook.download_artifacts(format=fmt, output_dir=f"./outputs/{fmt}")116```117118### Custom Personas119```python120# Set a custom persona for more focused responses121notebook.set_persona(122 "You are a technical expert specializing in machine learning. "123 "Provide detailed, accurate explanations with code examples when relevant."124)125```126127## Output Formats128129### Audio Overview130- Formats: deep-dive, brief, critique, debate131- Lengths: short, medium, long132- Languages: 50+ supported133- Output: MP3/MP4134135### Video Overview136- Formats: explainer, brief, cinematic137- Styles: 9 visual styles plus cinematic-video alias138- Output: MP4139140### Slide Deck141- Formats: detailed, presenter142- Output: PDF, PPTX143144### Infographic145- Orientations: 3 (portrait, square, landscape)146- Detail levels: 3 (low, medium, high)147- Output: PNG148149### Quiz & Flashcards150- Configurable quantity and difficulty151- Output: JSON, Markdown, HTML152153## Best Practices1541551. **Error Handling**: The library uses undocumented Google APIs that may change - implement retry logic and fallback mechanisms1562. **Rate Limits**: Be mindful of usage quotas to avoid throttling1573. **Cleanup**: Temporary files are cleaned up automatically, but manage your output directories1584. **Authentication**: Uses your Google credentials - ensure you're logged in via browser auth flow1595. **Organization**: Create engagement-specific notebooks for different projects160161## Updating the Skill162163To update this skill to the latest version from the GitHub repository, follow these steps:1641651. Clone or pull the latest version of the notebooklm-py repository:166 ```bash167 git clone https://github.com/teng-lin/notebooklm-py.git168 # or if you already have it:169 cd notebooklm-py && git pull170 ```1711722. Re-run the installation process:173 ```bash174 pip install -e . # for development mode, or just pip install notebooklm-py175 ```1761773. If you're using the OpenClaw skill, you can update it by re-running the skill creation process from the latest repository.178179## Troubleshooting180181- If APIs break, check the [Troubleshooting guide](docs/troubleshooting.md) in the notebooklm-py repo182- For authentication issues, re-run the login process183- Rate limit errors require reducing request frequency or implementing exponential backoff184- Some features may require specific Google Workspace permissions185186## Related Skills187- `ai-agent-development` - For building agents that utilize NotebookLM capabilities188- `audio-transcriber` - For processing generated audio content189- `video-frames` - For extracting frames from video overviews190- `app-builder` - For creating full applications around NotebookLM workflows191192**Bet, Boss.** This skill puts the full power of NotebookLM at your fingertips. What notebook shall we create first? 😉