> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fetchhive.com/llms.txt
> Use this file to discover all available pages before exploring further.

# OneDrive

> Access and manage files, folders, sharing, and workbook data in OneDrive via your connected account.

Use this app when your workflow needs to find, read, move, copy, share, or update files in OneDrive. It also works for Excel workbook edits and SharePoint list tasks.

## Configuration

| Option | Required | Description |
| - | - | - |
| Name | No | Label for the step in the workflow canvas. |
| Authentication | Yes | The connected OneDrive account to use for this step. |
| Action | Yes | The OneDrive action to perform (for example Get Drive Root, Get Item Metadata, Get Item By Path, Search Items). |
| Arguments | Yes | Per-action form fields generated from the action's schema. Each text field has an **Insert Variable** button for injecting `{{placeholder}}` values. A **Raw JSON** tab is available for advanced usage. |
| When the step fails | No | Controls whether the workflow should **Terminate Workflow** or **Continue** if this step fails. |

Before you configure this step, connect OneDrive in **Integrations** for your workspace using the sign-in flow. If no active connection is available, the step shows a warning with a link to **Integrations** instead of the account selector.

## Arguments form

When you select an action, the **Arguments** section renders a form driven by the action's input schema. Fields that refer to existing records include dropdown pickers.

Switch to the **Raw JSON** tab when you prefer to write the full arguments object by hand. Changes in either tab stay in sync.

## Common actions

| Action | Description |
| - | - |
| **Get Drive Root** | Retrieve the root folder of the signed-in user's OneDrive. |
| **Get Item Metadata** | Retrieve metadata for a file or folder by its item ID. |
| **Get Item By Path** | Retrieve metadata for a file or folder by its drive-relative path. |
| **Search Items** | Search OneDrive for files and folders by keyword. |
| **List Folder Children** | List the files and folders directly inside a folder. |
| **Move Item** | Move a file or folder to a new parent folder. |
| **Copy Item** | Copy a file or folder to a new location. |
| **Update Item Metadata** | Update metadata for a file or folder. |
| **Update File Content** | Replace the contents of an existing file. |
| **Download File** | Download a file by its item ID. |
| **Restore Deleted Item** | Restore a deleted file or folder from the recycle bin. |
| **List Drives** | List drives available to the connected account or a specific user, group, or site. |
| **Get Site Details** | Retrieve metadata for a SharePoint site by its ID. |
| **List Site Lists** | List all lists available on a SharePoint site. |

Destructive actions, such as deleting records, are not available in the workflow action picker.

## Output

This step stores the OneDrive response as the step output. The shape of the response depends on the action.

Use the full output reference in later steps:

```text theme={null}
{{STEP_IDENTIFIER.output}}
```

## Example

1. Open **Integrations** and connect OneDrive if you have not already done that.
2. Add an **OneDrive** step to your workflow.
3. Select a connected account in **Authentication**.
4. Choose **Get Drive Root** in **Action**.
5. Fill in the required fields. Use **Insert Variable** to reference an earlier step's output for any field value.
6. Click **Run** in the step header to test the action, then review the returned payload in **Output**.

## Use cases

### Share a file link

1. Search Items
2. Get Item Metadata
3. Create Sharing Link

### Update a workbook

1. Create Workbook Session
2. List Worksheets
3. Read Workbook Range
4. Write Workbook Cell

### Track SharePoint data

1. Get Site Details
2. List Site Lists
3. Get List Items
4. Update List Item Fields

## Notes

* This step depends on a connected OneDrive integration in your workspace.
* The workflow action picker shows a curated set of actions. Agents with the OneDrive tool can use more of them.
* The sign-in screen may show third-party authorization branding.

## Using OneDrive as an Agent Tool

You can also add OneDrive as a tool in the **Agent Editor**. Open the agent, click **Add tool**, and select **OneDrive**. In the tool settings panel, choose the connected account the agent should use. The agent calls OneDrive actions when they are relevant to the conversation.

See also: [Integrations](https://docs.fetchhive.com/workspace/integrations.md), [Creating and Editing](https://docs.fetchhive.com/workflows/creating-and-editing.md), and [Testing and Iteration](https://docs.fetchhive.com/workflows/testing-and-iteration.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.