Work with SharePoint sites from any Windmill script, flow or app: upload, download, search and organize files in document libraries, and read, create and update list items.
Set up in 2 steps
Connect from the Resources page
Open Resources, click Add a resource/API and pick ms_sharepoint 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 list items or list files script below and pick a site from the dropdown. File scripts act on the site's default document library unless you pick another one.
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 List Item
New or Updated File
Upload File
Update List Item
Search Files
Search Files Across Sites
Move or Rename File or Folder
Search Sites
List Lists
List List Items
List Files in Folder
List Document Libraries
List Columns
Get Site
Get List Item
Get File or Folder
Get Current User
Download File
Delete File or Folder
Create Sharing Link
Create List Item
Create List
Create Folder
Copy File or Folder
Trigger flows from Microsoft SharePoint
Microsoft SharePoint is not only a destination. These inbound paths are supported today.
New or updated list item (scheduled poll)
In a flow, add a trigger, choose Scheduled Poll, pick the New or Updated List Item script and an interval. Each run emits the items created (or also modified) in the list since the previous one, with their column values. It polls because Microsoft Graph push notifications need a subscription that is renewed against a public endpoint.
New or updated file (scheduled poll)
Same setup with the New or Updated File script: each run emits the files created (or also modified) in a document library since the previous one, optionally only under one folder.
Resource type
The shape of the credential every script on this page expects.
ms_sharepoint
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 in SharePoint?
By default: read and edit files, lists and list items in every site the account you sign in with can reach (Sites.ReadWrite.All, plus User.Read and offline_access). Windmill never sees more than that account does. Creating a list needs Sites.Manage.All, which is not in the default: tick it when connecting.
How do I read a document library's metadata columns?
A document library is also a list. Use List List Items on the library's list: each item is a file with its column values, and you can filter on them, for example fields/Status eq 'Approved'.
Why does my list filter fail?
SharePoint refuses to filter or sort on a column that is not indexed. Index the column in the list settings, or set allow_unindexed on the script, which works but is slow on large lists.
Does it work with a personal Microsoft account?
No. SharePoint sites only exist for work or school accounts. For personal files use the OneDrive 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 SharePoint 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_sharepoint. The same Entra app can serve the Outlook, OneDrive, SharePoint and Excel connections.