<!-- BusyBot node reference — https://busybot.net/tools/microsoft-onedrive-trigger/ -->

> Node: Microsoft OneDrive Trigger (`microsoft_onedrive_trigger`) · Polling trigger · v1
> Category: Data & Storage · Credentials: Microsoft OneDrive OAuth2 (`microsoftOneDriveOAuth2`)
> Updated: 2026-08-16

# Microsoft OneDrive Trigger

> Trigger workflows when files or folders change in OneDrive

## Overview

The Microsoft OneDrive Trigger node polls the Microsoft Graph delta API at a configurable interval to detect file and folder changes in a user's OneDrive. It uses Microsoft's delta query mechanism for efficient incremental sync — on each poll it requests only the changes since the last delta link, avoiding the need to scan the entire drive. The node supports four event types: file created, file updated, folder created, and folder updated. Users can scope watching to the entire drive, a specific file, a specific folder (direct children only or including nested subfolders). On the first poll it establishes a baseline and returns no items. Subsequent polls follow the stored delta link, filter results by event type and time window, and return only matching items. Supports simplified output mode that reduces each item to essential fields (id, name, webUrl, size, dates, path, mimeType). Requires Microsoft OAuth2 credentials with Files.ReadWrite.All scope.

**Category:** Data & Storage  
**Tool Name:** `microsoft_onedrive_trigger`  
**Version:** 1

**Appearance:** Icon: `lucide-HardDrive` | Color: `#0078d4`

## Node Type

**Trigger** — polling (checks for new data on a schedule)

## Input / Output

| Direction | Port(s) |
|-----------|--------|
| Input | None (trigger node) |
| Output | `Output` |

## Credentials

