Upload, download, search, share and organize 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 Microsoft OneDrive under Instance-configured OAuth APIs. 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.
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.
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
A script fails on a missing permission
Each script's description names the permission it needs. The default covers your own OneDrive; drives that are not yours, 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.
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.
There is no Connect button on my instance
An instance admin registers an app in Microsoft Entra ID with the redirect URI <your instance>/oauth/callback/ms_onedrive, then adds Microsoft OneDrive under Instance settings → Auth/OAuth/SAML → OAuth with its client id, secret and tenant. The tenant is set once for the whole instance, and one Entra app can serve Outlook, OneDrive, SharePoint and Excel.