Create Drive File
create_drive_fileCreate new files in Google Drive, including shared drives, using text, base64-encoded content, or a URL as the file source.
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.
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_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 |