Search Files or Folders

Search a file or folder in OneDrive. Search may be matched across several fields including file or folder name, metadata, and file content.

Options

Field Definition Type Required
Result Set

Choose a method to filter search results:

  • First Matching Record: Returns the first record that matches.

  • First 200 Matching Records: Returns the first 200 matching records.

  • Stream Matching Records: Passes all matching records from your parent flow to a helper flow.

    Selecting this option adds a Streaming input section to the card where you can select a helper flow for streaming and add custom extensible fields.

Dropdown

TRUE

Source

Choose a source:

  • My Drive: authenticated user's OneDrive.
  • Drive ID: a specified drive by the drive's unique ID.
  • Group ID: a specified group's document library for a group by the group's unique ID.
  • User ID: a specified user by the user's unique ID.

Dropdown

TRUE

Input

Field Definition Type Required
Query Query text used to search for items. Values may be matched across several fields including file or folder name, metadata, and file content.

Text

TRUE

Drive

Drive ID

Unique ID for the drive requested.

Appears when Drive ID is selected from the Source option.

Text

TRUE

Group

Group ID

Unique ID for the group which owns the document library.

Appears when Group ID is selected from the Source option.

Text

TRUE

User

User ID

Unique ID for the user object who owns the drive item.

Appears when User ID is selected from the Source option.

Text

TRUE

Search Criteria

Record Limit

Specify the number of records to stream.

  • When the Limit field is set to 0, the stream returns no records.

  • When the Limit field is set to greater than 0, the stream returns up to the maximum number specified.

  • When the Limit field is empty, null, or not selected, the stream returns all records.

  • The default value is 10000000 (10 million).

  • The valid range is from 0 to 10000000.

This field appears when you select Stream Records from the Result Set option.

Number

FALSE

Streaming
Flow Click Choose Flow to browse and select a helper flow to which the search results will be streamed, then click Choose to confirm.

Optionally, click the empty field under Click or drop here to create and add custom extensible fields that pass data to the helper flow. These fields are added as key/value pairs under the State output object in the helper flow.

Appears when Stream Records is selected from the Result Set option.

Flow

TRUE

Output

Field Definition Type

Files or Folders

File and Folder ID Unique ID of the file or folder.

Text

Name Name of the item.

Text

Type Type of the drive item. Possible values are: File or Folder.

Text

Parent Reference

Drive ID Unique ID for the drive requested.

This field appears for Drive ID selected from Location in Options.

Text

Drive Type
Parent Folder ID ID of the folder to which you want to upload the file; leave empty for root.

Text

Created By

Name Name of the user who created the item.

Text

Email Unique ID of the user.

Text

Created Date Date and time of item creation.

Date & Time

Last Modified By The last user to modify the resource.
Name Name of the user who modified the item.

Text

Email Unique ID of the user.

Text

Last Modified Identity of the folder which last modified the item.

Text

Folder

Child Count Number of children contained immediately within this container.

Number

File

Mime Type MIME type for the file. This is determined by logic on the server and might not be the value provided when the file was uploaded.

Text

Web URL URL that displays the resource in the browser.

Text

Size Size of the item in bytes.

Number

Records Streamed

Number of records streamed in a streaming flow.

This field appears when you select Stream Matching Records from the Result Set option.

Text

Additional information

  • Users must be part of the group or have direct access to the file to read permissions of a file in that group.

Related topics

OneDrive connector

Workflow elements

Guidance for OneDrive connector

Microsoft Graph API documentation