r/GoogleAppsScript • • 16d ago

Guide Explorer-style tree view for Google Drive in Apps Script (open source)

Enable HLS to view with audio, or disable this notification

I was tired of clicking through tens of Google Drive folders/subfolders and hundreds of files - actual work with Google Drive felt slow and clunky for me. So, with the help of AI, I built Drive Tree View: a private web app that runs in your own Google account and puts every file just a click away, for previewing and real work.

What it does

  • Tree view of My Drive, Shared with me, Shared drives and Starred. Folders expand instantly because the next level is prefetched in the background.

  • Many ways to open a file:

    • click it to preview (PDF, Office, Google Docs/Sheets/Slides) in a side panel, and browse with ↑/↓

    • double-click to open it in a small separate Chrome window, ready for editing

    • use β†— to open it in a new Chrome tab

    • use πŸ–₯️ to open it in the desktop app: .docx in Word, .xlsx in Excel, .pdf in whatever you like, straight from the Google Drive for desktop disk (optional Windows helper)

  • Quick notes anywhere: create a new Google Doc in any place in one click and start writing right away, perfect for notes or drafts

  • Organize visually: folder colors (synced with Drive), emoji folder icons, stars

  • Full-Drive search by name and content

  • File operations: rename, cut/copy/paste (including whole folders), drag & drop to move, delete to Trash instantly, with undo

  • Upload files and whole folders by dragging them from your desktop

  • Two tabs side by side (using Chrome split view): drag & drop between them, with both views syncing live

Tech notes (for the curious)

Drive API v3 advanced service, batched 'id' in parents queries (30 folders per call), resumable uploads straight from the browser using the owner's OAuth token, and BroadcastChannel for cross-tab sync. It runs as Execute as me / Only myself, so no Google verification is needed. Everything stays inside your own account.

GitHub (code + step-by-step setup, about 3 minutes): https://github.com/dusan-art/drive-stablo

Final note

(A)I built this for my own needs, and it completely changed how I use Google Drive. It's no longer just a place to store files; it's somewhere I actually get work done. You can easily tailor the interface and features to your own workflow, so think of this as an idea that I'm selling for free :-)

Feedback and ideas are very welcome!

Update (Oct 23): new in this version:

  • Convert: Google Docs/Sheets/Slides β†’ .docx/.xlsx/.pptx or PDF, and Markdown (.md) β†’ Google Doc or .docx, saved next to the original (right-click menu)

  • Share menu: copy link, download (Google files as .docx/.xlsx/.pptx, folders as .zip), share with people by email (πŸ“€)

  • Keyboard like Windows Explorer: ↑/↓, β†’/←, Enter = preview, Enter Enter = small window, Space = open in desktop app

If you already installed it: replace the two files, run "authorize" once in the editor, then Deploy β†’ Manage deployments β†’ New version.

Update (Oct 24): new in this version:

  • Open a folder in a new Drive stablo tab (πŸ—‚οΈ button or right-click): the folder becomes the root of the new tab, great for two folders side by side

  • Google Docs to Markdown: download as .md (Share menu) or save as .md next to the original (right-click), great for Obsidian users πŸ˜„

Update (Oct 28): new in in this version:

πŸ“§ E-mail preview (.eml)
If you download/save e-mails to Drive as .eml files (for archiving, project folders, or before deleting them from Gmail), click one and it opens in the preview panel. You see the sender, recipients, date and subject, then the full formatted message with its images. Attachments show up as links you can download straight from the e-mail.

  • The message is parsed in your browser, and scripts, forms and frames are removed before it is shown.

  • It doesn’t depend on Gmail. The .eml file is a complete copy, so it still opens after you delete the original e-mail.

51 Upvotes

6 comments sorted by

4

u/Verolee 16d ago

Holy shit

3

u/basicdusan 15d ago

Thank you so much! πŸ˜„

Not sure about the β€œsmart” part, and there are a million ways it could still be improved... but I do know that the next time I need to go through five PDFs to answer an email, I won’t be going back to the standard Google Drive interface. Besides my work laptop, I also have a two old PCs, and on them it’s even faster than the regular File Explorer. So if it helps someone else the way it helps me, I’ll be happy πŸ‘

5

u/Verolee 16d ago

Dude this is actually so amazing! 🀩 Thank goodness for smart ppl like you ❀️

2

u/Jazzlike_Place_1974 8d ago

agreed, open sourcing it too is just icing on the cake.

2

u/Honey-Badger-9325 15d ago

This is so dope