Google Drive Sync Folder¶
Bidirectional sync folder for sharing files between you and Claude Code via Google Drive.
Folder Structure¶
gdrive-sync/
├── input/ ← You upload files here (from phone, computer, anywhere)
├── output/ ← Claude Code uploads results here
├── screenshots/ ← App screenshots and marketing images
└── generated/ ← DALL-E images, processed videos, etc.
How It Works¶
Your workflow: 1. Upload files to Google Drive "Nutri-E Sync" folder from anywhere 2. Run sync command or tell Claude Code to sync 3. Claude Code downloads files, processes them, uploads results 4. Access results from anywhere via Google Drive
Claude Code workflow:
# Download new files from Google Drive
./scripts/gdrive-pull.sh
# Process files locally
# ... work happens here ...
# Upload results back to Google Drive
./scripts/gdrive-push.sh
Setup (One-Time)¶
Step 1: Install rclone¶
Already installed via brew install rclone ✅
Step 2: Configure Google Drive Access¶
Run the configuration wizard:
Follow these prompts:
- Choose action:
n(New remote) - Name:
nutrieapp(or any name you prefer) - Storage type:
drive(Google Drive) - Client ID: (press Enter to use default)
- Client Secret: (press Enter to use default)
- Scope:
1(Full access) - Service Account: (press Enter for no)
- Edit advanced config:
n(No) - Use auto config:
Y(Yes - opens browser) - Log in with your Google account in browser
- Grant permissions to rclone
- Configure as Team Drive:
n(No) - Confirm:
y(Yes, this is OK) - Quit:
q(Quit config)
Step 3: Create Google Drive Folder¶
In your Google Drive, create folder structure:
Important: The folder name must match what's in the sync scripts (default: "Nutri-E Sync")
Step 4: Test the Connection¶
# List files in Google Drive
rclone ls nutrieapp:"Nutri-E Sync"
# Should show empty folders or any test files you added
Usage¶
Manual Sync Commands¶
Download files from Google Drive:
Upload files to Google Drive:
Bidirectional sync (recommended):
Workflow Examples¶
Example 1: Process Screenshots from Phone
- Take screenshots on your phone
- Upload to Google Drive:
Nutri-E Sync/input/ - In terminal:
./scripts/gdrive-pull.sh - Files appear in
gdrive-sync/input/ - Claude Code processes them
- Results saved to
gdrive-sync/output/ - In terminal:
./scripts/gdrive-push.sh - Access results on phone via Google Drive
Example 2: ChatGPT Project Images
You: "Download the images from Google Drive input folder"
Claude Code:
You: Access results from anywhere via Google Drive Nutri-E Sync/output/
Example 3: Continuous Work Session
# Start with full sync
./scripts/gdrive-sync.sh
# Work on files locally in gdrive-sync/
# ... edit, process, generate ...
# Sync changes back
./scripts/gdrive-sync.sh
How Syncing Works¶
rclone sync vs copy¶
rclone sync (used in scripts):
- Makes destination identical to source
- Deletes files in destination not in source
- One-way operation
rclone copy:
- Copies files without deleting
- Safer but can accumulate duplicates
Sync Strategy¶
Our scripts use bidirectional sync:
- Pull: Google Drive → Local
- Downloads new/changed files from Google Drive
-
Does NOT delete local files
-
Push: Local → Google Drive
- Uploads new/changed files to Google Drive
-
Does NOT delete remote files
-
Full Sync: Both directions
- First pulls from Google Drive
- Then pushes local changes
- Resolves conflicts by keeping newer files
File Size Limits¶
rclone: No hard limit (handles files up to Google Drive limits)
Google Drive limits: - Individual files: 5 TB max - Daily uploads: 750 GB/day - Shared folder: Unlimited storage (for Google Workspace accounts)
Security¶
Credentials:
- Stored in ~/.config/rclone/rclone.conf
- Encrypted OAuth tokens
- Only accessible on this machine
- NOT in git repository (protected)
Access: - You control the Google account - You can revoke rclone access anytime in Google Account settings - rclone only accesses folders you grant permission to
Troubleshooting¶
"remote not found"¶
Problem: rclone config not set up or wrong remote name
Solution:
# List configured remotes
rclone listremotes
# Should show "nutrieapp:" or whatever you named it
# If missing, run setup again
rclone config
"directory not found"¶
Problem: Google Drive folder doesn't exist or wrong name
Solution:
1. Check folder name in Google Drive
2. Update GDRIVE_FOLDER in sync scripts
3. Or create the folder: Nutri-E Sync/
Authentication expired¶
Problem: OAuth token expired after long period
Solution:
Conflicts during sync¶
Problem: Same file modified in both places
Solution: rclone keeps newer version (based on modification time)
To manually resolve:
# Check what would sync without actually doing it
rclone sync --dry-run gdrive-sync/input/ nutrieapp:"Nutri-E Sync/input"
Advanced Usage¶
Sync specific folder only¶
# Pull only screenshots
rclone sync nutrieapp:"Nutri-E Sync/screenshots" gdrive-sync/screenshots/ -v
# Push only generated files
rclone sync gdrive-sync/generated/ nutrieapp:"Nutri-E Sync/generated" -v
Exclude certain files¶
# Sync but exclude .DS_Store and temp files
rclone sync gdrive-sync/input/ nutrieapp:"Nutri-E Sync/input" \
--exclude ".DS_Store" \
--exclude "*.tmp" \
--exclude "*.temp"
Monitor sync in real-time¶
Integration with Claude Code¶
Claude Code can automatically sync when:
You say: - "Download the files from Google Drive" - "Sync with Google Drive" - "Upload the results to Drive"
Claude Code will: 1. Run appropriate sync script 2. Process files as requested 3. Upload results back 4. Confirm what was synced
Alternatives Considered¶
Why rclone instead of:
- Google Drive desktop app: Uses 2-way sync but less control, harder to automate
- gdrive CLI: Simpler but less features, abandoned project
- Manual upload/download: Too slow for frequent iterations
- Dropbox/OneDrive: rclone supports these too, but you chose Google Drive
Related Documentation¶
- MARKETING_GUIDE.md - ChatGPT Project workflows
- marketing-assets/ - Local marketing file organization
- DOWNLOAD_INSTRUCTIONS.md - iCloud photo download alternative