drive-upload
Upload a file to Google Drive with 3-route fallback. Always defaults to the correct SHARED DRIVE (Marketing for OPC/McFolling/content, Higashi for mom's site). Use any time a file needs to land in Dri
Files1
View on GitHubSKILL.mdskills/shared/drive-upload/SKILL.md
GitHubDrive Upload — 3-Route Fallback
When to use
- Uploading any file (image, PDF, video, transcript, script output) to Drive
- Saving content from scripts or GitHub Actions artifacts
When NOT to use
- Creating empty folders → use
mcp__claude_ai_Google_Drive__create_file(mimeType: folder) directly - Writing content to an existing Google Doc → use
GOOGLEDOCS_UPDATE_DOCUMENT_MARKDOWN - Drive MCP
create_filewithcontent=...ALWAYS fails silently — do not use for file content
Destination routing (MANDATORY check first)
- Higashi / Hig Negócios / mom's site / Alexandra →
0AN7aea2IZzE0Uk9PVA(Higashi shared drive) → Claude Flow → Website folder1CKWTojSg2uQmXjNnKlAaSBCTfxtSQBvH - OPC / Oak Park / McFolling / content / marketing →
0AIPzwsJD_qqzUk9PVA(Marketing shared drive) → Claude Code Workspace - NEVER upload to My Drive
- NEVER mix Higashi and Marketing
3 Routes
Route A — OAuth resumable upload (preferred for any file > 5MB)
POST https://www.googleapis.com/upload/drive/v3/files?uploadType=resumable&supportsAllDrives=true
Authorization: Bearer <SHEETS_TOKEN access token>
Content-Type: application/json
Body: {"name": "<filename>", "parents": ["<SHARED_DRIVE_FOLDER_ID>"]}
- MUST include
supportsAllDrives=trueor shared drives return 404 - Get upload URL from
Locationheader, then PUT the bytes - Working implementation:
~/ClaudeWorkspace/_Scripts/build_carousel_v2.pylines 15-100 - Also used in:
~/ClaudeWorkspace/_Scripts/daily_content_processor.py
Route B — Simple OAuth multipart (files < 5MB)
POST https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart&supportsAllDrives=true
Same auth, metadata + media in a multipart body.
Route C — MCP create_file (FOLDERS ONLY, never for content)
mcp__claude_ai_Google_Drive__create_file works perfectly for folders and empty Docs. Never attach content — it silently creates empty file.
Verification (mandatory — do not skip)
After upload, confirm file lands in the correct shared drive path:
- Call
mcp__claude_ai_Google_Drive__search_fileswith the filename - Verify
parentsmatches target folder ID - Only then report "uploaded" with the Drive link
Reference
- Full routing rules:
reference_active_connections.md - Working upload code:
~/ClaudeWorkspace/_Scripts/build_carousel_v2.py - 4AM agent uploads:
priihigashi/oak-park-ai-hub→scripts/4am_agent/(GitHub)