Keep your Obsidian vault synchronized with Google Drive automatically! βοΈ This plugin allows you to backup and sync your notes to Google Drive in two modes: hidden app-specific storage or a visible folder you can access directly.
- β‘ Sync on Save: Automatically sync files the moment they're saved (NEW!)
- π Automatic Sync: Set up automatic syncing at regular intervals
- π Two Storage Options: Choose between hidden app-specific storage or visible Google Drive folder
- π Manual Sync: Optional ribbon icon and command palette sync (can be disabled)
- ποΈ Flexible Sync Options: Mix and match sync methods to fit your workflow
- π± Cross-Platform: Works on desktop and mobile Obsidian apps
- π Secure Authentication: Uses OAuth2 for secure Google Drive access
π Hidden Storage (App Data Folder)
- π Files are stored in Google Drive's hidden app-specific folder
- π§Ή Files won't clutter your main Google Drive
- π Only accessible through this plugin
- β Recommended for most users
- π Files are stored in a folder you can see in your Google Drive
- π Default folder name: "Obsidian Vault" (customizable)
- π You can access and manage files directly from Google Drive
- π€ Good for sharing or manual file management
- Download the latest release from the Releases page
- Extract the files to your vault's plugin folder:
VaultFolder/.obsidian/plugins/obsidian-drive-sync/ - Enable the plugin in Obsidian Settings β Community Plugins
- Clone this repository
- Run
npm installto install dependencies - Run
npm run buildto build the plugin - Copy
main.js,manifest.json, andstyles.cssto your plugin folder
Before using the plugin, you need to set up Google Drive API access:
- π Go to the Google Cloud Console
- π Click "Select a project" β "New Project"
- βοΈ Enter a project name (e.g., "Obsidian Drive Sync")
- β Click "Create"
- π In your project, go to "APIs & Services" β "Library"
- π Search for "Google Drive API"
- π Click on "Google Drive API" and then "Enable"
- π οΈ Go to "APIs & Services" β "Credentials"
- β Click "Create Credentials" β "OAuth 2.0 Client IDs"
- βοΈ If prompted, configure the OAuth consent screen:
- π Choose "External" user type
- π Fill in required fields (App name, User support email, Developer email)
- π€ Add your email to "Test users" if in testing mode
- πΎ Save and continue through all steps
- π» For Application type, select "Desktop application"
- π·οΈ Enter a name (e.g., "Obsidian Drive Sync")
- β¨ Click "Create"
- π Copy and save the Client ID and Client Secret - you'll need these!
- βοΈ Go to "APIs & Services" β "OAuth consent screen"
- π Add the following scope:
https://www.googleapis.com/auth/drive.file
- π€ Add your email address to "Test users"
- πΎ Save the configuration
- π§ Open Obsidian Settings β Community Plugins β Obsidian Drive Sync
- π Enter your Client ID and Client Secret from Google Cloud Console
- π Click "Get Auth URL" button
- π The authentication URL will be copied to your clipboard automatically
- π Paste the URL in your browser and sign in to Google
- β Grant permissions to access Google Drive
- π Copy the authorization code from the browser
- π Paste the authorization code in the plugin settings
- π You should see a success message
π Storage Location:
- π Hidden (App Data Folder): Recommended - files stored in hidden app folder
- π Visible (Custom Folder): Files stored in a visible Google Drive folder
π Visible Folder Name: (Only for visible storage)
- π Default: "Obsidian Vault"
- βοΈ Change this to customize your folder name
π Manual Sync:
- π Toggle to enable/disable ribbon button and command
- βοΈ On-demand syncing when you need it
- π Restart Obsidian required when changing this setting
β‘ Sync on Save:
- πΎ Toggle to sync files instantly when saved
- π Most responsive option - syncs immediately after Ctrl/Cmd+S
- π Restart Obsidian required when changing this setting
β° Auto Sync:
- π Toggle automatic syncing on/off
- β±οΈ Set sync interval (1-60 minutes)
You can enable any combination of these sync methods to fit your workflow:
- βοΈ Click the cloud icon in the ribbon (left sidebar)
- π¨ Or use Command Palette: "Sync vault with Google Drive"
- ποΈ Can be disabled in settings to clean up UI if not needed
- πΎ Enable "Sync on Save" in settings for instant backup
- π Files sync automatically every time you save (Ctrl/Cmd+S)
- π― Most efficient - only syncs the file you just modified
- β‘ Enable "Auto Sync" in settings
- β° Choose sync interval (default: 5 minutes)
- π Plugin will sync automatically in the background
- β Use all three methods together for maximum coverage
- β Use only "Sync on Save" for minimal, responsive syncing
- β Use "Auto Sync" + "Manual Sync" for traditional workflow
- β Disable "Manual Sync" if you prefer fully automated syncing
- π Use Command Palette: "Authenticate Google Drive" to re-authenticate
- β Check that your OAuth consent screen is properly configured
- π Ensure you're using the correct Client ID and Secret
- π Double-check your Client ID and Client Secret
- β Make sure you've enabled Google Drive API in Google Cloud Console
- π‘οΈ Verify OAuth consent screen is configured with correct scopes
- π Try generating a new authorization code
- β Complete the authentication process in plugin settings
- π Make sure the authorization code was entered correctly
- π Check that you have internet connectivity
- π Check Obsidian's console (Ctrl/Cmd + Shift + I) for error messages
- πΎ Verify your Google Drive has sufficient storage space
- π Try manual sync first before enabling auto-sync
- π Ensure you have the necessary permissions in Google Drive
- π If using "Hidden" storage, files are in the app-specific folder and not visible in your regular Google Drive
- π If using "Visible" storage, look for the folder name you specified (default: "Obsidian Vault")
- π Your data stays yours: Files are stored in your Google Drive account
- π« No third-party servers: Direct connection between Obsidian and Google Drive
- π‘οΈ Secure authentication: Uses OAuth2 standard with refresh tokens
- π― Minimal permissions: Only requests access to files created by the app
If you encounter issues:
- π Check the troubleshooting section above
- π Look for error messages in Obsidian's developer console
- π Create an issue on GitHub with:
- β Error messages from the console
- π Steps to reproduce the problem
- π Your Obsidian and plugin versions
MIT License - see LICENSE file for details.