Skip to main content
Roberty Studio
RPASharePoint

Downloads a drive file

Downloads a drive file

Downloads a file from a SharePoint drive to a local path.


Options​

Drive​

Select the action that gets the SharePoint drive: Get a drive from the list or Get drive by name.

Path of the file to download​

Enter the path of the file, including the name and extension, from the root of the drive, for example Documents/report.pdf.

Local path to save the file​

Enter the local path where the file will be saved, including the file name, for example C:\Downloads\report.pdf.

Returns​

Javascript code​

js
actions["action-id"].success // indicates if the file was downloaded successfully (Boolean)
actions["action-id"].error // possible error description (Text)

Field selection​

  • success — indicates if the file was downloaded successfully (Boolean)
  • error — possible error description (Text)

Rules and Conditions​

  • The Drive, Path of the file to download and Local path to save the file fields are required.
  • The file must exist in the selected drive.
  • The local destination directory must exist before the download.
  • If Microsoft Graph rejects the operation (item not found, insufficient permission, etc.), the action fails with the error message returned by the API.