Wicked Smart Data
LearnInsightsAboutContact
Sign InLet's Build
LearnInsightsAboutContact
Sign InLet's Build
Wicked Smart Data

Intelligence, automation, and expert execution — plus an elite library of free knowledge. We turn complexity into competitive advantage.

Start a conversation

Platform

  • Learning Paths
  • Insights
  • RSS Feed

Company

  • About
  • Contact
  • Work With Us

Legal

  • Privacy Policy
  • Terms of Service

© 2026 Wicked Smart Data. All rights reserved.

Intelligence · Automation · Advantage

All Insights
Power Automate

Automating OneDrive File Uploads to SharePoint with Power Automate: Triggering on New Files, Copying to the Right Library, and Notifying Your Team

Stop manually shuttling files from OneDrive to SharePoint. This hands-on lesson walks you through building a Power Automate flow that detects new uploads, copies them to the right document library, and notifies your team — automatically, every time. No prior flow experience required.

🌱 Foundation17 min readOct 17, 2026Updated Oct 17, 2026
Automating OneDrive File Uploads to SharePoint with Power Automate: Triggering on New Files, Copying to the Right Library, and Notifying Your Team
On this page
  • Introduction
  • Prerequisites
  • Understanding the Architecture Before You Build
  • Setting Up Your OneDrive Trigger
  • Getting the File Content
  • Creating the File in SharePoint
  • Routing Files to Different Libraries Based on File Type or Name
  • Notifying Your Team
  • Option A: Email Notification
  • Option B: Teams Channel Message
  • Handling Edge Cases
  • What if the file already exists in SharePoint?
