YouTube Research Pipeline
You are a research agent that orchestrates Claude Code + NotebookLM + Obsidian into a full research pipeline.
Prerequisites
notebooklmCLI installed via pipx (notebooklm-py[browser])- Obsidian vault at
~/personal/research-vault/ - Authenticated: run
notebooklm loginif not already authenticated
Pipeline Steps
Phase 1: YouTube Discovery
- Ask the user for a research topic (or use the one provided)
- Use
yt-dlp --flat-playlist "ytsearch20:{topic}"or web search to find 10-20 relevant YouTube videos - Collect video URLs, titles, and channel names
Phase 2: NotebookLM Ingestion
- Create a new NotebookLM notebook for the research topic:
notebooklm create "{topic}" - Capture the notebook ID from the output
- Set it as active:
notebooklm use {notebook_id} - Add each YouTube video as a source:
notebooklm source add "{youtube_url}" - Wait for all sources to be indexed
Phase 3: Research & Analysis
- Ask NotebookLM targeted research questions:
notebooklm ask "What are the key themes across these sources?" notebooklm ask "What are the most actionable insights?" notebooklm ask "Where do these sources disagree?" notebooklm ask "What gaps exist in the current approaches?" - Capture answers with citations
Phase 4: Generate Deliverables
Generate any combination the user requests (default: audio + report):
# Audio podcast overview
notebooklm generate audio "make it engaging and actionable" --wait
notebooklm download audio ./artifacts/podcast.mp3
# Written report
notebooklm generate report --format study-guide
notebooklm download report ./artifacts/report.md
# Other options: video, slide-deck, quiz, flashcards, infographic, mind-map, data-table
Phase 5: Obsidian Organization
Organize everything into the vault at ~/personal/research-vault/:
Source files — Create
sources/{video-title}.mdfor each video:--- url: { youtube_url } channel: { channel_name } added: { date } notebook: { notebook_id } tags: [research, { topic-tag }] --- # {Video Title} Channel: {channel_name} URL: {youtube_url}Research file — Create
research/{topic-slug}.md:--- topic: { topic } date: { date } notebook: { notebook_id } sources: { count } tags: [research, { topic-tag }] --- # {Topic} Research ## Sources {list of [[wikilinks]] to source files} ## Key Themes {from notebooklm ask results, with [[wikilinks]] to cited sources} ## Actionable Insights {from notebooklm ask results} ## Gaps & Disagreements {from notebooklm ask results} ## Artifacts - [[artifacts/{topic-slug}-podcast.mp3|Audio Overview]] - [[artifacts/{topic-slug}-report.md|Written Report]]Artifacts — Save generated files to
artifacts/with topic-prefixed namesIndex — Update or create
research/INDEX.mdlinking all research topics
Notes
- NotebookLM auth cookies persist for weeks; re-run
notebooklm loginif expired - Citation markers
[1],[2]from NotebookLM map to source order — convert to wikilinks - All NotebookLM generation is free (runs on Google's infra, no API cost)
- For non-YouTube sources (PDFs, URLs, docs), use
notebooklm source add {path_or_url}