Skip to content

Repository files navigation

Google Docs Sync

Publish a single Obsidian note to Google Docs and keep the two in two-way sync — so you can collaborate with people on a specific document without leaving Obsidian.

Why

Obsidian is built around local Markdown files and is great as a personal knowledge base — but it has no easy way to collaborate on a document with someone who lives in Google Docs. The usual workarounds mean copy-pasting back and forth or migrating the note out of your vault entirely.

This plugin gives you a middle ground: pick a note, hit Publish, and it becomes a Google Doc you can share and co-edit. Edits flow both ways — what you change in Obsidian updates the Doc, what collaborators change in the Doc flows back into your note — while the note stays a normal local file in your vault. You collaborate on the docs that need it, and keep everything else local.

How it works

  • Publish a note → it's created as a Google Doc (Markdown is converted by Google Drive). The Doc URL is added to the note's frontmatter (gdoc_url).
  • Two-way sync: local edits are pushed (debounced, on save); remote edits are pulled on a poll interval (default 60s) or via Sync now.
  • Conflict handling: if the same note changed on both sides in overlapping places, the plugin writes inline <<<<<<< / ======= / >>>>>>> markers into the note and leaves the Google Doc untouched until you resolve them — it never silently overwrites the other side. Non-overlapping changes merge automatically.

Authentication — no API keys, no setup

Click Connect Google account once and approve in your browser (the standard Google consent screen). That's it — no API keys, no Google Cloud project to create.

  • The plugin ships with a pre-registered OAuth client and uses the drive.file scope, which is per-file: the plugin can only see and touch the Docs it creates, nothing else in your Drive.
  • The OAuth flow uses a local 127.0.0.1 loopback redirect with PKCE; tokens are stored in the plugin's local data.
  • Advanced users can supply their own OAuth client under Settings → Advanced.

Install

Manually (until it's in the Community Plugins directory):

  1. Download main.js, manifest.json, and styles.css from the latest release.
  2. Copy them into <your vault>/.obsidian/plugins/google-docs-sync/.
  3. Reload Obsidian → Settings → Community plugins → enable Google Docs Sync.

Usage

Command What it does
Publish to Google Docs Create a Doc from the current note and start syncing it.
Sync now Force a sync of the current note.
Sync all published notes Sync every tracked note.
Connect Google account Run the one-time sign-in.
Open Google Doc for this note Open the linked Doc in your browser.

The status bar shows the current note's state (synced ✓, conflict ⚠, etc.). There's also a ribbon icon and per-note auto-sync on save.

Limitations

  • Desktop only (needs Node APIs for the local OAuth loopback).
  • Markdown is normalized: content round-trips through Google Docs' own Markdown, so your note's formatting is rewritten to Google's exported style on sync. Standard Markdown survives well; Obsidian-only syntax (wikilinks, callouts, embeds, Dataview) may degrade.
  • Per-note, not folders or whole-vault. Images, comments, and suggestions aren't synced.

Related projects

A few other efforts target the same Obsidian ↔ Google Docs space (most are GitHub-only, not in the official directory):

This plugin focuses on per-note publishing + reliable two-way sync with explicit conflict surfacing, and zero-setup auth (bundled OAuth client, drive.file scope).

Note: these are independent projects, not Google products. "Google Docs" and "Google Drive" are trademarks of Google LLC; this plugin is not affiliated with or endorsed by Google.

Build from source

npm install
npm run build   # outputs main.js

The bundled OAuth client is injected at build time from GDOCS_CLIENT_ID / GDOCS_CLIENT_SECRET env vars (or a local credentials.local.md). Building without them produces a "bring-your-own-client" plugin — users then set their own client under Settings → Advanced.

License

MIT

About

Publish an Obsidian note to Google Docs and keep them in two-way sync — collaborate on specific docs without leaving Obsidian.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages