Actions11
File → Update
AI-generatedSummary
Update a file's metadata and optionally its content in a specified SharePoint site folder.
Inputs
- subdomain (required) — The SharePoint subdomain (e.g., 'mycompany' in mycompany.sharepoint.com) to target the site.
- site (required) — The SharePoint site where the file resides, selected by list or by ID.
- folder (required) — The folder within the site which contains the file to update, selected by list or by ID.
- file (required) — The specific file to update, selected by list or by ID.
- fileName — The new name for the file. If omitted, the original file name is retained.
- changeFileContent (required) — Boolean flag indicating whether to update the file's binary content.
- fileContents (required) — The name of the input binary data field containing the updated file content; required if changing file content is true.
Output shape
a list of updated file records, each represented as JSON objects with properties returned from SharePoint containing file metadata.
If 'changeFileContent' is true, the file content is updated by PUTting binary data to the file endpoint before sending the PATCH request to update metadata. The operation returns updated file information. Proper binary input must be available under the specified 'fileContents' property.
Examples
Example 1: Update file name only
Specify subdomain, site, folder, and file IDs; provide an updated file name; set 'Change File Content' to false.
Example 2: Update both file name and content
Specify subdomain, site, folder, and file IDs; provide an updated file name (optional); set 'Change File Content' to true; provide binary data under the specified 'Updated File Contents' input field.