Outlook Groups icon

Outlook Groups

Interact with Microsoft Outlook Groups and SharePoint

SharePoint → Upload Attachments

AI-generated

Summary

Upload multiple attachments to a specified SharePoint document library folder, optionally overwriting existing files and adding timestamps to filenames to avoid conflicts.

Inputs

  • SharePoint Site (required) — Select the SharePoint site where the attachments will be uploaded.
  • Document Library (required) — Choose the document library within the SharePoint site to store the files.
  • Folder Path — Specify the folder path inside the document library where files should be uploaded. Leave empty to use the root.
  • Overwrite Existing — Decide whether to overwrite files that have the same name in the target folder. Defaults to true.
  • Add Timestamp to Filename — Optionally add a timestamp to each filename when uploading to avoid name conflicts. Defaults to false.
  • Attachments (required) — Provide a JSON array of attachment objects, each with 'name' and 'contentBytes' properties representing the filename and base64-encoded content respectively.

Output shape

a list of objects indicating upload results for each attachment

Each result object includes upload success status, sanitized filename, original filename, SharePoint file ID, web URL, file size, and error message if any upload failed.

Examples

Example 1: Upload three attachments to a SharePoint folder 'Invoices/2024' within a specific site and document library, adding timestamps to filenames to avoid conflicts, and overwriting existing files.

Set 'siteId' to target SharePoint site, 'driveId' to document library, 'folderPath' to 'Invoices/2024', 'overwrite' to true, 'addTimestamp' to true, and supply an array of attachments with names and base64-encoded content bytes.

Links

Discussion