UploadFile

Estimated reading: 4 minutes 2159 views

This activity allows users to upload any file from their local system to a specified folder in the connected Google account.

Limitations

All types of files can be uploaded, except for .exe files, which are restricted.

Properties

Configuration

Each activity requires a connection with Google Drive API. Once you select the respective project name where Google Drive has been integrated, the activity will automatically retrieve the available connections for that project.

Below are the properties available after the project has been integrated:

Google Drive: This parameter indicates the account name associated with the integration.

INPUT

FilePath: *This parameter allows users to select the file path to be uploaded to the specified folder. It provides multiple options for selecting the file:

1. BrowseFile: Enables users to browse and select files from the local system by opening the file explorer. Each file must be manually selected each time by the user.
2. BrowseFolder: Enables users to browse and select folders from the local system by opening the file explorer. Each folder must be manually selected each time by the user.
3. Clear: Allows users to clear all the selected file/folder values.
4. Use Variable: Allows users to specify the “File/Folder Path” using a variable in “String” format. The values can be hardcoded as a string or passed as a variable of the “String” datatype.

DestinationFolder: *This parameter specifies to provide the existing Folder available in Google drive against where the file needs to be uploaded. It offers multiple ways to choose the folder:

1. Browse Option: When selecting the “Click on Browse” option, it will automatically list the folders available for the specified account. The user must manually select the spreadsheet each time when using this option.
2. Three-Line Menu: Clicking on the “Three lines” icon will open a context menu with the following two options.
a. Reload Folder Picker: Refreshes the selected folder to select another folder if required.
b. Use Variable: Allows you to provide the “Folder Name” as a variable in “String” format. You can either hardcode the values as a string or use a variable of the “String” datatype. Below are the values that can be provided as variable,
     i. URL or ID: After creating the folder in the specified Google account, you will receive the Folder’s URL and ID. You can use these as a reference to add a new folder.
    ii. Folder Name: You can either hardcode the name as a string or provide a variable of the “String” datatype.

OverwriteOption: This option allows users to overwrite an existing file or folder in the specified folder within the connected Google account. Use this option if the file or folder at the provided path already exists in the destination folder. 

MISC

DisplayName: Displays the name of the activity. The activity name can be customized, which aids in troubleshooting.

SkipOnError: Specify the “Boolean” value as “True” or “False.”

True: Continue executing the workflow regardless of any errors thrown.
False: Halt the workflow if it encounters any errors.
None: If the option is left blank, the activity will, by default, behave as if “False” were chosen.

Version: It indicates the version of the feature being used.

OUTPUT

Result: It provides the ability to view the execution status of the activity. It returns values in “Boolean.”

True: Indicates that the activity has been executed successfully without any errors.
False: Indicates that the activity has been unsuccessful due to an unexpected error being thrown.

UploadedFileDetails: This option helps the user to view the details of the uploaded file, which includes the following information:

ID: The unique identifier of the file uploaded to the specified folder.
Name: The full name of the uploaded file.

URL: The link to access the uploaded file.
ParentID: The unique identifier of the folder where the file has been uploaded.

Represents mandatory fields to execute the workflow.

How to View the Output?

The parameter UploadedFileDetails is of the datatype
“List<Robility.GoogleDrive.UploadedFileInfo>”.

To view the list of details, follow these steps using the ForEach activity:

1. Drag and Drop the ForEach activity into your workflow.
2. In the Properties panel, set the “Type Argument” to “GoogleDrive.UploadedFileInfo” by selecting it from the “Browse for types” option.
3. Add a Write Log activity inside the ForEach sequence to print the output of the activity.
4. In the Write Log activity, set the input string as “ID” to print the ID of the uploaded file.
5. Set the Log Level to Info.
6. You can follow the same steps to view additional details:
a. Name – To view the name of the uploaded file.
b. URL – To view the URL of the uploaded file.
c. ParentID – To view the ID of the folder where the file has been uploaded.

Share this Doc

UploadFile

Or copy link

CONTENTS