Skills / Skills / Notebooklm Add Source
All skills

/ skill

notebooklm-add-source

Skills/notebooklm-add-source.md

Add one source (URL, YouTube, podcast, PDF, web, Drive, pasted text) to an existing library.

Open as raw file

Run this skill

Runs with bypassPermissions — local dev only.

notebooklm-add-source

Add a single source to a library. Both the NotebookLM notebook AND the vault-side wiki node Sources table get updated.

Pre-flight checks

  1. Wiki/Libraries/{library_slug}.md exists.
  2. source is reachable (URL responds OR file exists). For URLs, do a HEAD request — don't pull the whole resource.
  3. Source isn't already in the library's Sources table (de-dupe by URL or file hash). If duplicate: log + skip; don't add twice.
  4. NotebookLM session valid (Phase 2+). If unavailable: write the row to the wiki node anyway with source_id: pending, log, and surface to Adam to retry once NLM is back.

Auto-detection (when source_type is omitted)

  • https://(www\.)?youtube\.com/... or youtu.be/...youtube
  • https://...spotify.com/episode/... or known podcast hosts → podcast
  • Path ending .pdfpdf
  • https://drive.google.com/...drive
  • Path ending .md|.txttext
  • Other URL → url
  • Else → file

Procedure

1. Add to NotebookLM (Phase 2+)

  • Use notebooklm-py's add-source method with the right path/URL based on source_type.
  • Capture returned source_id.

2. Update the wiki node

Edit Wiki/Libraries/{library_slug}.md:

  • Append a row to the Sources table: | {title} | {source} | {source_type} | {today} | {notes} |
  • Increment source_count in frontmatter by 1.
  • Set last_synced: {today}.

3. Append Log entry

  • input: library={library_slug}, source={source}, type={source_type}
  • output: source_id={source_id or pending}
  • artifacts: <a class="wikilink wikilink-broken" href="#">Wiki/Libraries/{library_slug}</a>

Title resolution

  • If title is provided, use it.
  • For YouTube: query the page (or NotebookLM's metadata if available) for the video title.
  • For URLs: fetch the page <title> tag.
  • For files: use the filename (without extension).
  • Fallback: use the source URL as the title.

Hard rules

  • Never push files from Raw/Health/, Context/MI.md, or brand compliance documents to NotebookLM. The skill MUST refuse and surface to Adam if Asked to add a path under those locations.
  • For paid / gated content (paywalled articles, private podcasts), confirm with Adam before adding — uploading copyrighted gated content may breach NotebookLM TOS.

Failure modes

  • Source unreachable — skip and log; don't write a partial row.
  • Source already in library — no-op + log; respond "already in library, no action."
  • NotebookLM error — write wiki row with source_id: pending, log, surface to Adam.
  • Auto-detection ambiguous — prompt Adam to specify source_type.