Skip to main content

Download File

Prerequisite Permissions: For Download File from OneDrive the following Microsoft Graph permissions are required.

Permission typePermission (from least to most privileged)
Delegated (work or school account)Files.Read, Files.ReadWrite, Files.Read.All, Files.ReadWrite.All
Delegated (personal Microsoft account)Files.Read, Files.ReadWrite, Files.Read.All, Files.ReadWrite.All

Description

One Drive: Download File step downloads a file from OneDrive.

Note: Support is provided for the Personal Drive, however, the displayed error message is not correct.

Reference:

Configurations

No.Field NameDescription
Configuration:
1Step NameName of the step. This name has to be unique in a single workflow.
Connection:
2Client IDSelect the client ID for which you want to copy a file or folder.
Note: This field is mandatory for personal accounts.
3Checkbox: Accept value as variable/staticLeave checkbox unchecked to accept Refresh Token value from a field in the previous steps of the stream using a drop down list.
Else enable checkbox for Refresh Token field to appear as Text box.
4Refresh TokenSpecify the Refresh Token provided by authorization grant flow.
The data type is String. This field is mandatory.
5Button: Test ConnectionVerifies whether the connection is established or not.
Input Tab
Input Fields:
1OneDrive File ID/PathProvide OneDrive file ID or path to download file.
The field data type is String. This is mandatory.
Simply specify filename if it is to be downloaded from root (i.e. Documents/).
Else to download a file in any other path - Get OneDrive Path/ID–
• You can use the ‘Upload File’ step to get Folder/File ID as an output of step execution.
e.g. If OneDrive path is - https://organization-my.sharepoint.com/personal/xyz/Documents/demofolder/File.xlsx.
Then, provide –
• Documents/demofolder/File.xlsx or
• demofolder/File.xlsx
2Output Folder PathSpecify the folder to store the downloaded file.
The field data type is String. This is mandatory.
3BrowseOn click of this button brings up the dialog to select the output folder path.
4Convert In FormatSpecify the format in which the file is to be downloaded. The field data type is String.
For Supported file conversions refer URL mentioned in References.

Note: There are many supported file formats mentioned in Microsoft documentation. The following formats have been tested with expected results.

Supported source extensions for 'pdf'
doc, docx, epub, eml, htm, html, md, msg, odp, ods, odt, pps, ppsx, ppt, pptx, rtf, tif, tiff, xls, xlsm, xlsx.

Supported source extensions for 'jpg'
bmp, jpeg, jpg, png.

Supported source extensions for 'html'
eml, md, msg.
5Delete Output Folder Contents Before DownloadingSpecify from the allowed values: Yes/No.
The field data type is String. This is mandatory.
6Add DateTimeStamp For Duplicate FileSpecify from the allowed values: Yes/No.
The field data type is String. This is mandatory.
7Add File To ResultSpecify from the allowed values: Yes/No.
Specify Yes to make the file available for download on AutomationEdge server (through Requests menu) after workflow execution.
The field data type is String. This is mandatory.
8WidthProvide the width of output JPG image (JPG width).
This field is mandatory for conversion to jpg.
The field data type is String.
9HeightProvide the height of output JPG image (JPG height).
This field is mandatory for conversion to jpg.
The field data type is String.
Output Field:
1File Overwritten?Provide output field name to hold the value for file overwritten (Yes/No). Default is ‘FileOverwritten’. The field data type is String.