create_drive_file
Upload files to Google Drive from text content, a web URL, or a local file path. Creates a new Drive file with specified name and MIME type.
Instructions
Upload a file to Drive from content, a URL, or a local path.
Side effects: creates a new Drive file. To convert source files (Markdown, DOCX, etc.) into native Google Docs use import_to_google_doc instead. For a brand-new empty Google Doc/Sheet/Slide use create_doc/create_spreadsheet/create_presentation. Requires the drive.file OAuth scope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_google_email | Yes | The user's Google email address (authenticated account). | |
| file_name | Yes | Name for the new Drive file (include the file extension for clarity, though the MIME type is authoritative). | |
| content | No | Text content for the new file. Mutually exclusive with fileUrl. Provide one of content or fileUrl. | |
| folder_id | No | Parent folder ID. "root" = My Drive root; for shared drives pass a folder ID inside that drive. Default "root". | root |
| mime_type | No | MIME type of the uploaded bytes. Default "text/plain". When fileUrl is used and the server responds with a Content-Type, it overrides this. | text/plain |
| fileUrl | No | Source URL — supports file:// (local path), http://, and https://. When provided, the bytes are streamed into Drive. SSRF-protected with size limits. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |