3
Get files with Find Files activity
We will start by getting the files from the OneDrive folder to be downloaded. To do this, look for the Find Files or Folders activity, part of the OneDrive category, and drag it onto the design canvas. Then, set up its properties:
Note: To use these activities and OneDrive activities, you need to create the Oauth provider MS Office 365 as listed in the prerequisites.
For the Subfolder property, which should contain the folder name from where we will read the files, create an Argument:
Name: ReadFolder
Type: string
Default Value: "Demo_RPA_Onedrive_Write"
Note: If left empty, the bot will read files from the Root Folder. If you want to read files from a nested folder, specify the path as "Folder/SubFolder/…"
For the Item property, create a variable instead of the argument. This will store the first item ID found in the read folder:
Name: Item1
Type: OneDriveItem
For the Results property, create a variable instead of the argument. This will store the list of item IDs found in the folder:
Name: Itemlist
Type: OneDriveItem[] (Array of OneDriveItem)
To find the OneDriveItem[] data type, expand the Variable Type and select Array of [T]. In the pop-up, expand the dropdown under T value, click Browse for Type, and in the Type Name field, type OneDrive and select OneDriveItem under the Infor.Activities.OneDrive.Mode domain. Click OK.