Reference · Tools
Microsoft OneDrive Trigger
Starts workflow when files or folders are created or updated in Microsoft OneDrive
The Microsoft OneDrive Trigger starts a workflow when a file or folder is created or updated, polling with Microsoft Graph delta queries so only genuine changes are reported. A typical build is processing every new document dropped into a shared folder without anyone having to run anything.
- Node type
- Polling trigger
- Parameters
- 12
- Outputs
- Output
- Credentials
- Microsoft OneDrive OAuth2
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 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:
{
"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:
{
"type": "microsoft_onedrive_trigger",
"parameters": {
"event": "fileCreated",
"simple": true,
"pollInterval": 5,
"pollIntervalUnit": "minutes"
}
}
Watch one folder — and its subfolders — for new files:
{
"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:
{
"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:
{
"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:
{
"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
eventparameter determines which other parameters are available. - Watch method conditioning: when
eventis"fileUpdated"or"folderUpdated", thewatchparameter determines the scope. - Folder ID requirement:
folderIdis needed whenever you target a specific folder, andfileIdwhenever you target a specific file. - Options availability: the
optionscollection is only relevant when monitoring inside a folder.
Notes
*Updatedevents 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.
Frequently asked questions
Will it fire for files that already exist?
No. On first activation it establishes a baseline and only triggers on changes occurring afterwards, so activating it does not flood your workflow with the existing contents.
How does it detect changes efficiently?
Through Microsoft Graph delta queries, which return what has changed since the last check rather than the node comparing full listings itself.
Can I watch just one folder?
Yes — the event type selects file or folder, created or updated, and you can optionally scope to a specific file or folder rather than the whole drive.
What permissions does the credential need?
Microsoft OAuth2 credentials with OneDrive Files.ReadWrite.All permission.
Build with the Microsoft OneDrive Trigger node
Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Microsoft OneDrive OAuth2 credentials first.
Open BusyBotLast updated . Spotted something wrong? Tell us.