Prerequisites:
References:
Refresh Token for connection to OneDrive
In One Drive Plugin Connection Configuration we need to provide connectivity details for a -OneDrive instance as mentioned in the table below.
Connection Details:
No. | Field Name | Datatype | Mandatory? | Description |
1 | Refresh Token | String | Yes | Refresh Token provided by authorization grant flow discussed in sections below. |
2 | Test Connection | Button | -- | Verifies whether the connection is established or not. |
Following are the steps for generating refresh token for OneDrive plugins,
Get OneDrive Folder or File - Path
Folder or File – Path/ID is required in most OneDrive Plugin steps. Refer Appendix 18: OneDrive Folder/File - Path to get Path.
OneDrive Plugin steps are discussed below,
Prerequisite Permissions:
For Delete File or Folder on OneDrive following Microsoft Graph permissions are required.
Permission type | Permission (from least to most privileged) |
Delegated (work or school account) | Files.ReadWrite, Files.ReadWrite.All |
References:
https://docs.microsoft.com/en-us/graph/api/driveitem-delete?view=graph-rest-1.0&tabs=http
One Drive: Delete File or Folder plugin step deletes a file or folder on OneDrive.
Configuration:
No.
Field Name
Description
1
Step Name
Name of the step. This name has to be unique in a single workflow.
Connection:
2
Checkbox: Accept value as variable/static
Leave 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.
3
Refresh Token
Generate and specify Refresh Token as detailed in Appendix 17: OneDrive Refresh Token.
The data type is String. This field is mandatory.
If checkbox above is enabled Password field appears as Text box (enter static value or environment variable). Else if checkbox above is disabled Password field appears as a drop down to select fields from previous steps.
4
Button: Test Connection
Verifies whether the connection is established or not.
Input Tab:
No.
Field Name
Description
Input Fields:
1
File or Folder ID/ Path
Provide OneDrive file/folder ID or path to delete file or folder.
The field data type is String. This is mandatory.
To delete a folder in root specify Documents/
Else to delete a file/folder in any other path - Get OneDrive Path/ID as described in sections -
- Refer Appendix 18: OneDrive Folder/File - Path: Get Folder Path Get Folder Path
- Refer Appendix 18: OneDrive Folder/File - Path: Get File Path
- (You can use the ‘Upload File’ step to get Folder/File ID as an output of step execution).
e.g. If OneDrive path == https://organization-my.sharepoint.com/personal/xyz/Documents/demofolder/File.xlsx
Then provide,
- Documents/demofolder/File.xlsx
- demofolder/File.xlsx
Prerequisite Permissions:
For Download File on OneDrive the following Microsoft Graph permissions are required.
Permission type | Permission (from least to most privileged) |
Delegated (work or school account) | Files.Read, Files.ReadWrite, Files.Read.All, Files.ReadWrite.All |
References:
https://docs.microsoft.com/en-us/graph/api/driveitem-get-content?view=graph-rest-1.0&tabs=http
One Drive: Download File step downloads a file on OneDrive.
Configuration:
No.
Field Name
Description
1
Step Name
Name of the step. This name has to be unique in a single workflow.
Connection:
2
Checkbox: Accept value as variable/static
Leave 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.
3
Refresh Token
Generate and specify Refresh Token as detailed in Appendix 17: OneDrive Refresh Token.
The data type is String. This field is mandatory.
If checkbox above is enabled Password field appears as Text box (enter static value or environment variable). Else if checkbox above is disabled Password field appears as a drop down to select fields from previous steps.
4
Button: Test Connection
Verifies whether the connection is established or not.
Input Tab:
No.
Field Name
Description
Input Fields:
1
OneDrive File ID/Path
Provide 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 as described in sections -
- Get File PathRefer Appendix 18: OneDrive Folder/File - Path: Get File Path
- (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
2
Output Folder Path
Specify the folder to store the downloaded file.
The field data type is String. This is mandatory.
3
Browse
On click of this button brings up the dialog to select the output folder path.
4
Convert In Format
5
Delete Output Folder Contents Before Downloading
Specify from the allowed values: Yes/No.
The field data type is String. This is mandatory.
6
Add DateTimeStamp For Duplicate File
Specify from the allowed values: Yes/No.
The field data type is String. This is mandatory.
7
Add File To Result
Specify from the allowed values: Yes/No.
Specify Yes to make the file available for download on AutomationEdge server (through Requesuts menu) after workflow execution.
The field data type is String. This is mandatory.
8
Width
Provide the width of output JPG image (JPG width).
This field is mandatory for conversion to jpg. The field data type is String.
9
Height
Provide the height of output JPG image (JPG width).
This field is mandatory for conversion to jpg. The field data type is String.
Input Tab:
No.
Field Name
Description
Input Fields:
1
File Overwritten?
Provide output field name to hold the value for file overwritten (Yes/No). Default is ‘FileOverwritten’. The field data type is String.
Prerequisite Permissions:
For Upload File step on OneDrive the following Microsoft Graph permissions are required.
Permission type | Permission (from least to most privileged) |
Delegated (work or school account) | Files.ReadWrite, Files.ReadWrite.All |
Referencs:
One Drive: Upload File Step uploads a file on OneDrive.
Configuration:
No.
Field Name
Description
1
Step Name
Name of the step. This name has to be unique in a single workflow.
Connection:
2
Checkbox: Accept value as variable/static
Leave 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.
3
Refresh Token
Generate and specify Refresh Token as detailed in Appendix 17: OneDrive Refresh Token.
The data type is String. This field is mandatory.
If checkbox above is enabled Password field appears as Text box (enter static value or environment variable). Else if checkbox above is disabled Password field appears as a drop down to select fields from previous steps.
4
Button: Test Connection
Verifies whether the connection is established or not.
Input Tab:
No.
Field Name
Description
Input Fields:
1
File To Upload
Provide file path to upload.
The data type is String. This field is mandatory.
2
Browse
Click button to open the dialog to select the file path to upload.
3
OneDrive Folder Path
Specify the name of OneDrive folder path where the file is to be uploaded.
The data type is String. This field is mandatory.
To Upload File to root specify Documents/
Else to upload File to any other path - Get OneDrive Path/ID as described in sections -
- Refer Appendix 18: OneDrive Folder/File - Path: Get Folder Path Get Folder Path
- Refer Appendix 18: OneDrive Folder/File - Path: Get File Path
- (You can use the ‘Upload File’ step to get Folder/File ID as an output of step execution).
e.g. If OneDrive path of the folder where file is to be uploaded is - https://organization-my.sharepoint.com/personal/xyz/Documents/demofolder
Then provide,
- Documents/demofolder or
- demofolder
e.g. If file is to be uploaded on a new folder(abc) that is to be created on OneDrive, and the path of the new folder abc is,
If OneDrive path == https://organization-my.sharepoint.com/personal/xyz/Documents/abc
If abc folder is to be created then provide,
- Document/abc
- abc
4
Create Folder(if not exists)
Specify from allowed values: Yes/No.
The data type is String.
5
File Name After Upload (Rename)
Specify the new name if file is to be renamed after upload.
The data type is String.
6
If File Exists On OneDrive Path
Specify from allowed values:
- AutoRename,
- Overwrite
- ThrowException.
The data type is String.
Output Tab:
No.
Field Name
Description
Output Fields:
1
Uploaded File ID
Specify a fieldname to hold the output - uploaded file id.
Default is UploadedFileID. The data type is String.