MS OneDrive Business icon

MS OneDrive Business

Access MS OneDrive for Business and SharePoint

File → Download

AI-generated

Summary

Download a file from OneDrive Business, returning its binary attachment or decoded text according to the selected output mode.

Inputs

  • driveType — Type of drive to access (user OneDrive, SharePoint site, or shared link).
  • sharedLinkUrl (required) — Paste the sharing link of the shared folder or file.
  • userId — User email or ID; leave empty to use the authenticated user.
  • siteId (required) — SharePoint site identifier (list, URL, or ID).
  • fileSelection — Method to specify the target file (browse, path, ID, or sharing link).
  • fileSharingUrl (required) — Sharing link copied from OneDrive/SharePoint for the file.
  • browseFolder1 (required) — First folder level to navigate; shown when fileSelection is browse.
  • filePath (required) — Full path from the drive root (e.g., /Documents/file.pdf).
  • fileId (required) — Unique identifier of the file.
  • outputMode — How the file content is returned (binaryOnly, both, markdownDocx, textOnly, textOnlyNoMeta).
  • textFieldName (required) — JSON field name where decoded text content is stored.
  • binaryPropertyName (required) — Binary property name where the downloaded file data is stored.

Output shape

JSON object containing optional binary attachment and/or a field named by textFieldName with decoded content; exact presence depends on outputMode.

binaryOnly or both attach the file as binary; textOnly/textOnlyNoMeta/markdownDocx place decoded content in the specified text field and suppress the binary attachment.

Examples

Example 1: Download a PDF from personal OneDrive as a binary attachment.

driveType=user, fileSelection=browse, OutputMode=binaryOnly, binaryPropertyName=data, textFieldName=data

Example 2: Convert a .docx from a shared folder to Markdown, store markdown in a custom field, and also attach the binary.

driveType=sharedLink, sharedLinkUrl=https://contoso.sharepoint.com/:f:/, fileSelection=link, outputMode=markdownDocx, imageHandling=placeholder, textFieldName=markdown, binaryPropertyName=data, filePath=/Documents/report.docx

Links

Discussion