/google-drive-upload:google-drive-uploadfrom MSApps Google Drive Upload
Uploads files from Claude to Google Drive. Automatically activates on phrases like 'upload to Drive', 'save to Drive'. Supports any file type, unlimited free uploads.
Ships in MSApps Google Drive Upload. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Upload files directly to Google Drive via a deployed Google Apps Script web app.
Completely free — unlimited uploads, no restrictions.
Environment note: This skill works in both Claude Code and Cowork. The only difference is how the config file is read in Step 1 — Claude Code reads it directly, Cowork uses osascript.
The config lives on the Mac at ~/.cowork-gdrive-config.json.
In Claude Code (direct file system access):
CONFIG=$(cat ~/.cowork-gdrive-config.json 2>/dev/null || echo "NOT_CONFIGURED")
In Cowork (VM — needs osascript to reach the Mac home):
CONFIG=$(osascript -e 'do shell script "cat ~/.cowork-gdrive-config.json 2>/dev/null || echo NOT_CONFIGURED"')
Then parse it safely in Python — never log or print the raw config string:
python3 -c "
import json, sys
raw = '''$CONFIG'''
if raw.strip() == 'NOT_CONFIGURED':
print('STATUS:NOT_CONFIGURED')
sys.exit(0)
try:
cfg = json.loads(raw)
print('STATUS:OK')
print(f'URL:{cfg[\"url\"]}')
except Exception as e:
print(f'STATUS:PARSE_ERROR:{e}')
"
STATUS:NOT_CONFIGURED → tell the user: "The Google Drive connection isn't set up yet. Please follow the setup instructions at https://msapps.mobi/plugins to configure your Apps Script URL." Stop here.STATUS:PARSE_ERROR → tell the user the config file is malformed and ask them to check ~/.cowork-gdrive-config.json.STATUS:OK → extract URL from output. Continue.Check common output locations — use the file the user specified, or find the most recent:
ls -lt "$HOME/Documents/Claude/"*.* 2>/dev/null | head -5
ls -lt /sessions/*/mnt/outputs/ 2>/dev/null | head -5
ls -lt /sessions/*/mnt/Claude/ 2>/dev/null | head -5
Ask the user to confirm which file to upload if it's not obvious.
Always use the temp file approach — it handles filenames with spaces, Hebrew characters, and special chars safely:
FILE="<absolute-path-to-file>"
FILENAME=$(basename "$FILE")
B64=$(base64 "$FILE" | tr -d '\n')
MIME=$(file --mime-type -b "$FILE")
GDRIVE_URL="<URL from Step 1>"
cat > /tmp/gdrive_payload.json << JSONEOF
{
"fileName": "$FILENAME",
"content": "$B64",
"mimeType": "$MIME",
"folderPath": "Claude Uploads"
}
JSONEOF
RESPONSE=$(curl -s -L --fail --max-time 60 \
-H "Content-Type: application/json" \
-d @/tmp/gdrive_payload.json \
"$GDRIVE_URL")
CURL_EXIT=$?
rm -f /tmp/gdrive_payload.json
echo "CURL_EXIT:$CURL_EXIT"
echo "RESPONSE:$RESPONSE"
Handle the response:
CURL_EXIT is non-zero → upload failed (network error, timeout, bad URL). Tell the user.CURL_EXIT is 0 → parse RESPONSE as JSON and check "success": true.
success: false → report the error message from "error" field.success: true → proceed to Step 4.Tell the user:
"fileUrl" in the API response)Example:
"Uploaded report.pdf to Google Drive → View file"
The POST body supports:
folderPath: "Folder/Subfolder" — creates folders if neededfolderId: "1abc..." — specific folder ID"replaceExisting": true to overwrite a file with the same name~/.cowork-gdrive-config.jsonWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub msapps-mobile/claude-plugins --plugin google-drive-uploadOther plugins' skills for the same job