Find Files and Folders Query field

Hello all,

I’m attempting to use the Office365 activities package. I’ve successfully authenticated to our tenant and created an Application ID. I’ve been able to perform some basic operations with activities (e.g creating files and folders on my own account’s OneDrive) but cannot find any references on how to utilise the activities beyond what is contained here (and the related articles for each activity).

Specifically, what I’d like to be able to do is use a Find Files and Folders activity to reference a specific file on a specific SharePoint site. I’ve managed to output the names of the folders (using a write line) for the Root of the site in question, and the names listed are correct. What I can’t work out is how to then drill deeper into the folder structure.

Has anyone found an expression format that will allow me to specify a location within a folder structure within a document library of a SharePoint site using the query field in a “Find Files and Folders” activity?
image

Alternatively, is there a better way to do this?

Hi @Mark.Edgeller

Maybe i dont get it the question properly. But if you want to find some files you need to use the activities .image just put the path type and use boolean condition.

cheers :smiley:

Happy learning :smiley:

3 Likes

Hi @pattyricarte,

The reason this will not work is because Path Exists only works on local (or shared network) drives. I’m trying to work with Office365 storage (i.e. Cloud based).

I am facing the problem with Office 365 activity “Find Files and Folders”. It is returning the files correctly sometimes and most of the times it is failing and returning 0 files.

Same question ! What is the syntax used for “query” parameter ?

Hi Ravisangam ! Have you solved your problem with Root in Sharepoint (365 activities) ? Because a I have the same.

Still looking for this solution…

From what i have observed, this activity looks in the Documents folder inside the One Drive and so one has to develop with that thing in mind.
For verification and better understanding, run the activity with input as blank and use a for each loop with write line activity to display the names of each driveitem.

1 Like

When using the Find Files And Folders root folder by default is the “Documents” folder. You can then specify the Subfolder as needed (ex. /folder1/folder/2/ect…). If the file you are looking for is not in the Documents folder or one of its subfolders then you will need to use the “Drive Name”. You will put the name of the folder that is at the same level as the Documents folder in the “Drive Name” field. Then you can add additional subfolders as needed in the “Subfolder” field as mentioned above.

Unfortunately, I’m still trying to figure out exactly how to use the “Query” field. I have tried putting the name of a file and it will return that file however sometimes it returns other files also and I’m not sure why.

Hi Mark! I solved the problem doing that:

You have to write the extact name of the file or folders you wanna find. For exemple, if you want to find the excel named “Invoice_Tech” you have to put in the query “Invoice_Tech.xlsx” and the bot will search all your entire files in your computer until he finds the exact file.