Upload File
AutomatR.OneDriveApp.Activities.UploadFile
The "Upload File" activity in AutomatR is part of the OneDrive activities package, facilitating the upload of a local file to your OneDrive account using the Microsoft upload API. This activity streamlines the process of uploading files, enhancing the efficiency of automation workflows.
Properties
Name | Description |
---|---|
Input | |
Destination Path | Specifies the destination path within your OneDrive account where the file should be uploaded. It represents the directory path. String variables containing the destination path. |
Source Path | Specifies the full path of the file on your local drive, including the filename, that you want to upload. For example: "C:\UploadFile\uploadfile.xlsx". String variables containing the local file path. |
Overwrite | When selected, overwrites the files in the destination path with the file to be uploaded. Boolean variables to control overwrite behavior. |
Misc | |
Display Name | Provides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before executing the "Upload File" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1. |
Output | |
Result | Outputs the result of the "Upload File" operation, indicating whether the file upload was successful or any encountered errors. Variables of relevant types (e.g., Boolean variables) to store the operation result. |
How to Use
- Drag and drop the "Upload File" activity onto the workflow.
- Configure the properties by specifying the destination path and the source path of the file to be uploaded.
- Optionally, configure the delay, select the overwrite option, and customize the display name.
- Execute the workflow to upload the specified file to the destination path within OneDrive.
Example:
Consider an example where the "Upload File" activity is used to upload a file named "uploadfile.xlsx" from a local drive to a folder within OneDrive:
Upload File:
Display Name: "Upload Excel File"
Source Path: "C:\UploadFile\uploadfile.xlsx"
Destination Path: "/Documents/ExcelFiles/"
Overwrite: true
Result: isUploadSuccessful
In this example, the activity uploads the "uploadfile.xlsx" from the local path "C:\UploadFile\" to the "/Documents/ExcelFiles/" folder within OneDrive. The overwrite option is set to true
, and the result of the operation (success or failure) is stored in the Boolean variable "isUploadSuccessful" for further handling in the workflow.