MS OneDrive Business icon

MS OneDrive Business

Access MS OneDrive for Business and SharePoint

File → Upload

AI-generated

Summary

Upload a file to a specified destination folder on OneDrive or SharePoint.

Inputs

  • driveType — Type of drive to access
  • sharedLinkUrl (required) — Paste the sharing link of the shared folder (right-click → Share → Copy link in OneDrive/SharePoint)
  • userId — User email or ID. If empty, uses the authenticated user.
  • siteId (required) — The SharePoint site to access
  • fileSharingUrl (required) — Paste the sharing link copied from OneDrive or SharePoint ("Share → Copy link")
  • folderSelection — How to specify the upload destination folder
  • uploadFolderSharingUrl (required) — Paste the sharing link of the destination folder ("Share → Copy link")
  • parentId (required) — The folder where the file will be uploaded
  • browseFolderF1 (required) — Choose from the list, or specify an ID using an expression
  • browseFolderF2 — Select a subfolder to go deeper, or leave as is to use Level 1 as the target...
  • browseFolderF3 — Select a subfolder to go deeper, or leave as is to use Level 2 as the target...
  • browseFolderF4 — Select a subfolder to go deeper, or leave as is to use Level 3 as the target...
  • browseFolderF5 — Select the deepest target folder here, or leave as is to use Level 4 as the target...
  • fileName — Name for the uploaded file. Leave empty to use the filename from the binary data.
  • binaryData — Whether the file content is in binary format
  • binaryPropertyName (required) — Name of the binary property containing the file data
  • fileContent — Text content of the file

Output shape

A list of items representing the uploaded file, containing a binary attachment under binaryPropertyName (default data) and optional JSON metadata including file name and type.

The returned record may include additional fields such as json metadata depending on the selected output mode; binary data is attached as a Blob.

Examples

Example 1: Upload a local file to the root of OneDrive

driveType=user, sharedLinkUrl='', userId='', siteId='', folderSelection=browse, browseFolderF1=browse, parentId=root, binaryData=true, binaryPropertyName=data, fileName='myfile.txt'

Example 2: Upload using a SharePoint site folder path

driveType=site, siteId=contoso.sharepoint.com,..., folderSelection=path, parentId='/Documents/MyFolder', binaryData=true, binaryPropertyName=data, fileName='report.pdf'

Example 3: Upload to a shared folder via sharing link

driveType=sharedLink, sharedLinkUrl='https://1drv.ms/u/s!A...' , folderSelection=link, uploadFolderSharingUrl='https://contoso.sharepoint.com/:f:/...', binaryData=true, binaryPropertyName=data, fileName='data.xlsx'

Links

Discussion