upload_file
Upload a file to the user's Drive. The file must be base64-encoded. Max file size: 10 MB. Allowed types: PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, TXT, CSV, JPG, JPEG, PNG, GIF, WEBP, SVG, BMP. Filenames are sanitized (spaces to underscores, special characters removed).
upload_file
When to use
Upload a file to the user's Drive. The file must be base64-encoded. Max file size: 10 MB. Allowed types: PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, TXT, CSV, JPG, JPEG, PNG, GIF, WEBP, SVG, BMP. Filenames are sanitized (spaces to underscores, special characters removed).
Parameters to validate before calling
filename (string, required) — Original filename with extension (e.g., "report.pdf", "logo.png")
mime_type (string, required) — MIME type of the file (e.g., "application/pdf", "image/png", "text/csv")
file_data (string, required) — Base64-encoded file content
private (boolean, optional) — Privacy flag. Default: true (file is private to the user).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| private | No | Privacy flag. Default: true (file is private to the user). | |
| filename | Yes | Original filename with extension (e.g., "report.pdf", "logo.png") | |
| file_data | Yes | Base64-encoded file content | |
| mime_type | Yes | MIME type of the file (e.g., "application/pdf", "image/png", "text/csv") |