Bidirectional sync between Obsidian folders and Google Docs. Each folder becomes a Google Doc with notes as sections.
- 🔄 Bidirectional sync - Changes sync both ways
- 📁 Folder structure preserved - Folders → headings, files → subheadings
- 🎨 Rich formatting - Bold, italic, blockquotes, lists, headings
- ⚡ Smart conflict resolution - Auto-merge when possible, manual when needed
- 📱 Mobile compatible - Works on desktop and mobile
- 🏗️ Battle-tested libraries - Uses
markedandgray-matter
Note: This plugin is not yet published to the Community Plugins directory.
- Download
main.js,manifest.json,styles.cssfrom releases (or build from source) - Create folder:
.obsidian/plugins/obsidian-gdocs-sync/in your vault - Copy the three files into that folder
- Reload Obsidian
- Enable the plugin in Settings → Community Plugins
- Go to Google Cloud Console
- Create a new project (or select existing)
- Enable Google Docs API (APIs & Services → Library)
- Create credentials: OAuth 2.0 Client ID (APIs & Services → Credentials)
- Application type: Desktop app
- Copy the Client ID and Client Secret
- Open Settings → Google Docs Sync on your desktop
- Paste your Client ID and Client Secret
- Click Authorize - this will open your browser
- Sign in with Google and authorize the app
- The authorization will complete automatically
- Click Test to verify
Once authorized on desktop, your tokens will sync to mobile devices via Obsidian Sync (if enabled), and the plugin will work on mobile.
Done! 🎉 The plugin will automatically refresh access tokens as needed.
Sync a folder:
- Right-click folder → "Sync with Google Docs", OR
- Command palette (
Cmd/Ctrl + P) → "Sync current folder", OR - Click ribbon sync icon
First sync: Creates a new Google Doc with the folder's name
Later syncs: Pushes/pulls changes, or shows conflict resolution UI if both changed
MyFolder/
├── Introduction.md
├── Chapter1/
│ ├── Section1.md
│ └── Section2.md
└── Conclusion.md
Becomes a Google Doc with:
- Introduction (Heading 2)
- Chapter1 (Heading 2)
- Section1 (Heading 3)
- Section2 (Heading 3)
- Conclusion (Heading 2)
Files are ordered alphabetically.
| Feature | Support |
|---|---|
| Bold, italic, headings, lists, quotes | ✅ Full |
| Front matter (YAML/TOML/JSON) | ✅ Stripped |
| Links, images, code blocks, tables | 🔜 Future |
"Please enter credentials in settings"
- Follow the setup steps above to get your OAuth2 credentials
- Make sure you've clicked "Authorize" and completed the OAuth flow
"Authorization failed"
- Double-check your Client ID and Client Secret
- Make sure you copied the full authorization code from the browser
- Try authorizing again
"403 Forbidden"
- Free tier: 60 requests/min, 10,000/day
- Check quotas
Conflicts
- Edit both versions → plugin shows diff viewer
- Choose local, remote, or cancel
npm install # Install dependencies
npm run dev # Watch mode
npm run build # Production build
npm test # Run tests
npm run validate # Lint + format + test + buildQuick test:
npm run build
cp main.js manifest.json styles.css ~/path/to/vault/.obsidian/plugins/obsidian-gdocs-sync/Then enable in Obsidian → Settings → Community Plugins.
- OAuth credentials stored locally (not synced)
- Direct connection to Google (no third-party servers)
- No telemetry or data collection
- Access tokens auto-refresh
- OAuth2 authentication required
- Not real-time (on-demand or periodic sync)
- Large folders may be slow
- API quota limits apply
PRs welcome! Please run npm run validate before submitting.
MIT
Built with Obsidian API • Google Docs API • marked • gray-matter