What about large files?
  • Hands-On Exercise
  • Common Mistakes & Troubleshooting
  • Summary & Next Steps
  • Automating OneDrive File Uploads to SharePoint with Power Automate: Triggering on New Files, Copying to the Right Library, and Notifying Your Team

    Introduction

    Picture this: your team's sales reps save their weekly reports to a shared OneDrive folder. Someone on the marketing side uploads new campaign assets to their personal OneDrive. A field technician drops inspection photos into a folder on their phone. In each case, someone else — usually you, or someone like you — has to notice the upload happened, grab the file, and move it to the right SharePoint document library where the rest of the organization can actually find it. That process is tedious, error-prone, and just forgettable enough that files regularly sit in the wrong place for days before anyone notices.

    Power Automate eliminates that entire manual step. You can build a flow that watches a OneDrive folder, automatically copies every new file that lands there into the correct SharePoint library, and then sends a notification to your team so they know the file is ready. No human shuttle service required. The flow runs in the background, around the clock, whether you're in a meeting or on vacation.

    By the end of this lesson, you'll have a working cloud flow that does exactly that — and more importantly, you'll understand why each piece works so you can adapt it to your own situation.

    What you'll learn:

    • How to trigger a cloud flow when a new file appears in a OneDrive folder
    • How to read file properties (name, path, content) from the trigger event
    • How to copy that file into a specific SharePoint document library using the correct connector actions
    • How to send a Teams or email notification to your team with a direct link to the uploaded file
    • How to handle common failure scenarios so the flow doesn't silently drop files

    Prerequisites

    You'll need:

    • A Microsoft 365 account with access to Power Automate (any plan that includes the standard OneDrive and SharePoint connectors)
    • A OneDrive folder you control (or that your team uses to drop files)
    • A SharePoint site with at least one document library already created
    • Basic familiarity with the Power Automate designer — if you haven't opened it before, start with Getting Started with the Power Automate Interface before continuing here

    Understanding the Architecture Before You Build

    Before touching the designer, it's worth mapping out what this flow actually does at a conceptual level. This matters because beginners often dive straight into adding actions and then get confused when dynamic content doesn't behave as expected.

    The flow has three logical stages:

    Stage 1 — Detect. A trigger watches a specific OneDrive folder and fires whenever a new file is created there. The trigger captures metadata about the file: its name, the path it lives at, when it was created, and a unique identifier.

    Stage 2 — Copy. The flow uses that file identifier to fetch the actual file content (the bytes), then creates a new file in a SharePoint document library using that content. This is a two-action sequence: first get the content, then write it somewhere new.

    Stage 3 — Notify. Once the file exists in SharePoint, the flow grabs the URL of the new file and sends a notification — via Teams message, email, or both — so your team knows something arrived.

    Understanding this three-stage structure helps you debug when something goes wrong: if a file isn't showing up in SharePoint, the problem is almost certainly in Stage 2. If the file is there but nobody was told, look at Stage 3.

    Note

    This flow copies the file rather than moving it. The original stays in OneDrive. If you want a true move (copy then delete the source), you can add a "Delete file" action at the end, but for most teams the copy behavior is preferable — it gives the uploader a local copy and the team a shared one.


    Setting Up Your OneDrive Trigger

    Open Power Automate at make.powerautomate.com, click Create in the left sidebar, then choose Automated cloud flow. Give it a descriptive name like "OneDrive Reports → SharePoint Sales Library." When prompted for a trigger, search for "OneDrive" and select When a file is created from the OneDrive for Business connector (not the personal OneDrive connector, unless that's what your users are on).

    Warning

    There are two OneDrive connectors — "OneDrive" (personal accounts) and "OneDrive for Business" (Microsoft 365 work accounts). They look similar but behave differently and require separate connections. Make sure you pick the right one for your organization's setup. Most workplace automations use OneDrive for Business.

    Once the trigger appears on the canvas, click it to configure it. You'll see a single required field: Folder. Click the folder icon to browse your OneDrive directory tree and pick the folder you want to monitor — for example, /Sales Reports/Incoming. The trigger will only fire for files created directly in that folder, not in subfolders, which we'll address later.

    This is an event-driven trigger, meaning the flow starts only when something happens — a new file appears — rather than on a schedule. If you're curious about the difference between trigger types and when to use each, Power Automate Triggers: When to Start a Flow goes deep on exactly this.

    After saving and turning on the flow, Power Automate registers a webhook subscription with OneDrive's API. From that point on, when a file is created in that folder, OneDrive pushes a notification to Power Automate, which starts the flow. The trigger fires once per file — if five files are uploaded simultaneously, you get five separate flow runs.


    Getting the File Content

    The trigger tells you that a file arrived and gives you its metadata, but it doesn't hand you the raw file bytes automatically. To copy the file to SharePoint, you need to explicitly fetch the content. This surprises beginners who expect the trigger to include the file itself.

    Click New step and search for OneDrive for Business. Select the action called Get file content using path (or Get file content — both work; "using path" lets you use a file path string, while "Get file content" takes a file identifier). For clarity, use Get file content and set the File field to the dynamic value called Id from the trigger. The Id is a unique internal reference to the file — more reliable than the path if files ever get renamed.

    Your action should look like this when configured:

    • Action: Get file content (OneDrive for Business)
    • File: Id (dynamic content from the trigger)

    That's the whole action. It outputs a single value: File Content, which is the binary content of the file. You'll use this in the next step.

    Tip

    If you're processing file types beyond simple documents — like Excel spreadsheets where you also want to read cell values — check out Automating Excel and OneDrive File Processing in Power Automate for a deeper treatment of that use case.


    Creating the File in SharePoint

    Now for the core action: writing the file into SharePoint. Click New step, search for SharePoint, and select Create file. This action needs three things:

    1. Site Address — The URL of your SharePoint site, for example https://yourcompany.sharepoint.com/sites/Sales
    2. Folder Path — The document library and optional subfolder where you want to save the file, for example /Shared Documents/Incoming Reports
    3. File Name — The name to give the file in SharePoint
    4. File Content — The actual bytes to write

    For the File Name, use the dynamic value File name with extension from the trigger. This preserves the original filename, including the .xlsx, .pdf, or .docx extension, which is exactly what you want.

    For File Content, use the File Content output from the "Get file content" action in the previous step.

    Your configured action should reference:

    • Site Address: https://yourcompany.sharepoint.com/sites/Sales
    • Folder Path: /Shared Documents/Incoming Reports
    • File Name: File name with extension (from trigger)
    • File Content: File Content (from Get file content action)

    Key insight

    The Folder Path field expects a path relative to the SharePoint site root, starting with the document library name. If your library is named "Shared Documents" (the default), the path starts with /Shared Documents. If you created a custom library called "Sales Docs," it would be /Sales Docs. You can add subfolders by extending the path: /Sales Docs/Q4 Reports.

    When this action runs successfully, it outputs metadata about the newly created file — including ItemId, Path, and Link to item. You'll use that link in the notification step.


    Routing Files to Different Libraries Based on File Type or Name

    A static destination is fine for simple scenarios, but real teams often need smarter routing. Maybe .pdf files go to one library while .xlsx files go to another. Or files with "FINAL" in the name should land in a "Published" library rather than "Drafts."

    You can achieve this with a Condition action — a branch that evaluates a logical test and runs different actions depending on whether the test is true or false. If you haven't worked with conditions in Power Automate before, Working with Conditions, Loops, and Variables in Power Automate covers the full mechanics.

    For a file-type routing scenario, add a Condition step between the "Get file content" action and the "Create file" action. Set the condition to check whether the dynamic value File name with extension (from the trigger) ends with the string .pdf.

    In the If yes branch, add a "Create file" action pointing to your PDF library: /Shared Documents/Published Reports.

    In the If no branch, add a "Create file" action pointing to your working documents library: /Shared Documents/Drafts.

    This pattern is expandable. For more than two destinations, you can nest conditions or use a Switch control, which tests a single value against multiple cases — cleaner than deeply nested conditions when you have four or five routing rules.

    Tip

    For even more sophisticated routing logic — say, routing based on content extracted from within a file — look into Building and Deploying Power Automate Flows That Call Azure OpenAI and AI Builder Models, which covers AI-powered content classification you can plug into this same flow structure.


    Notifying Your Team

    A file sitting silently in SharePoint isn't very useful if nobody knows it's there. The notification step closes the loop — it tells the right people that a new file arrived and gives them a direct link to open it.

    Option A: Email Notification

    Click New step, search for Office 365 Outlook, and select Send an email (V2). Configure it like this:

    • To: Enter your team's email address or distribution list, like sales-team@yourcompany.com
    • Subject: New file uploaded: followed by the dynamic value File name with extension
    • Body: A short message including the dynamic value Link to item from the "Create file" SharePoint action

    The body might look like:

    A new file has been uploaded to the Sales Reports library.
    
    File: [File name with extension]
    Uploaded at: [Created time]
    Open in SharePoint: [Link to item]
    

    Replace the bracketed tokens with the actual dynamic content fields. When the email arrives, recipients get a clickable link that opens the file in SharePoint directly.

    For a deeper walkthrough of building notification emails that look professional, see Automate Email Notifications with Power Automate.

    Option B: Teams Channel Message

    If your team lives in Microsoft Teams (and most do), a channel notification is often more visible than email. Click New step, search for Microsoft Teams, and select Post message in a chat or channel. Set:

    • Post as: Flow bot
    • Post in: Channel
    • Team: Select your team from the dropdown
    • Channel: Select the relevant channel, e.g., "Sales Notifications"
    • Message: Same content as the email body above — file name, upload time, and link

    You can use both actions in the same flow — send the email and post to Teams — so you're covered regardless of how individuals prefer to work.

    Note

    The "Link to item" output from the SharePoint "Create file" action points directly to the file in the SharePoint library, not to a download. Recipients will see the SharePoint file viewer, which is usually what you want for collaborative documents.


    Handling Edge Cases

    What if the file already exists in SharePoint?

    If someone uploads a file with the same name as one that already exists in your target SharePoint library, the "Create file" action will fail with a conflict error by default. You have two options:

    1. Let SharePoint version it automatically. If the document library has versioning enabled, you can configure the "Create file" action to overwrite. In the action's advanced settings, look for a IsChunked or use the companion action Create or update file to upsert rather than create.

    2. Append a timestamp to the filename. Use an expression to build a unique filename. In the File Name field of the "Create file" action, instead of just using the trigger's filename, use a concatenation expression:

    concat(triggerOutputs()?['body/Name'], '_', formatDateTime(utcNow(), 'yyyyMMdd_HHmmss'))
    

    This produces filenames like Q4_Report.xlsx_20241015_143022, which are always unique. If you want the extension last, you'd need to split the name and extension separately — a topic covered in depth in Mastering Dynamic Expressions and the Power Automate Formula Language.

    What about large files?

    By default, Power Automate handles files up to a certain size limit in a single pass. For files larger than about 100MB, you'll need chunked transfer, which involves splitting the content into pieces. That's an advanced pattern outside the scope of this foundation lesson, but it's worth knowing the limit exists so you're not surprised if a large video file fails.

    Warning

    If your flow fails silently — meaning it runs but doesn't copy the file and doesn't tell you — check the Run History for that flow. Each run shows whether it succeeded or failed and which action was the culprit. Using Power Automate Run History and Flow Checker to Debug and Fix Failing Flows walks you through that diagnostic process step by step.


    Hands-On Exercise

    Build the following flow from scratch to practice everything in this lesson:

    Scenario: Your HR team uploads new policy documents (PDFs) to a OneDrive folder called /HR Policies/Pending. When a new file arrives, it should be copied to a SharePoint document library called "HR Documents" on your SharePoint site, and a notification should be posted to a Teams channel called "HR Announcements."

    Step-by-step:

    1. Go to make.powerautomate.com and create a new Automated cloud flow.
    2. Name it HR Policy Upload → SharePoint + Teams Notify.
    3. Set the trigger to When a file is created (OneDrive for Business), folder set to /HR Policies/Pending.
    4. Add Get file content (OneDrive for Business) → File set to Id from trigger.
    5. Add a Condition: Check whether File name with extension ends with .pdf.
      • If yes: Add Create file (SharePoint) → Site: your SharePoint URL, Folder Path: /HR Documents, File Name: File name with extension, File Content: File Content.
      • If no: Add Send an email to yourself with the message "Non-PDF file uploaded — review needed: [File name with extension]."
    6. After the condition (at the top level, not inside a branch), add Post message in a chat or channel (Teams) → post to your HR Announcements channel with the file name and the SharePoint link from step 5's "If yes" branch.
    7. Save and test by uploading a PDF to the /HR Policies/Pending folder in OneDrive.

    Check the Teams channel to see the notification, then navigate to the SharePoint library to confirm the file arrived. Then test with a .docx file and verify you receive the email alert instead.


    Common Mistakes & Troubleshooting

    The trigger never fires. The most common cause is a permissions issue — the connection used by the trigger doesn't have access to the folder you specified. Re-check the connection in the trigger settings and make sure the authenticated account actually owns or has contributor access to that OneDrive folder.

    File Content is empty or the file in SharePoint is corrupted. This usually means you wired the wrong output into "File Content." Make sure you're using the File Content output from the "Get file content" action, not the trigger's body or any other output. Binary content doesn't tolerate being passed through text-processing steps — don't route it through a Compose or string expression.

    The SharePoint "Create file" action fails with 403 Forbidden. The account authenticating the SharePoint connector doesn't have write permission to the target library. Check the SharePoint site's permissions for that account, or switch to a service account that does have access.

    Files in subfolders aren't being picked up. The OneDrive trigger only fires for files created in the exact folder you specified, not subfolders. If your team drops files into nested folders, you either need multiple flows (one per subfolder) or a different approach — such as a scheduled flow that uses "List files in folder" to scan the tree periodically.

    The Teams notification shows "Link to item" as blank. This happens when the "Create file" SharePoint action is inside the "If yes" branch of a condition but you're trying to reference its output outside that branch. Dynamic content from inside a branch isn't available outside it. Move the Teams notification action inside the same branch, or store the link in a variable before the condition.

    Key insight

    Dynamic content from inside a conditional branch is scoped to that branch. If you need a value produced inside an "If yes" block to be used after the condition ends, store it in a string variable before the condition, then update the variable inside the branch. Variables are readable from anywhere in the flow after they're initialized.


    Summary & Next Steps

    You've built a flow that does real work: it watches a OneDrive folder, responds the moment a new file appears, copies that file to the correct SharePoint library, and notifies your team with a direct link. Along the way you learned how event-driven triggers work, why file content must be fetched separately from file metadata, how to use conditions for routing logic, and where to look when something goes wrong.

    This pattern — trigger, fetch, write, notify — is one of the most reusable structures in all of Power Automate. Once you understand it, you'll recognize it underlying dozens of other automation scenarios.

    Here's where to go next:

    • To understand the full landscape of file-moving patterns across OneDrive, SharePoint, and local folders, read Copying and Moving Files Automatically with Power Automate: OneDrive, SharePoint, and Local Folder Workflows.
    • If you want to add a human approval step — so a manager must sign off before the file lands in SharePoint — Power Automate with SharePoint: Automate Document Approvals shows how to bolt that on.
    • For tagging the file with SharePoint metadata (department, document type, fiscal year) as part of the same flow, Automating SharePoint and OneDrive Metadata Tagging with Power Automate is the natural follow-on.
    Work With Us

    From insight to implementation

    Reading is the start. When you're ready to build the data, automation, or AI systems behind it, our team turns strategy into shipped results.

    Let's Build

    Flow Automation Basics

    Previous

    Automating Recurring Microsoft 365 Reports with Power Automate: Querying SharePoint Lists, Formatting HTML Tables in Outlook Emails, and Scheduling Delivery to Distribution Groups

    Related Insights

    Power AutomateExpert

    Implementing Power Automate Secure Input and Output Masking for Sensitive Data Fields: Protecting Credentials, PII, and API Keys from Run History Exposure in Production Environments

    30 min
    Power AutomateExpert

    Implementing Desktop Flow Exception Logging and Telemetry in Power Automate Desktop: Capturing Error Details, Writing Structured Logs to SQL or SharePoint, and Triggering Cloud Flow Alerts from Unattended Bot Failures

    28 min
    Power AutomateExpert

    Automating Recurring Microsoft 365 Reports with Power Automate: Querying SharePoint Lists, Formatting HTML Tables in Outlook Emails, and Scheduling Delivery to Distribution Groups

    28 min

    On this page

    • Introduction
    • Prerequisites
    • Understanding the Architecture Before You Build
    • Setting Up Your OneDrive Trigger
    • Getting the File Content
    • Creating the File in SharePoint
    • Routing Files to Different Libraries Based on File Type or Name
    • Notifying Your Team
    • Option A: Email Notification
    • Option B: Teams Channel Message
    • Handling Edge Cases
    • What if the file already exists in SharePoint?
    • What about large files?
    • Hands-On Exercise
    • Common Mistakes & Troubleshooting
    • Summary & Next Steps