Resources · n8n integration

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

Why automate

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.

Connect

How do you connect Microsoft OneDrive to n8n?

  1. 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.

  2. 02

    Generate a client secret

    On your Microsoft application page, go to Certificates & secrets, then New client secret. Type a description such as n8n credential and 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.

  3. 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.

Triggers

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.*2
    folder.*2

      Configuration notes

      01Set up the Microsoft OneDrive TriggerThis 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.

      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.
      When to use it
      any workflow that should start when something lands in OneDrive rather than at a fixed hour.
      02On File Created / On File UpdatedThe 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.

      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.
      When to use it
      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 UpdatedThe 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.

      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.com restriction on the By URL option.
      • Watch Nested Folders: decides whether the node looks into every level below the folder or stops at direct descendants.
      When to use it
      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.
      Actions

      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.

      Resources × operations matrix
      ResourceCreateGetDeleteCopyDownloadGet ChildrenRenameSearchShareUpload
      File
      Folder

      File

      8 operations
      01

      Copy a file

      file.copy

      What 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.
      Use cases
      archive a signed contract into a yearly folder while the original stays where the client expects to find it.
      02

      Delete a file

      file.delete

      What 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.
      Use cases
      clear the temporary export a workflow uploaded, once the data has been written into your database and the run is confirmed.
      03

      Download a file

      file.download

      What 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.
      Use cases
      grab the purchase order a client dropped in a shared folder, then attach it to the confirmation email the workflow sends back.
      04

      Get a file

      file.get

      What 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.
      Use cases
      check what OneDrive knows about a document before branching, for instance to route a run differently depending on what the previous node stored about it. Pair it with Download only when the workflow genuinely needs the bytes.
      05

      Rename a file

      file.rename

      What 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.
      Use cases
      rename every scan that arrives as IMG_0042 into something a human can find six months later.
      07

      Share a file

      file.share

      What 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, edit or embed.
      • Scope: anonymous for a link anyone can open, organization to keep it inside your tenant.
      Use cases
      send a read-only link to a proposal, with organization scope so it stops working for anyone outside the company.
      08

      Upload a file

      file.upload

      What 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.
      Use cases
      drop the CSV a workflow just generated into the accounting folder every Monday.

      Folder

      6 operations
      09

      Create a folder

      folder.create

      What 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/2021 is 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.
      Use cases
      open one folder per new client at signature time, so the rest of the workflow always has somewhere to write.
      10

      Delete a folder

      folder.delete

      What 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.
      Use cases
      tear down the working folder a batch job created for one run, once the results have been archived somewhere durable. Put it behind an explicit condition rather than at the end of a long chain, since a folder identifier that drifted by one node takes real documents with it.
      11

      Get items in a folder

      folder.getChildren

      What 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.
      Use cases
      read everything that landed in the intake folder overnight and process each document in turn. This is also the quiet companion of folderUpdated: the trigger tells you the folder changed, this operation tells you what is in it now.
      12

      Rename a folder

      folder.rename

      What 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.
      Use cases
      move a client folder from a provisional label to its final one when a deal closes, without breaking the links already sent out.
      14

      Share a folder

      folder.share

      What 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, edit or embed, depending on what the other side is allowed to do.
      • Scope: anonymous or organization.
      Use cases
      give a freelance designer an edit link to the assets folder for the length of a project, and keep everything else out of reach.
      Need help

      Need help automating Microsoft OneDrive with n8n?

      A person reads every message.

      FAQ

      Microsoft OneDrive and n8n, the questions that come up

      01Is the Microsoft OneDrive n8n integration free?
      Yes on the n8n side. The OneDrive node and its trigger ship with n8n, so there is nothing to install and no add-on to buy, whether you run n8n Cloud or a self-hosted instance under the Community Edition and its Sustainable Use licence. A workflow behaves the same in both cases, which matters if you prototype on Cloud and move to your own server later. What Microsoft charges for OneDrive itself is a separate question and depends on your plan, so check that with your Microsoft 365 administrator rather than here.
      02What credentials do you need for the Microsoft OneDrive node?
      OAuth2, in one of three forms. The node's Authentication dropdown offers OneDrive OAuth2, which is the default node-specific credential, Microsoft OAuth2 (Graph), a generic credential reusable across other Microsoft nodes provided you grant it the scopes this node needs such as Files.ReadWrite.All, and Microsoft Entra Service Principal for app-only access with no signed-in user. In every case you need a Microsoft Azure account, at least one user account with access to OneDrive, and, when a corporate Microsoft Entra account manages that user, an administrator who has allowed users to consent to apps accessing company data on their behalf. The credential is created once and reused everywhere.
      03What are the limits of the Microsoft OneDrive node in n8n?
      Three worth planning for. Upload handles files up to 4MB, so anything heavier needs another path. Folder operations expect an identifier rather than a name, which you read in the folder URL or get by running the folder search and taking the id field from the response, the documented route on Microsoft 365 where OneDrive runs on SharePoint behind the scenes. And the node exposes 14 operations, no more: anything else in the OneDrive API goes through the HTTP Request node, which reuses the same credential through predefined authentication, so you keep one connection for both.
      04Does the Microsoft OneDrive Trigger react in real time?
      No, and it is better to design around that. The trigger works by polling: n8n queries the OneDrive API at the interval set in Poll Times, once a minute at the fastest, and emits one item per new element found. There is no webhook to register, that is, no URL for Microsoft to call when something happens, so nothing has to be configured on the Microsoft side. The trade-off is a delay equal to your interval between the moment a file appears and the moment the workflow starts. For an intake folder or a nightly batch that is fine. For a second-by-second reaction, it is not the right mechanism.
      05n8n or Make for Microsoft OneDrive?
      It depends on four things, and both handle OneDrive. Hosting: n8n runs on your own server or on n8n Cloud, Make is hosted only. Data control: with a self-hosted n8n, the documents that pass through a workflow never leave your infrastructure, which settles a lot of internal discussions when the files are contracts or HR records. Cost model: Make bills per operation, so a workflow that loops over every item in a folder has a very different price depending on the platform. Visual logic: both give you a canvas, and the fastest way to decide is to rebuild one real workflow on each.
      Hack'celeration Lab

      Get our weekly integration tips.

      No spam. Unsubscribe anytime.