Skip to content

Search

Search is a component that lets you look for files in your Microsoft OneDrive account.
You can do a quick search, a semantic search that understands context, or an advanced search with many filters.
The component talks to Microsoft’s OneDrive API, so you need a OneDrive credential set up in Nappai first.

How it Works

When you use Search, Nappai sends a request to the OneDrive API with the parameters you set.
If you’re in Mapping Mode, the component can take a list of records and run the search for each one, returning a list of results.
The API returns the matching files, and the component gives you two outputs: a list of results you can use in the workflow, and a “Tool” that can be called by an AI agent.

Operations

This component offers several operations that you can select based on what you need to do. You can only use one operation at a time:

  • Quick Search: Finds files that match a simple keyword or phrase.
  • Semantic Search: Uses natural‑language understanding to find files that are contextually relevant.
  • Advanced Search: Lets you filter by date, author, file type, size, and more.

To use the component, first select the operation you need in the Operation field.

Inputs

Mapping Mode

This component has a special mode called “Mapping Mode”. When you enable this mode using the toggle switch, an additional input called “Mapping Data” is activated, and each input field offers you three different ways to provide data:

  • Fixed: You type the value directly into the field.
  • Mapped: You connect the output of another component to use its result as the value.
  • Javascript: You write Javascript code to dynamically calculate the value.

This flexibility allows you to create more dynamic and connected workflows.

Input Fields

The following fields are available to configure this component. Each field may be visible in different operations:

  • Credential: Select a previously configured Microsoft One Drive credential to authenticate the component.

    • Visible in: Quick Search, Semantic Search, Advanced Search
  • Operation: Choose which type of search to perform.

    • Visible in: Quick Search, Semantic Search, Advanced Search
  • Search Query: The keyword or natural‑language description you want to search for. This field is required.

    • Visible in: Quick Search, Semantic Search, Advanced Search
  • Max Results: The maximum number of files to return.

    • Visible in: Quick Search, Semantic Search, Advanced Search
  • Top Score: Top score threshold for results. Values between 0 and 10 (less is better).

    • Visible in: Quick Search, Semantic Search, Advanced Search
  • File Extensions: Comma‑separated list of file extensions (e.g., pdf,docx,xlsx).

    • Visible in: Quick Search, Advanced Search
  • Date From: Start date for filtering (YYYY-MM-DD).

    • Visible in: Advanced Search
  • Date To: End date for filtering (YYYY-MM-DD).

    • Visible in: Advanced Search
  • Author Filter: Filter by file author/creator.

    • Visible in: Advanced Search
  • File Context: Context to enhance search results.

    • Visible in: Semantic Search
  • Size Filter: Filter files by size.

    • Visible in: Semantic Search
  • Time Filter: Filter files by modification time.

    • Visible in: Semantic Search
  • Mapping Mode: Enable mapping mode to process multiple data records in batch.

    • Visible in: Quick Search, Semantic Search, Advanced Search
  • Tool Name: The name of the tool that will be used when this component is connected as a tool. This name will be displayed to the agent when it selects tools to use.

    • Visible in: Quick Search, Semantic Search, Advanced Search
  • Tool Description: A detailed description of what this tool does. This description will help the agent understand when and how to use this tool effectively.

    • Visible in: Quick Search, Semantic Search, Advanced Search
  • Tools arguments metadata: Defines the arguments metadata for the tools.

    • Visible in: Quick Search, Semantic Search, Advanced Search

Important: Before using the component, make sure you have already created a Microsoft One Drive credential in the Nappai credentials section. Then select that credential in the Credential field above.

Outputs

  • Search Results: A list of files that match your search criteria. The data can be passed to other components or used directly in a workflow.
  • Tool: A tool representation that can be called by an AI agent. It includes the operation, query, and any relevant arguments.

Usage Example

Quick Search Example

  1. Enable the component and set Operation to Quick Search.
  2. Enter a simple keyword in Search Query (e.g., “budget report”).
  3. Set Max Results to 10.
  4. Choose a Credential that has access to your OneDrive.
  5. Run the workflow. The component will return the top 10 matching files in Search Results.

Advanced Search Example

  1. Set Operation to Advanced Search.
  2. In Search Query, type “annual financials”.
  3. Set Date From to “2023-01-01” and Date To to “2023-12-31”.
  4. Add “pdf,docx” to File Extensions.
  5. Set Max Results to 20.
  6. Select the appropriate Credential.
  7. Run the workflow. The component will return files that match all the filters.
  • OneDriveUploadComponent – Upload files to OneDrive.
  • OneDriveDeleteComponent – Delete files from OneDrive.
  • OneDriveListComponent – List files and folders in OneDrive.

Tips and Best Practices

  • Keep Max Results low (e.g., 10–20) to reduce API calls and improve performance.
  • Use Advanced Search when you need precise control over dates, authors, or file types.
  • If you’re running many searches in a row, enable Mapping Mode to process them in a single batch.
  • Store your OneDrive credentials securely in Nappai’s credential manager and never share them in the workflow.

Security Considerations

  • The component uses OAuth tokens from the Microsoft One Drive credential. Keep these credentials in the Nappai credential manager and avoid exposing them in logs or outputs.
  • Only grant the minimum permissions needed for the credential (e.g., read‑only access if you only need to search).
  • When using Mapping Mode, be mindful of the number of API calls; excessive requests may trigger rate limits or expose sensitive data.