# Google Drive API 設定指南 ## 📋 功能說明 系統自動化流程: 1. **每 30 分鐘**檢查 Google Drive `當日業績匯入` 資料夾。 2. **自動下載** `即時業績_當日.xlsx`。 3. **自動匯入** 至資料庫 `daily_sales_snapshot`。 4. **歸檔** 原始檔案。 --- ## 🔑 認證資訊庫 | 項目 | 值 | |-----|-----| | Google Cloud 專案名 | `wooo-481204` | | Client ID | `132823079326-h9cvj5eahigm8hp9q0b7t5rk77bhu3gp...` | | 認證帳號 | `owen.tsai@gmail.com` | --- ## 🛠️ 首次認證步驟 若 `config/google_token.pickle` 遺失或過期,執行以下指令: ```bash python3 -c "from services.google_drive_service import drive_service; drive_service.authenticate()" ``` 執行後會彈出瀏覽器要求授權。 --- ## 📁 資料夾結構要求 Google Drive 根目錄必須存在: `我的雲端硬碟/業績報表/當日業績/`