List, search, upload, download, move, copy, share and delete files and folders in OneDrive from any Windmill script, flow or app.
Set up in 2 steps
Connect from the Resources page
Open Resources, click Add a resource/API and pick ms_onedrive from the OAuth APIs list. Click Connect and sign in with your Microsoft account, then name the resource and save it.
Run your first script
Fork the list files script below. Scripts take a file or folder as an id or as a path such as /Reports/2026/summary.xlsx, and they all run on a default connection.
Scripts
Building blocks, if none of the projects above fit. Fork one, run it, or call it as a step inside your own flow.
New or Updated File
Upload File
Search Files
Move or Rename File or Folder
List Files in Folder
List Drives
Get File or Folder
Download File
Delete File or Folder
Create Sharing Link
Create Folder
Copy File or Folder
Trigger flows from Microsoft OneDrive
Microsoft OneDrive is not only a destination. These inbound paths are supported today.
New or updated file (scheduled poll)
In a flow, add a trigger, choose Scheduled Poll, pick the New or Updated File script and an interval. Each run emits the files created (or also modified) since the previous one, optionally only under one folder. It polls because Microsoft Graph push notifications need a subscription that is renewed against a public endpoint.
Resource type
The shape of the credential every script on this page expects.
ms_onedrive
View raw schema →| Field | Type | Required | What it is |
|---|---|---|---|
| token | string | Yes | Microsoft Graph access token. Filled in and refreshed by Windmill when you connect with OAuth. |
Questions
What can Windmill do with my files?
By default: read, upload, edit, move, share and delete the files in the OneDrive of the account you sign in with (Files.ReadWrite, plus User.Read and offline_access). Drives that are not your own, such as a colleague's shared folder or a SharePoint library passed as drive_id, need Files.Read.All or Files.ReadWrite.All: tick it when connecting, or reconnect an existing resource.
How do files get in and out of Windmill?
Through workspace object storage. Upload File takes an S3 object and Download File writes to one, so a flow can pass files between OneDrive and any other step. Files over 4 MB are uploaded in chunks through a resumable upload session.
Does it work with a personal Microsoft account?
Yes, when the Entra app allows personal accounts and the tenant is set to common. Links scoped to an organization are only available to work or school accounts.
What about SharePoint and Excel?
Files in SharePoint document libraries, and SharePoint lists, have their own SharePoint integration. Reading and writing the cells of an Excel workbook stored in OneDrive is the Microsoft Excel integration.
There is no Connect button on my instance
Self-hosted instances need an admin to register an app in Microsoft Entra ID once, then add OneDrive under Instance settings, OAuth, with its client id, secret and tenant. Use common as the tenant for a multi-tenant app or personal accounts, or your tenant id for a single-tenant app. The app's redirect URI is <your instance>/oauth/callback/ms_onedrive. The same Entra app can serve the Outlook, OneDrive, SharePoint and Excel connections.