Update Drive File
update_drive_fileUpdate a Google Drive file's metadata, properties, or content in place, preserving its ID and sharing settings. Replace content by text, file path, or URL.
Instructions
Updates metadata, properties, and/or content of a Google Drive file.
Providing one of content, file_path, or file_url replaces the file's
content in place. The source is uploaded with its source MIME type so the Drive
API applies the same format conversion as import_to_google_doc (markdown headings,
tables, bold, etc.) while preserving the existing file ID, sharing, comments, and
links. Metadata and content can be updated in a single call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_google_email | Yes | The user's Google email address. Required. | |
| file_id | Yes | The ID of the file to update. Required. | |
| name | No | New name for the file. | |
| description | No | New description for the file. | |
| mime_type | No | New MIME type (note: changing type may require content upload). | |
| add_parents | No | Comma-separated folder IDs to add as parents. | |
| remove_parents | No | Comma-separated folder IDs to remove from parents. | |
| starred | No | Whether to star/unstar the file. | |
| trashed | No | Whether to move file to/from trash. | |
| writers_can_share | No | Whether editors can share the file. | |
| copy_requires_writer_permission | No | Whether copying requires writer permission. | |
| properties | No | Custom key-value properties for the file. | |
| content | No | New text content for text-based formats (markdown, TXT, HTML). | |
| file_path | No | Local file path for binary formats (DOCX, ODT). Supports file:// URLs. | |
| file_url | No | Remote http(s) URL to fetch new content from. | |
| source_format | No | Source format hint for conversion (md, markdown, docx, txt, html, rtf, odt). Auto-detected when omitted. Provide at most one of content/file_path/file_url. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |