How to connect an Obsidian repository to NotebookLM
Finally, there's a way to truly connect Obsidian and NotebookLM . You've probably seen videos and read articles claiming it's possible to connect these two applications, but ultimately, the whole process is just simple copy and paste, with transferring notes from Obsidian to NotebookLM having to be done manually. That's not a true application connection.
Obsidian is a great place to store information, and because it uses simple Markdown (.md) files, you don't need to worry too much. NotebookLM, on the other hand, isn't a great note-taking application. But it excels at turning notes into something usable.
So, you can imagine that these two applications combined form a formidable pair. They are truly effective, and this is the setup that will help you achieve success.
Obsidian setup
Use folders to organize most of your notes in Obsidian. This is the number one problem with NotebookLM, as it can't import folders. Notes in Obsidian are .md files. For some reason, NotebookLM doesn't like .md files. Third, notes are dynamic. If something new is found, people will go back to the note and change it. NotebookLM's source is static. Even if you add a website as a source, it only records that version of the website and won't reflect the changes made.
There are many issues that need solutions. Some people use Obsidian Sync to sync their notes. There's no way to access Obsidian Sync from outside of Obsidian. So, in this setup, sync Obsidian with Google Drive.
If you think that simply syncing the folder with Google Drive and then adding that Google Drive folder as a source in NotebookLM is enough, unfortunately, things aren't that simple. The aforementioned problems appear immediately. When opening the folder in NotebookLM to add it as a source, you'll realize that NotebookLM can't add the entire folder as a source. You have to add each file individually. But before that happens, the folder looks empty to NotebookLM because the files are in Markdown format .
So what if we wrote a script that converted all our notes into palin text (.txt) files and saved them to a different folder on Google Drive? That works. NotebookLM can see the notes, but you still have to select each note individually, and there are a lot of notes. So. what if that script merged all the notes into a single, huge .txt file with delimiters? That works too. Here's the script used:
function mergeObsidianToMasterTxt() { const obsidianFolderId = 'YOUR_FOLDER_ID_HERE'; // Replace with your vault folder ID const outputFileName = 'Obsidian_Master.txt'; const rootObsidianFolder = DriveApp.getFolderById(obsidianFolderId); let masterContent = "OBSIDIAN VAULT EXPORT - " + new Date().toLocaleString() + "n"; function collectContent(folder) { const files = folder.getFiles(); while (files.hasNext()) { const file = files.next(); if (file.getName().endsWith('.md')) { const title = file.getName().replace('.md', ''); const content = file.getBlob().getDataAsString(); masterContent += `n--- FILE: ${title} ---n${content}n`; } } const subfolders = folder.getFolders(); while (subfolders.hasNext()) { collectContent(subfolders.next()); } } collectContent(rootObsidianFolder); const existingFiles = DriveApp.getFilesByName(outputFileName); if (existingFiles.hasNext()) { const masterFile = existingFiles.next(); masterFile.setContent(masterContent); } else { DriveApp.createFile(outputFileName, masterContent); } console.log("Master file updated!"); }
Now, the only remaining hurdle is that the notes will change, but the merged text file won't. That's okay. We just need to add a trigger so it automatically checks for changes and re-merges whenever there's an update.
This script is a Google Apps Script . You don't need to spend money on your own hardware. We just need to create a script in Google Apps Script, grant access to Google Drive, and then run it. It will retrieve the Markdown files from Google Drive and output a large text file containing all of them. Next, go to the Triggers tab and add a trigger to automatically run the script, while also keeping the text file updated. So far, everything is fine.
Now, let's set up NotebookLM.
Now, we have a single, perfectly readable text file for NotebookLM. You can add it as a source from Google Drive, and NotebookLM works perfectly. But the problem is, even if Apps Script updates the text file, its version in NotebookLM won't be updated. NotebookLM downloads the file when you add it as a source and keeps that version.
Of course, the simplest solution here is to just delete the source and add it back each time there's a change. But what kind of productivity expert would you be if you accepted doing that? A better way is needed.
Unfortunately, NotebookLM isn't as easy to program as other Google services . But thankfully, smarter people have improved NotebookLM on their own. A great example, and the one this article will use here, is NotebookLM Tools . This is a Chrome extension that incorporates several improvements to NotebookLM, specifically the ability to sync sources from Google Drive. That's fantastic!
After installing the extension, pin it to the extensions bar and click on it. From there, click on Open Sidebar . The sidebar provides you with many functions. You can add sources from tabs, folders, zip files, etc. You can also organize your sources into folders. But what you need in this extension is much simpler: A small refresh button will refresh all sources from Google Drive.
Now, everything is set up. Notes from Obsidian will automatically be exported as text files to Google Drive, and NotebookLM can retrieve the latest version of that text file each time you press refresh.
NotebookLM will become much better when you instruct it to work.
Customizable prompts are what make this tool truly useful.
Many people have tried using local LLM with Obsidian before, and for what it offers, things are pretty good. But of course, local LLM will never match the performance of Google's cloud model.
Furthermore, NotebookLM is a very special kind of AI tool. It's designed to work with source documents and notes. It closely follows source documents and comes with a range of really useful tools built on that idea. One of the features that has been used a lot recently is NotebookLM's datasheet. That feature alone makes it much more practical for real-world work.
Fortunately, NotebookLM has matured considerably. It still has some bugs, but it's much better now than it used to be. Synchronizing a large amount of notes from multiple topics into a notebook might sound a bit strange at first. It seems like you'll just end up with a huge mess. But NotebookLM's custom prompts help a lot here. You can add them to most of the Studio outputs and guide the system to the exact angle or topic you want to address. This means you can export the same archive and still get relevant, focused, and specific outputs, instead of vague summaries of your entire archive.




