Sync Google Drive docs to Obsidian.
-
Enable Google Drive API
- Go to Google Cloud Console
- Create a project and enable the Google Drive API
- Create OAuth 2.0 credentials for Desktop application
- Download the credentials and save as
client_secrets.jsonin the project root directory
-
Set up Python environment
python3 -m venv venv
source venv/bin/activate
python3 -m pip install pydrive2 python-dotenv openai- Install Pandoc
brew install pandoc- Create
.envfile with your Obsidian vault path:
OBSIDIAN_VAULT_DIR="/path/to/your/obsidian/vault"- Run the script:
python3 sync-drive-to-obsidian.py-
Follow step 1 from macOS instructions to set up Google Drive API
-
Install dependencies:
pip install pydrive2 python-dotenv openai
sudo apt install pandoc- Follow steps 4-5 from macOS instructions