- Home
- Resources
- Integrations
- Microsoft OneDrive
Microsoft OneDrive n8n integrationAutomate Microsoft OneDrive with n8n.
Every file that lands in OneDrive can start a workflow instead of an email thread. The Microsoft OneDrive n8n integration exposes 14 operations across 2 resources, files and folders, and a trigger node that watches 4 events. Written for ops people who keep client documents in OneDrive.
Verified Trustpilot reviews · AI, automation & growth agency
What does the Microsoft OneDrive n8n integration actually do?
The Microsoft OneDrive n8n integration connects your OneDrive storage to the rest of your tools through two nodes. The app node exposes 14 operations spread over 2 resources, files and folders. The trigger node watches 4 events split into 2 families. Both ship with n8n, so there is nothing to install, on n8n Cloud or on a self-hosted instance, and no extra cost on the n8n side.
Start with a client intake folder. Someone drops a signed PDF in OneDrive, the trigger fires on fileCreated, file.download pulls the content into a binary field, and the workflow writes a row to Google Sheets and posts a short message to Slack. Nobody has to open OneDrive to check whether the document arrived.
Second pattern: delivery. A workflow builds a monthly report, file.upload writes it into the client folder, then file.share creates a sharing link scoped to your organization. The link goes out in an email, and the file itself never leaves OneDrive. Teams that already push numbers into Microsoft Excel 365 tend to bolt this on top.
Third pattern: housekeeping. folder.create builds a dated folder per client, folder.getChildren lists what is inside it, and file.rename normalizes names that people typed by hand. The same workflow shape works if half your documents sit in Google Drive, since both nodes hand back items you can loop over.
Reach for the HTTP Request node when an operation is missing. It calls any endpoint of the OneDrive API and reuses the same credential through predefined authentication, so you are not stuck with the 14 operations the node ships with. That is the answer for anything the catalog does not expose.
Two limits worth knowing before you build. Upload handles files up to 4MB, so a large video needs another route. Folder operations expect an identifier, not a name: read it in the folder URL, or run folder.search with the folder name and take the id field from the response, which is the documented way on Microsoft 365, where OneDrive runs on SharePoint behind the scenes. If you are still choosing a platform, the n8n review goes through the trade-offs.
How do you connect Microsoft OneDrive to n8n?
- 01
Register an application with Microsoft
Open the Microsoft Application Registration Portal and select Register an application. Give it a Name, then in Supported account types pick the option that covers any organizational directory plus personal Microsoft accounts. Copy the OAuth Callback URL shown in your n8n credential, paste it into Redirect URI, and set the platform to Web. Register the app, then copy the Application (client) ID into the n8n field named Client ID.
- 02
Generate a client secret
On your Microsoft application page, go to Certificates & secrets, then New client secret. Type a description such as
n8n credentialand select Add. Copy what appears in the Value column, not the identifier next to it, and paste it into n8n as the Client Secret. Select Connect my account, log in to your Microsoft account, and allow the app to access your info. - 03
Pick the authentication type in the node
The node's Authentication dropdown offers three options. OneDrive OAuth2 is the default. Microsoft OAuth2 (Graph) is a generic credential you reuse across other Microsoft nodes, as long as you grant it the scopes this node needs, for example
Files.ReadWrite.All. Microsoft Entra Service Principal (App-Only) gives app-only access with no signed-in user. A credential is created once in the Credentials menu and reused everywhere.
What can the Microsoft OneDrive Trigger watch?
Microsoft OneDrive Trigger is the node that starts a workflow when something happens in Microsoft OneDrive. It listens to 4 events, listed below by family. Pick one or several, activate the workflow: n8n registers the webhook on your Microsoft OneDrive account.
What you see in n8n
Every event, by family
One row per object, one chip per action. The event to tick in the node is object.action; hover a chip to read exactly when it fires.
file.*2folder.*2Configuration notes
01Set up the Microsoft OneDrive Trigger
This trigger works by polling, meaning n8n calls the OneDrive API on a schedule instead of waiting for Microsoft to notify it. One item comes out per new element found.
Key parameters
- Trigger On: the single event the node listens to, one of the 4 values in the catalog, for example
fileCreated. - Poll Times: how often n8n queries the API, once a minute at the fastest. Nothing is registered on the Microsoft side, and the delay before a workflow starts equals the interval you chose.
- Watch Folder: turned on, the node only looks inside the folder you select rather than the entire OneDrive.
- Watch Nested Folders, inside Options: turned on, subfolders count too, not only direct descendants.
- Simplify: returns a trimmed version of the response instead of the raw data.
02On File Created / On File Updated
The file family holds 2 events. fileCreated fires when a new file appears, fileUpdated when an existing one is modified. They cover the two questions people actually ask about a shared drive: did it arrive, and did someone touch it.
Key parameters
- Watch: how the node selects which file to follow.
- File: the file to operate on, picked from a list, by identifier or by URL. The By URL option only accepts addresses starting with
https://onedrive.live.com.
fileCreated suits an intake folder where each arrival deserves its own run. fileUpdated suits a document several people edit, when the workflow has to react to the latest version rather than the first one. Wiring both to the same branch will make the same document flow through twice, so keep them separate.03On Folder Created / On Folder Updated
The folder family also holds 2 events. folderCreated fires when a folder appears, folderUpdated when an existing folder changes. Watching the container rather than each file keeps a busy drive from flooding your executions.
Key parameters
- Folder: the folder to operate on, selected from a list, by identifier or by URL, with the same
https://onedrive.live.comrestriction on the By URL option. - Watch Nested Folders: decides whether the node looks into every level below the folder or stops at direct descendants.
folderCreated is the natural start for an onboarding routine, where a new client folder means provisioning work elsewhere. folderUpdated pairs well with folder.getChildren, letting a single run pick up everything that changed instead of one file at a time.What can the Microsoft OneDrive node do?
The Microsoft OneDrive node exposes 14 operations across 2 resources. For each one: the node as you configure it in n8n, the required fields, and our field notes.
| Resource | Create | Get | Delete | Copy | Download | Get Children | Rename | Search | Share | Upload |
|---|---|---|---|---|---|---|---|---|---|---|
| File | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
| Folder | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Operations index
File
8 operationsCopy a file
file.copyWhat you see in n8n
Notes & use cases
Duplicates a file inside OneDrive and puts the copy wherever you point it.
Key parameters
- File ID: the file to duplicate, often
{{ $json.id }}carried over from a search or from the trigger. - Parent Reference: a reference to the parent item the copy will be created in, filled through Add Parent Reference.
- Name, in Additional Fields: the new name for the copy. Left empty, the copy keeps the original name, which gets confusing fast in the same folder.
Delete a file
file.deleteWhat you see in n8n
Notes & use cases
Removes one file from OneDrive. No confirmation step stands between the workflow and the deletion, so the branch that calls it should be sure of what it points at.
Key parameters
- File ID: the identifier of the file to remove, usually
{{ $json.id }}from the node just before.
Download a file
file.downloadWhat you see in n8n
Notes & use cases
Pulls the content of a file out of OneDrive and places it in a binary field, ready to attach to an email or to send on to another service.
Key parameters
- Put Output File in Field: required, the name of the output binary field that will hold the file. The nodes downstream read it under that exact name.
- File ID: which file to fetch.
Get a file
file.getWhat you see in n8n
Notes & use cases
Reads a single file entry by its identifier. No binary field is involved here, so the content stays in OneDrive and only the data OneDrive holds about the file comes back.
Key parameters
- File ID: the file to read.
Rename a file
file.renameWhat you see in n8n
Notes & use cases
Changes the name of an existing file without moving or duplicating it.
Key parameters
- Item ID: the ID of the file. Watch this one, the field is named Item ID here while its neighbours use File ID, and pasting the wrong expression is the classic cause of a run that finds nothing.
- New Name: the new name for the file, built with an expression when you want a convention such as client, date, document type.
IMG_0042 into something a human can find six months later.Search a file
file.searchWhat you see in n8n
Notes & use cases
Runs a query against OneDrive and returns the files that match.
Key parameters
- Query: the query text used to search for items. Values may be matched across several fields including filename, metadata and file content, so a search on a client name can also surface documents that only mention it inside.
Share a file
file.shareWhat you see in n8n
Notes & use cases
Creates a sharing link for one file and returns it, so the workflow can put the link in a message instead of the document itself.
Key parameters
- File ID: the file to share.
- Type: the type of sharing link to create,
view,editorembed. - Scope:
anonymousfor a link anyone can open,organizationto keep it inside your tenant.
organization scope so it stops working for anyone outside the company.Upload a file
file.uploadWhat you see in n8n
Notes & use cases
Writes a file into OneDrive, up to 4MB. Past that size the operation is not the right tool and the API has to be called another way.
Key parameters
- Parent ID: required, the ID of the parent folder that will contain the file.
- Binary File: required, decides whether the data comes from a binary field or is typed in.
- File Content: required when Binary File is off, the text content of the file.
- Input Binary Field: the name of the input binary field containing the file to be written.
- File Name: the name the file should be saved as.
Folder
6 operationsCreate a folder
folder.createWhat you see in n8n
Notes & use cases
Makes a new folder in OneDrive, either at the root or inside another one.
Key parameters
- Name: required, the name or path of the folder. A path such as
/Pictures/2021is accepted, which saves you from chaining several calls to build a tree. - Parent Folder ID, in Options: the ID of the folder you want to create the new folder in.
Delete a folder
folder.deleteWhat you see in n8n
Notes & use cases
Deletes a folder from OneDrive, along with what it holds.
Key parameters
- Folder ID: the identifier of the folder to remove.
Get items in a folder
folder.getChildrenWhat you see in n8n
Notes & use cases
Lists the items sitting inside a folder and emits them so the workflow can loop over them.
Key parameters
- Folder ID: the folder to open.
folderUpdated: the trigger tells you the folder changed, this operation tells you what is in it now.Rename a folder
folder.renameWhat you see in n8n
Notes & use cases
Gives a folder a different name while its contents and its identifier stay put.
Key parameters
- Item ID: the ID of the folder, not its name, and again the field is called Item ID rather than Folder ID.
- New Name: the new name for the folder.
Search a folder
folder.searchWhat you see in n8n
Notes & use cases
Looks for folders whose content matches a query and returns what it finds.
Key parameters
- Query: the query text used to search for items, matched across several fields including filename, metadata and file content.
id field holding the folder ID that every other folder operation asks for. On Microsoft 365, where OneDrive sits on SharePoint, it is often the only way.Share a folder
folder.shareWhat you see in n8n
Notes & use cases
Opens a whole folder to other people through a sharing link, instead of sharing documents one by one.
Key parameters
- Folder ID: the folder to share.
- Type:
view,editorembed, depending on what the other side is allowed to do. - Scope:
anonymousororganization.
edit link to the assets folder for the length of a project, and keep everything else out of reach.Need help automating Microsoft OneDrive with n8n?
A person reads every message.
Microsoft OneDrive and n8n, the questions that come up
01Is the Microsoft OneDrive n8n integration free?
02What credentials do you need for the Microsoft OneDrive node?
03What are the limits of the Microsoft OneDrive node in n8n?
04Does the Microsoft OneDrive Trigger react in real time?
05n8n or Make for Microsoft OneDrive?
Get our weekly integration tips.
No spam. Unsubscribe anytime.


