No description
Find a file
Olivier Rouiller db51a01e62 Add GDocs Obsidian plugin for Google Drive shortcuts.
Opens .gdoc, .gsheet, and other Workspace shortcut files in Obsidian's
Web Viewer by parsing JSON metadata (url, resource_id, or doc_id).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 18:24:56 +02:00
src Add GDocs Obsidian plugin for Google Drive shortcuts. 2026-06-04 18:24:56 +02:00
test Add GDocs Obsidian plugin for Google Drive shortcuts. 2026-06-04 18:24:56 +02:00
.gitignore Add GDocs Obsidian plugin for Google Drive shortcuts. 2026-06-04 18:24:56 +02:00
esbuild.config.mjs Add GDocs Obsidian plugin for Google Drive shortcuts. 2026-06-04 18:24:56 +02:00
manifest.json Add GDocs Obsidian plugin for Google Drive shortcuts. 2026-06-04 18:24:56 +02:00
package-lock.json Add GDocs Obsidian plugin for Google Drive shortcuts. 2026-06-04 18:24:56 +02:00
package.json Add GDocs Obsidian plugin for Google Drive shortcuts. 2026-06-04 18:24:56 +02:00
README.md Add GDocs Obsidian plugin for Google Drive shortcuts. 2026-06-04 18:24:56 +02:00
styles.css Add GDocs Obsidian plugin for Google Drive shortcuts. 2026-06-04 18:24:56 +02:00
tsconfig.json Add GDocs Obsidian plugin for Google Drive shortcuts. 2026-06-04 18:24:56 +02:00

GDocs

Obsidian plugin that opens Google Drive shortcut files in Obsidian's Web Viewer.

When Google Drive for Desktop (or similar sync) stores Docs, Sheets, and other Workspace files in your vault, they appear as small JSON files (.gdoc, .gsheet, etc.). GDocs registers those extensions, shows them in the file explorer with their extension, and opens the linked Google URL in a tab when you click them.

Requirements

  • Obsidian 1.8+ (desktop for Web Viewer)
  • Web Viewer core plugin enabled: Settings → Core plugins → Web viewer
  • Google Drive shortcut files in your vault (from Drive for Desktop, rclone, Synology Drive, etc.)

Supported extensions

Extension Google app
.gdoc Docs
.gsheet Sheets
.gslides Slides
.gdraw Drawings
.gform Forms
.gtable Tables
.gscript Apps Script
.gjam Jamboard

Installation (development)

  1. Clone this repo into your vault's .obsidian/plugins/gdocs folder, or symlink it there.
  2. Install dependencies and build:
npm install
npm run build
  1. Enable GDocs under Settings → Community plugins.
  2. Reload Obsidian.

For development, run npm run dev to watch and rebuild.

Usage

Click any .gdoc, .gsheet, or other supported shortcut in the file explorer. The plugin reads the url field from the JSON file and opens it in Web Viewer.

If Web Viewer is disabled, GDocs can open the link in your system browser instead (see plugin settings).

Mobile

Web Viewer is not available on mobile. GDocs shows the URL with Copy link and Open in browser buttons.

Shortcut file format

Shortcut files are JSON. Google Drive for Desktop typically uses:

{
  "doc_id": "1VxFROKm0zoJV2iH678wO94hZ0PY9fN_gAGOxhZacc8w",
  "email": "you@example.com"
}

GDocs builds the Docs/Sheets URL from doc_id and the file extension (.gdoc, .gsheet, etc.).

Older or third-party sync tools may use:

{
  "url": "https://docs.google.com/spreadsheets/d/…/edit",
  "resource_id": "spreadsheet:…"
}

Troubleshooting

  • Files not visible in the explorer
    Check Settings → Files & links → Detect all file extensions, and ensure .gdoc / .gsheet are not listed under Excluded files.

  • Opens in browser instead of Obsidian
    Enable the Web Viewer core plugin, or turn on “Open in system browser when Web Viewer is off” in GDocs settings.

  • Warning about moving shortcut files
    Do not move .gdoc / .gsheet files out of a syncing Google Drive folder; Google may delete the online document.

License

MIT