Automatically sync your Obsidian vault folders to Google Docs for seamless integration with Google NotebookLM.
Obsidian vault (.md files)
↓ [automatic on changes]
Google Doc (aggregated)
↓ [one-click Sync]
NotebookLM
NotebookLM is great for AI-powered Q&A over your documents, but it doesn't support direct Obsidian integration. Sources are static snapshots that need manual re-uploading.
This adapter bridges the gap:
- Watches your Obsidian folders for changes
- Aggregates all markdown files into a Google Doc
- Auto-updates the Doc when files change
- In NotebookLM, just click Sync to refresh
- 🔄 Real-time watching — detects file changes instantly
- 📁 Multi-target support — different folders → different Google Docs
- 🔐 Private & secure — uses your own Google Cloud credentials
- 💾 Smart sync — only updates when content actually changes
- ⏱️ Debouncing — prevents spam updates on bulk changes
- 🖥️ Cross-platform — works on Windows, macOS, Linux
- Go to Google Cloud Console
- Create a new project (or select existing)
- Enable Google Docs API:
- Menu → APIs & Services → Library
- Search "Google Docs API" → Enable
- Create OAuth credentials:
- APIs & Services → Credentials → Create Credentials → OAuth client ID
- Application type: Desktop app
- Download JSON → rename to
credentials.json - Place in the adapter directory
- Create an empty Google Doc: docs.new
- Copy the Doc ID from URL:
https://docs.google.com/document/d/[THIS_IS_THE_ID]/edit
git clone https://github.com/YOUR_USERNAME/obsidian-notebooklm-adapter.git
cd obsidian-notebooklm-adapter
pip install -r requirements.txtCopy the example config and edit:
cp config.example.yaml config.yamlSingle target:
vault_path: ~/Documents/MyVault
folders:
- Projects
- Notes
doc_id: YOUR_GOOGLE_DOC_IDMultiple targets:
vault_path: ~/Documents/MyVault
targets:
- name: Work
doc_id: DOC_ID_1
folders:
- Projects
- Meetings
- name: Personal
doc_id: DOC_ID_2
folders:
- Journal
- Ideaspython adapter.py --config config.yamlFirst run will open a browser for Google authentication.
- Start the adapter (runs in background)
- Add your Google Doc as a source in NotebookLM
- Edit your Obsidian notes normally
- In NotebookLM, click the source → "Click to sync with Google Drive"
NotebookLM will show "Checking freshness" and update the content.
| Option | Description |
|---|---|
--config, -c |
Path to YAML config file |
--vault, -v |
Path to Obsidian vault |
--folders, -f |
Comma-separated folders |
--doc-id, -d |
Google Doc ID |
--credentials |
Path to credentials.json (default: credentials.json) |
--once |
Sync once and exit (no watching) |
--debounce |
Debounce seconds (default: 2) |
The adapter creates a structured document:
# Obsidian Vault Export
**Updated:** 2025-01-13 15:30:45
**Files:** 42
**Folders:** Projects, Notes
---
## 📄 Projects/my-project.md
[file contents]
---
## 📄 Notes/idea.md
[file contents]NotebookLM source limits:
- 500,000 words per source (free tier)
- 50 sources per notebook (free) / 300 sources (Plus)
The adapter shows character count on each sync so you can monitor usage.
Create ~/Library/LaunchAgents/com.obsidian.notebooklm.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.obsidian.notebooklm</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/python3</string>
<string>/path/to/adapter.py</string>
<string>--config</string>
<string>/path/to/config.yaml</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>launchctl load ~/Library/LaunchAgents/com.obsidian.notebooklm.plist- Open Task Scheduler
- Create Basic Task
- Trigger: At log on
- Action: Start a program
- Program:
python - Arguments:
C:\path\to\adapter.py --config C:\path\to\config.yaml
- Program:
Create ~/.config/systemd/user/obsidian-notebooklm.service:
[Unit]
Description=Obsidian to NotebookLM Adapter
[Service]
ExecStart=/usr/bin/python3 /path/to/adapter.py --config /path/to/config.yaml
Restart=always
[Install]
WantedBy=default.targetsystemctl --user enable --now obsidian-notebooklm"Missing credentials.json" Download OAuth credentials from Google Cloud Console.
"Token has been expired or revoked"
Delete token.json and run again — browser will open for re-auth.
"The caller does not have permission"
- Ensure you own the Google Doc or have edit access
- Verify Google Docs API is enabled in Cloud Console
Files not updating
- Check folders exist in vault
- Ensure files have
.mdextension - Check console for errors
credentials.json— your app's OAuth config (safe to keep private)token.json— contains your access token — never commit to git!
The .gitignore excludes sensitive files by default.
PRs welcome! Some ideas:
- Support for other file types (.txt, .pdf)
- Selective sync by tags
- Web UI for configuration
- Multiple vault support
MIT — see LICENSE
Built with help from Claude (Anthropic) during a late-night hacking session.