Skip to main content

Overview

The Google Drive integration enables automatic syncing of files from Google Drive to your Zarna CRM. Router: api/app/routers/drive.py Service: scripts/drive_sync_service.py

Features

  • Automatic Sync: Scheduled syncing of Drive folders
  • File Upload: Upload files from Zarna to Drive
  • Bi-directional: Sync in both directions
  • Change Detection: Only sync modified files

Setup

1. Connect Google Drive

Use OAuth to connect your Google Drive account:
POST /api/drive/oauth/init

2. Configure Sync Folders

POST /api/drive/sync-folders
{
  "folders": [
    {
      "drive_folder_id": "folder-id-123",
      "company_id": "company-uuid",
      "sync_frequency": "hourly"
    }
  ]
}

API Endpoints

List Files

GET /api/drive/files

Download File

GET /api/drive/files/{file_id}/download

Upload File

POST /api/drive/upload

Next Steps