This tool requires **Microsoft OneDrive OAuth2** credentials.
See the [Credentials Guide](https://busybot.net/credentials/microsoft-one-drive-oauth2/) for setup instructions.

### Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Microsoft Account | `credential` | No | — | Connect your Microsoft account via OAuth2. |
| Trigger On | `options` | No | `fileCreated` | Which OneDrive event to trigger on. |
| | | | | Options: `fileCreated` (a new file is created), `fileUpdated` (an existing file is modified), `folderCreated` (a new folder is created), `folderUpdated` (an existing folder is modified) |
| Simplify | `boolean` | No | `true` | Whether to return a simplified version of the response instead of the raw data. |
| Watch Folder (`watchFolder`) | `boolean` | No | `false` | Whether to watch for the created file in a given folder, rather than the entire OneDrive. _(shown when Trigger On is `fileCreated`)_ |
| Watch (`watch`) | `options` | No | `anyFile` | How to select which file to watch. _(shown when Trigger On is `fileUpdated`)_ |
| | | | | Options: `anyFile` (updated files anywhere in OneDrive), `selectedFolder` (updated files inside a selected folder), `selectedFile` (a specific file) |
| Watch Folder (`watchFolderCreated`) | `boolean` | No | `false` | Whether to watch for the created folder in a given folder, rather than the entire OneDrive. _(shown when Trigger On is `folderCreated`)_ |
| Watch (`watch`) | `options` | No | `anyFolder` | How to select which folder to watch. _(shown when Trigger On is `folderUpdated`)_ |
| | | | | Options: `anyFolder` (updated folders anywhere in OneDrive), `selectedFolder` (updated folders inside a selected folder), `oneSelectedFolder` (a specific folder) |
| File ID | `string` | No | — | The ID of the specific file to watch for updates. You can also paste a OneDrive URL and extract the ID. _(shown when Trigger On is `fileUpdated` and Watch is `selectedFile`)_ |
| Folder ID | `string` | No | — | The ID of the folder to scope events to. You can also paste a OneDrive URL and extract the ID. _(shown when Watch is `selectedFolder` or `oneSelectedFolder`, or either Watch Folder toggle is on)_ |
| Options | `collection` | No | `{}` | Extra scoping for folder monitoring. _(shown when Watch is `selectedFolder`, or either Watch Folder toggle is on)_ |
| — Watch Nested Folders | `boolean` | No | `false` | Whether to look for modified files/folders in all nested folders, rather than only direct descendants. |
| Poll Interval | `number` | No | `1` | How often to check for new data. |
| Poll Interval Unit | `options` | No | `minutes` | Unit for the poll interval. |
| | | | | Options: `seconds`, `minutes`, `hours` |

## Output Data

Each changed file or folder becomes one output item. Every item carries `_trigger` (always `microsoft_onedrive_polling`) and `_timestamp` (when the poll ran).

With **Simplify** on (the default), each item is reduced to the fields most workflows need:

```json
{
  "id": "01BYE5RZ5MYLM2SMX75ZBIPQZIHT6OAYPB",
  "createdDateTime": "2026-08-15T08:58:00Z",
  "lastModifiedDateTime": "2026-08-15T08:58:00Z",
  "name": "sample-document.docx",
  "webUrl": "https://onedrive.live.com/?id=01BYE5RZ5MYLM2SMX75ZBIPQZIHT6OAYPB",
  "size": 12345,
  "path": "/drive/root:/Documents",
  "mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
  "_trigger": "microsoft_onedrive_polling",
  "_timestamp": "2026-08-15T09:00:00.000Z"
}
```

- `path` — the parent folder path reported by OneDrive.
- `mimeType` — present for files; empty for folders.

With **Simplify** off, the full Microsoft Graph drive item is emitted instead, including `file` or `folder`, `fileSystemInfo`, `parentReference`, `createdBy`, `lastModifiedBy` and every other property Graph returns for that item.

Reference item metadata downstream by expression, e.g. `{{ $json.name }}` or `{{ $json.webUrl }}`.

## Usage Examples

- Start a workflow when a new file is uploaded to OneDrive
- Monitor a specific OneDrive folder for new documents
- Trigger automation when a file is updated in OneDrive
- Watch for new folders created in a shared OneDrive directory
- Detect file changes in a specific OneDrive folder and its subfolders

## Example Configuration

Watch the whole drive for new files:

```json
{
  "type": "microsoft_onedrive_trigger",
  "parameters": {
    "event": "fileCreated",
    "simple": true,
    "pollInterval": 5,
    "pollIntervalUnit": "minutes"
  }
}
```

Watch one folder — and its subfolders — for new files:

```json
{
  "type": "microsoft_onedrive_trigger",
  "parameters": {
    "event": "fileCreated",
    "watchFolder": true,
    "folderId": "01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K",
    "simple": true,
    "pollInterval": 1,
    "pollIntervalUnit": "minutes",
    "options": {
      "folderChild": true
    }
  }
}
```

Watch a single file for updates:

```json
{
  "type": "microsoft_onedrive_trigger",
  "parameters": {
    "event": "fileUpdated",
    "watch": "selectedFile",
    "fileId": "01BYE5RZ5MYLM2SMX75ZBIPQZIHT6OAYPB",
    "simple": true,
    "pollInterval": 30,
    "pollIntervalUnit": "seconds"
  }
}
```

Watch a folder for updated files and return the raw Graph payload:

```json
{
  "type": "microsoft_onedrive_trigger",
  "parameters": {
    "event": "fileUpdated",
    "watch": "selectedFolder",
    "folderId": "01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K",
    "simple": false,
    "pollInterval": 2,
    "pollIntervalUnit": "minutes",
    "options": {
      "folderChild": true
    }
  }
}
```

Watch a specific folder for changes to the folder itself:

```json
{
  "type": "microsoft_onedrive_trigger",
  "parameters": {
    "event": "folderUpdated",
    "watch": "oneSelectedFolder",
    "folderId": "01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K",
    "simple": true,
    "pollInterval": 5,
    "pollIntervalUnit": "minutes"
  }
}
```

### Trigger Behavior

- **Activation:** Polling starts when the workflow is activated. There is no poll at the moment of activation — the first check runs one full interval later.
- **Schedule:** The trigger polls for new data based on the configured polling interval.
- **State:** Maintains internal state (a delta cursor into your drive plus the time of the last check) so each poll returns only what changed since then.
- **First Run:** The first poll records the current delta position and returns no items, so activating the workflow never replays your existing drive.
- **Testing:** Running the node from the editor emits a single sample file so you can build the rest of the workflow; real changes arrive only while the workflow is activated.

## Tips

Select the event type (file or folder, created or updated), optionally scope to a specific file or folder, and configure the poll interval. The trigger uses Microsoft Graph delta queries for efficient change detection. On first activation it establishes a baseline and will only trigger on changes that occur afterward. Requires Microsoft OAuth2 credentials with OneDrive (Files.ReadWrite.All) permissions.

### Parameter Dependencies

- **Event-based conditioning:** the `event` parameter determines which other parameters are available.
- **Watch method conditioning:** when `event` is `"fileUpdated"` or `"folderUpdated"`, the `watch` parameter determines the scope.
- **Folder ID requirement:** `folderId` is needed whenever you target a specific folder, and `fileId` whenever you target a specific file.
- **Options availability:** the `options` collection is only relevant when monitoring inside a folder.

### Notes

- `*Updated` events exclude items created inside the same poll window, so a brand-new file is reported once as created and not again as updated.
- Leave **Watch Nested Folders** off to match only the direct children of the selected folder; turn it on to match everything beneath it.