GetFileorFolder

Estimated reading: 4 minutes 2142 views

This activity helps the user to retrieve the information of the specified file or folders in the connected google account.

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

FileorFolder: *This parameter indicates to provide the File/ Folder against which the details need to be retrieved. 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.

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

DriveFileorFolder: This parameter provides the output of the activity as the details retrieved from the specified file or folder. Below is the information that can be retrieved:

CreateDate: Displays the creation date of the file or folder.
ID: Provides the unique identifier of the file or folder.
Modified Date: Shows the latest modified date of the file or folder.
Name: Displays the name of the file or folder.
Owner: Indicates the account holder’s name for the file or folder in Google Drive.
Size: Provides the total size of the file or folder.
Type: Specifies the type of file and indicates “Folder” if a folder is selected.

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.

* Represents mandatory fields to execute the workflow.

How to view the details of the file/ folder?

The parameter DriveFileorFolder is of the datatype
List<Robility.GoogleDrive.DriveFileorFolder>.

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 Robility.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 “Item.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. Item.Name – To view the name of the uploaded file.
b. Item.URL – To view the URL of the uploaded file.

Share this Doc

GetFileorFolder

Or copy link

CONTENTS