Create Drive File
create_drive_fileCreate files in Google Drive from text, base64, or a URL. Save content to any folder or shared drive without converting to Google Docs, Sheets, or Slides.
Instructions
Creates a new file in Google Drive, supporting creation within shared drives. Accepts direct text content, inline base64 bytes, or a fileUrl to fetch content from. This stores the supplied bytes without converting them to Google Docs, Sheets, or Slides. Use the matching import_to_google_* tool for Google-native conversion.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | No | If provided, the content to write to the file. | |
| fileUrl | No | If provided, fetches the file content from this URL. Supports file://, http://, and https:// protocols. | |
| file_name | Yes | The name for the new file. | |
| folder_id | No | The ID of the parent folder. Defaults to 'root'. For shared drives, this must be a folder ID within the shared drive. | root |
| mime_type | No | The MIME type of the file. Defaults to 'text/plain'. | text/plain |
| base64_sha256 | No | Expected SHA-256 of decoded base64_content. Recommended for binary payload integrity checks. | |
| base64_content | No | Standard base64-encoded file bytes. | |
| content_mime_type | No | MIME type for base64_content uploads. | |
| user_google_email | Yes | The user's Google email address. Required. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |