How to Upload File in SharePoint Using Power Automate Desktop?

A client recently reached out with a requirement in Power Automate Desktop. They needed to upload an Excel file containing employee details from their local system to a SharePoint document library, along with the associated metadata. Additionally, they wanted the entire process to be automated using Power Automate Desktop.

In this tutorial, I will explain how to upload various file types to a SharePoint document library using Power Automate Desktop. Also, I will cover:

  • Create a file within the SharePoint folder using PAD
  • Adding Metadata to the created file using Power Automate Desktop

Upload Files to SharePoint from Power Automate Desktop

Let’s explore how to upload various file types to a SharePoint document library using Power Automate Desktop.

In the Power Automate Desktop app, SharePoint is a ‘Premium’ feature that can only be accessed by having a free trial or a Power Automate license.

To upload the file to SharePoint using PAD, we need to use the ‘Create File‘ action. This action will receive the file in binary format. So, we need to convert the file into a binary data format.

Example 1: Upload Excel File to SharePoint Power Automate Desktop

Below, you can see that the Excel file contains employee details, i.e., Employee ID, Name, Department, Position, Salary, and Hire Date.

Power Automate desktop create excel file

I wanted to upload the above Excel into the SharePoint document library.

For this example, I created a SharePoint document library named “Employee Documents”.

Upload File in SharePoint Power Automate Desktop

Now, follow the steps below:

  1. Open the Power Automate Desktop app, click on +New, and select the Flow option. Provide the flow name and click Create. Then, add actions to the workspace.
  2. Next, I will convert the Excel data to binary. To do this, drag and drop the “Convert file to binary” action into the workspace. Set the parameter below:
    • File path: Click ‘Select File’ icon -> Choose Excel file from your system.
Power Automate desktop create file in SharePoint
  1. Then, expand the ‘SharePoint‘ section and drag and drop the ‘Create File’ action. Configure the parameters below:
    • Site address: Select the SharePoint site address where you want to create the file.
    • Folder path: Select the Folder path by clicking on the Select file option.
    • File name: Provide the file name with extension. Here, I’m taking the (.xlsx) file.
    • File content: Click on the {x}, select the BinaryData variable, and click Save.
create excel file Power Automate desktop
  1.  Now run the flow by clicking on the Run button. You can see that the Excel file has been uploaded to the SharePoint document library.
Create Excel file in SharePoint PAD

Example 2: Upload CSV File to SharePoint Library using Power Automate Desktop

In this section, we will explore how to upload a CSV file to the document library in SharePoint using Power Automate Desktop.

You can view the screenshot below, which displays the SharePoint document library with a Folder and one .xlsx file.

Power automate desktop sharepoint create file

Now, I will upload the CSV file named ‘Employee Performance Appraisal’ into the SharePoint document library.

You can follow the same steps as mentioned in Example 1.

  1. On to the workspace, add the ‘Convert file to binary data’ action and set the file path.
Create SharePoint file Power Automate desktop
  1. To upload the file, drag and drop the ‘Create File’ action from the SharePoint connector and set the required parameters, such as Site address and Folder path.
    • File name: Enter file name along with the .csv extension.
    • File content: Select the BinaryData variable from the previous step.
Power Automate desktop create file SharePoint

Now, the flow is ready. Click “Save” and then run the flow.

  1. When the flow execution is successful, go back to the SharePoint library. You can find the uploaded .csv file.
SharePoint create file Power Automate desktop

Power Automate Desktop: Create a File within a SharePoint Folder

Let me explain how to upload a file within a SharePoint document library folder using Power Automate Desktop.

In the image shown below, you can see a Folder ‘Document Management System’ in the SharePoint document library.

Power Automate create file in SharePoint folder

I wanted to upload a Word file named ‘Employee Documents Guidelines’ to this folder.

Check out the steps below:

  1. Similarly, add the ‘Convert file to binary‘ action and set the file path that will convert the file data into binary format.
Power Automate Desktop create file within a folder in SharePoint
  1. Next, choose to add the ‘Create File’ action from the SharePoint connector and set the required parameters, and save the action.
    • Site address: Select the SharePoint site address from the drop-down.
    • Folder path: Select the folder level path from the drop-down.
    • File name: I have provided the file name with the .docx extension.
    • File content: Select the EmployeeGuidelines variable from the previous step.
Upload file SharePoint folder Power Automate Desktop
  1. When the flow runs successfully, you can see that the Word file has been uploaded to the SharePoint folder.
Upload SharePoint file Power Automate desktop

This way, you can upload different types of files to the SharePoint library using PAD.

Add Metadata to a SharePoint File using Power Automate Desktop

In the previous sections, you might have learned how to upload a file to a SharePoint library. Here, I will show you how to add metadata to the created file using PAD.

I have created a SharePoint document library ‘Employee Documents’ that has columns as given in the table below.

Column NameData Type
DepartmentChoice
Expiry DateDate and Time
Validity PeriodSingle line of text
RemarksMulti lines of text
Confidentiality levelChoice
ApproverPerson or Group
Power Automate Desktop Upload files to SharePoint

Now, let’s see how to upload a file named ‘Employee Joined 2025’ along with the file properties. First, we need to upload a file to SharePoint and then update the file properties.

Below are the steps to do this:

  1. On the first step, drag and drop the ‘Convert file to binary data’ action to convert the file into binary data format.
Power Automate create file SharePoint
  1. After that, I’m adding a ‘Convert text to datetime’ action that will convert the text into a date value to input into the SharePoint date column.
How to create file on SharePoint desktop Power Automate
  1. Next, choose to add the ‘Create File’ action from the SharePoint connector and set the required parameters like Site Address, Folder Path, File Name, and File Content. Click on the Save button.
Upload file on SharePoint desktop Power Automate
  1. In the final step, drag and drop the ‘Update file properties’ action from the SharePoint connector. This action updates the SharePoint columns in a library for the specific item.
    • Site Address: Select the site address from the drop-down.
    • Library Name: Choose the Library name from the options.
    • Id: Click on {X} -> Select %CreateFileResponse.itemId% variable.
    • Expiry Date: Choose Date variable.
    • Validity: Provide the value.
    • Remarks: Enter the value according to your requirement.
    • Department Value: Choose the value from the drop-down.
    • Confidentiality Level Value: Select the value from the drop-down.
    • Approver Claims: You can provide an email or the name of the approver.
Upload files to SharePoint from Power Automate Desktop

After that, click on the Save button to save the action. Run the flow.

  1. When the flow executes successfully, you can see that the file has been uploaded with the metadata in the SharePoint library.
Create file in SharePoint Power Automate desktop

This guide explains how to upload and update file properties in SharePoint using Power Automate Desktop.

While uploading a file to SharePoint with the ‘Create file’ action, you must provide the right extension next to the file name; otherwise, the file content will not be shown.

Read Other Power Automate Desktop Tutorials:

>

Build a High-Performance Project Management Site in SharePoint Online

User registration Power Apps canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App

Power Platform Tutorial FREE PDF Download

FREE Power Platform Tutorial PDF

Download 135 Pages FREE PDF on Microsoft Power Platform Tutorial. Learn Now…