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:
CODEBLOCK0
Basic Usage Patterns
Python API
CODEBLOCK1
CLI Usage
CODEBLOCK2
Advanced Features
Research Automation
CODEBLOCK3
Batch Operations
CODEBLOCK4
Custom Personas
CODEBLOCK5
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
- 1. 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:
- 1. Clone or pull the latest version of the notebooklm-py repository:
CODEBLOCK6
- 2. Re-run the installation process:
CODEBLOCK7
- 3. 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 - INLINECODE2 - For processing generated audio content
- INLINECODE3 - For extracting frames from video overviews
- INLINECODE4 - 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? 😉
NotebookLM 集成技能
此技能使您能够通过非官方的 notebooklm-py Python 库充分利用 Google NotebookLM 的全部功能。它提供了对 Web 界面中不可用功能的编程访问,包括批量操作、自定义格式导出和高级自动化能力。
何时使用此技能
在以下情况下使用此技能:
- - 创建、列出、重命名或删除 NotebookLM 笔记本
- 导入各种来源类型(URL、YouTube 视频、PDF、文本文件、Google Drive 等)
- 使用自定义角色提问并与笔记本对话
- 运行具有自动导入功能的 Web 和 Drive 研究代理
- 以多种格式和语言生成音频概览(播客)
- 创建具有不同视觉风格的视频概览
- 生成幻灯片(PDF/PPTX)和信息图(PNG)
- 以多种格式(JSON、Markdown、HTML)创建测验和闪卡
- 在本地下载所有生成的工件或导出到 Google Docs/Sheets
- 使用特定权限和视图级别控制共享笔记本
快速开始
安装
首先,确保您已安装 notebooklm-py 库:
bash
pip install notebooklm-py
基本使用模式
Python API
python
from notebooklm import NotebookLMClient
初始化客户端
client = NotebookLMClient()
创建新笔记本
notebook = client.create_notebook(我的研究项目)
添加来源
notebook.add_source(url=https://example.com/research-paper.pdf)
notebook.add
source(youtubeurl=https://youtube.com/watch?v=abc123)
notebook.add
source(filepath=./documents/report.txt)
提问
response = notebook.ask(这些来源的主要发现是什么?)
print(response.text)
生成音频概览
audio = notebook.generate
audiooverview(
format=deep-dive,
length=medium,
language=en
)
audio.save(./outputs/podcast.mp3)
CLI 使用
bash
创建笔记本
notebooklm notebook create 我的研究
添加来源
notebooklm notebook add-source 我的研究 --url https://example.com/paper.pdf
notebooklm notebook add-source 我的研究 --youtube https://youtube.com/watch?v=abc123
提问
notebooklm notebook ask 我的研究 总结关键点
生成内容
notebooklm notebook audio 我的研究 --format deep-dive --length medium
notebooklm notebook video 我的研究 --style cinematic
notebooklm notebook slide 我的研究 --format detailed
下载工件
notebooklm notebook download 我的研究 --format mp3 --output ./podcasts/
高级功能
研究自动化
python
运行带自动导入的 Web 研究
research
notebook = client.researchweb(
query=量子计算的最新发展,
max_sources=10,
mode=deep # 或 fast
)
运行 Drive 研究
drive
notebook = client.researchdrive(
folder_id=your-drive-folder-id,
query=机器学习论文
)
批量操作
python
一次导入多个来源
sources = [
{type: url, value: https://example1.com},
{type: youtube, value: https://youtube.com/watch?v=...},
{type: file, value: ./document.pdf}
]
notebook.add_sources(sources)
生成多种内容类型
formats = [mp3, mp4, pdf, png]
for fmt in formats:
notebook.download
artifacts(format=fmt, outputdir=f./outputs/{fmt})
自定义角色
python
设置自定义角色以获得更聚焦的回复
notebook.set_persona(
你是一位专攻机器学习的技术专家。
在相关时提供详细、准确的解释并附上代码示例。
)
输出格式
音频概览
- - 格式:深度解析、简要、评论、辩论
- 时长:短、中、长
- 语言:支持 50+ 种
- 输出:MP3/MP4
视频概览
- - 格式:解说、简要、电影级
- 风格:9 种视觉风格加电影视频别名
- 输出:MP4
幻灯片
信息图
- - 方向:3 种(纵向、方形、横向)
- 详细程度:3 级(低、中、高)
- 输出:PNG
测验和闪卡
- - 可配置数量和难度
- 输出:JSON、Markdown、HTML
最佳实践
- 1. 错误处理:该库使用可能变化的未文档化 Google API - 实现重试逻辑和回退机制
- 速率限制:注意使用配额以避免被限制
- 清理:临时文件会自动清理,但请管理好输出目录
- 身份验证:使用您的 Google 凭据 - 确保通过浏览器身份验证流程登录
- 组织:为不同项目创建特定用途的笔记本
更新技能
要从 GitHub 仓库将此技能更新到最新版本,请按照以下步骤操作:
- 1. 克隆或拉取 notebooklm-py 仓库的最新版本:
bash
git clone https://github.com/teng-lin/notebooklm-py.git
# 或如果您已有:
cd notebooklm-py && git pull
- 2. 重新运行安装过程:
bash
pip install -e . # 用于开发模式,或直接 pip install notebooklm-py
- 3. 如果您使用 OpenClaw 技能,可以通过从最新仓库重新运行技能创建过程来更新它。
故障排除
- - 如果 API 中断,请查看 notebooklm-py 仓库中的故障排除指南
- 对于身份验证问题,重新运行登录过程
- 速率限制错误需要减少请求频率或实现指数退避
- 某些功能可能需要特定的 Google Workspace 权限
相关技能
- - ai-agent-development - 用于构建利用 NotebookLM 功能的代理
- audio-transcriber - 用于处理生成的音频内容
- video-frames - 用于从视频概览中提取帧
- app-builder - 用于围绕 NotebookLM 工作流创建完整应用程序
没问题,老板。 此技能将 NotebookLM 的全部功能置于您的指尖。我们先创建哪个笔记本?😉