Search, download, and manage files in your Microsoft OneDrive directly from workflows.
Authentication: OAuth 2.0. Connect your Microsoft account on the integrations page.
Actions
Search Files
Searches for files in OneDrive.
| Input | Required | Description |
|---|---|---|
| Query | Yes | Text to search for in file names and content |
| Output | Type | Description |
|---|---|---|
files | array | File objects with id, name, size, webUrl, lastModifiedDateTime |
List Drives
Returns all drives accessible to the account (personal OneDrive, shared drives).
| Output | Type | Description |
|---|---|---|
drives | array | Drive objects with id, name, driveType |
Download File
Downloads a file from OneDrive as a file other nodes can use. Files up to 100 MB; a folder cannot be downloaded.
| Input | Required | Description |
|---|---|---|
| Item ID | Yes | OneDrive file ID |
| Drive ID | No | Another drive; empty: your own OneDrive |
| Output | Type | Description |
|---|---|---|
file | WorkflowFile | The downloaded file |
fileName | string | File name |
mimeType | string | MIME type of the file |
List Folder
Lists the files and folders in a folder, one page at a time. When hasMore is true, run it again with nextPageToken as Page Token to get the next page.
| Input | Required | Description |
|---|---|---|
| Folder ID | No | The folder; empty: the root |
| Drive ID | No | Another drive; empty: your own OneDrive |
| Page Size | No | Items per page, default 100, at most 250 |
| Page Token | No | nextPageToken of the previous page |
| Fields | No | Only these fields per item, e.g. size,lastModifiedDateTime; empty: all fields |
| Sort by | No | name, lastModifiedDateTime or size, ascending or descending |
| Output | Type | Description |
|---|---|---|
items | array | Files and folders with id, name, type |
hasMore | boolean | Whether another page exists |
nextPageToken | string | Token for the next page |
Get File or Folder Details
Reads the details of one file or folder without downloading it: name, type, size, link, when it was created and last changed and by whom, the folder it is in, and how many items a folder holds.
| Input | Required | Description |
|---|---|---|
| Drive ID | No | Another drive; empty: your own OneDrive |
| Item ID | Yes | The file or folder |
List Sharing and Permissions
Lists who has access to one file or folder and how: sharing links (view or edit; anyone with the link, people in your organization or specific people; expiry and password) and access granted to people or groups directly, each marked when it is inherited from a parent folder. Changes nothing.
| Output | Type | Description |
|---|---|---|
permissions | array | One entry per link or grant, with roles, kind, linkScope, grantedTo, inherited |
Replace File Content
Overwrites the content of an existing file with another file, up to 25 MB. The file keeps its ID, name, link and sharing; OneDrive keeps the previous content in the version history. To save a new file, use Upload File.
| Input | Required | Description |
|---|---|---|
| Drive ID | No | Another drive; empty: your own OneDrive |
| Item ID | Yes | The file to overwrite |
| New content | Yes | The file with the new content |
Resolve Share Link
Turns a OneDrive or SharePoint link (a sharing link or the address of a file or folder) into the drive ID and item ID the other actions take.
| Input | Required | Description |
|---|---|---|
| Link | Yes | The link |
| Output | Type | Description |
|---|---|---|
driveId | string | Drive of the item |
itemId | string | Item ID |
type | string | file or folder |
Create Folder
Creates a new folder in OneDrive.
| Input | Required | Description |
|---|---|---|
| Folder Name | Yes | Name for the new folder |
| Parent Folder ID | No | ID of the parent folder (defaults to root) |
| Drive ID | No | Drive to create the folder in |
| Output | Type | Description |
|---|---|---|
folderId | string | ID of the created folder |
webUrl | string | URL to the folder |
Get Folder by Name
Finds a folder by its name.
| Input | Required | Description |
|---|---|---|
| Folder Name | Yes | Name of the folder to find |
| Parent Folder ID | No | Parent folder to search within |
| Output | Type | Description |
|---|---|---|
folder | object | Folder metadata |
found | boolean | Whether the folder was found |