Search Google Drive in Obsidian!

I finally found a way to search through all my Google Drive files in Obsidian, without having to import them all!

Background, for my daily workflow, I use Obsidian’s Quick switcher all the time! I think of it as something of a global search for all “my stuff.” This includes all of my notes, but also archived files from the past, Zotero entries, books and their highlights, etc. I’ve been slowly converting several of my older Google Docs into Markdown files and importing them to my vault, but, honestly, they aren’t all worth the time it take to do that! So, read on to see how I import all my Google Drive metadata so that it’s searchable in Obsidian.

First, install File Cabinet by Awesome Table plugin. Follow their instructions to list all of your Google Drive files + metadata. You should end up with a Google Sheet that has all of your files listed on one or more sheets.

Second, download the sheet(s) from the above Google Sheet as CSV files (into your Downloads directory). Use the gdrive_to_obsidian.py Python 3 script to convert those CSVs into Markdown files in your vault!

An example of the Markdown file that is created:

Filename: 2020-06-03 Draft Invitation.md
Content:

---
URL: "https://drive.google.com/file/d/1dkwgnsl69JslYk0KgsVqf_jbC31DO0/view?usp=drivesdk"
Type: "vnd.google-apps.shortcut"
Last updated on: "3/9/2022"
Folder: "Your Folder Name"
File Size: "31.3kb"
---

You can modify the script as you desire, I’m removing some of the fields because they don’t make sense for my use case (e.g. almost all my file are owned by me, so I remove the “Owner” and “Owner Infos” fields).

I hope this helps someone else find their files!

4 Likes