Skip to content

Folders

The Folders component lets you manage folders in your Microsoft OneDrive account directly from Nappai. You can list existing folders, create new ones, delete or share them with others, all without leaving the dashboard.

How it Works

When you use this component, Nappai talks to Microsoft’s OneDrive service through the Microsoft Graph API. The component sends a request to the API based on the operation you choose (e.g., list folders or create a folder). The API responds with the requested data or confirms the action, and Nappai returns that information as a Data object that can be used in later steps of your workflow. If you connect the component as a tool, it also exposes a Tool object that an agent can call.

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:

  • Get Folders: Retrieve a list of folders inside a specified parent folder.
  • Create Folder: Make a new folder inside a specified parent folder.
  • Delete Folder: Remove an existing folder by its ID.
  • Share Folder: Share a folder with one or more people and set their permission level.

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.

Before using this component, make sure you have set up a Microsoft One Drive credential in Nappai’s credentials section and select it in the “Credential” field of the component.

Input Fields

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

  • Parent folder: Specifies the folder that will contain the new folder or from which you want to list folders.

    • Visible in: Get Folders, Create Folder
  • Operation: Choose what you want the component to do.

    • Visible in: Get Folders, Create Folder, Delete Folder, Share Folder
  • Folder ID: The unique identifier of the folder you want to delete or share.

    • Visible in: Delete Folder, Share Folder
  • Folder Name: Name of the new folder you want to create.

    • Visible in: Create Folder
  • Mapping Mode: Toggle to process multiple records at once.

    • Visible in: Get Folders, Create Folder, Delete Folder, Share Folder
  • Parent Path: Full path or URL to the parent folder, e.g., /Documents or a SharePoint URL.

    • Visible in: Get Folders, Create Folder
  • Permission Role: Permission level you want to give when sharing a folder.

    • Visible in: Share Folder
  • Share with: Email addresses of people you want to share the folder with, separated by commas.

    • Visible in: Share Folder
  • Selection Mode: Choose how folders are selected when listing.

    • Visible in: Get Folders, Create Folder
  • Share Message: Optional message to include in the sharing invitation.

    • Visible in: Share Folder
  • Tool Name: Name of the tool that will be used when this component is connected as a tool.

    • Visible in: Get Folders, Create Folder, Delete Folder, Share Folder
  • Tool Description: Description of what this tool does.

    • Visible in: Get Folders, Create Folder, Delete Folder, Share Folder
  • Tools arguments metadata: Defines the arguments metadata for the tools.

    • Visible in: Get Folders, Create Folder, Delete Folder, Share Folder

Outputs

  • Data: The result of the chosen operation (e.g., a list of folders, details of a created folder, or a confirmation of deletion). This can be passed to other components in your workflow.
  • Tool: A tool representation that agents can call, including the tool name, description, and argument definitions.

Usage Example

Getting a list of folders

  1. Drag the Folders component onto the canvas.
  2. Set Operation to Get Folders.
  3. Enter the Parent Path (e.g., /Documents).
  4. (Optional) Enable Mapping Mode if you want to process several parent paths at once.
  5. Run the workflow. The component will return a list of folders in the Data output.

Creating a new folder

  1. Drag the Folders component onto the canvas.
  2. Set Operation to Create Folder.
  3. Enter the Parent Path (e.g., /Documents).
  4. Enter the Folder Name (e.g., ProjectX).
  5. Run the workflow. The component will create the folder and return its details in the Data output.
  • OneDriveFileComponent – Manage files (upload, download, delete) in OneDrive.
  • OneDriveFolderComponent – This component (Folders) – manage folders.

Tips and Best Practices

  • Use Mapping Mode when you need to process many folders at once; it saves time and keeps your workflow tidy.
  • When sharing a folder, always double‑check the email addresses in Share with to avoid accidental sharing.
  • Keep your Credential up to date; if you change your Azure app secrets, update the credential in Nappai.
  • Store the Data output from Get Folders in a variable and use it in subsequent steps to reference specific folders.

Security Considerations

  • The component relies on a Microsoft One Drive credential stored in Nappai’s credential manager. Keep this credential secure and restrict access to users who need it.
  • Do not expose the Folder ID or Parent Path in public dashboards unless you are sure the information is safe to share.
  • When sharing folders, use the Permission Role that matches the level of access you intend to grant (e.g., “Viewer” vs. “Editor”).