drive_update_file
Replace an existing Google Drive file's content without changing its link, location, or sharing. Overwrites in place, keeping a recoverable revision.
Instructions
Replace the contents of an existing Drive file, in place.
This is the operation the Drive connector is missing: it writes to the file's existing id, so the file keeps its link, its location, and its sharing, and no duplicate is created. Drive retains the previous content as a revision, so an overwrite is recoverable through the file's version history in the Drive UI.
file is either a Drive file id (the token in the file's URL) or a
slash-separated path from your My Drive root, e.g.
Career/consulting/rates.md. A path that matches more than one file
is an error rather than a guess. content is the complete new text —
this replaces the file, it does not append, so send the full document.
mime_type overrides the upload type; by default it is guessed from
the file's name and Drive keeps the target file's own type.
Refuses to write to Google-native files (Docs, Sheets, Slides), where a
plain-text upload would replace a formatted document with its text.
Returns the file's id, name, path, and new modified_time.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| content | Yes | ||
| mime_type | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||