Find Files And Folders

Finds files or folders in OneDrive or SharePoint.

This activity finds files or folders that match the given search criteria from OneDrive or SharePoint using the Microsoft Graph Search items API. By default the activity searches in the connected OneDrive.

Input

  • Connection Id: GraphServiceClient Variable Required Specifies the office 365 connection id.

  • Query: String Argument Specifies the text search phrase for retrieving the files or folders. If given blank, it returns the root folder's content. For example: "SampleFolder" - Searches all the files and folders that match the phrase SampleFolder.

  • SubFolder: String Argument Specifies the path of the subfolder in which the search is to be performed. If given blank, the root folder is searched. This is an optional property. For example:- "SampleFolder" or "SampleFolder/subfolder1"

SharePoint

  • Drive Name: String Argument Specifies the name of the drive within OneDrive or SharePoint to search for the specified files or folders. If the given drive exists within SharePoint, then the Site Url must be specified. If the field is left blank, the search is carried out in the default drive (Documents) of the SharePoint site that is specified in the Site Url field.

  • Site Url: String Argument Specifies the URL of the SharePoint site to search for the specified files or folders. It's required only when searching in SharePoint.

For example,

Output

  • First: DriveItem Variable Required Specifies the first file or folder that matches the user-specified query as a DriveItem Object.

  • Results: DriveItem Variable Required Specifies all the files and folders that match the user-specified query which is returned as an array of DriveItems.We can use the Results output variable directly in other activities by specifying the element in the array we need to use. For example : Results[1].

Last updated