Power Automate Desktop

How to upload files to SharePoint from Power Automate Desktop?

When we are using Power Automate Desktop to download files from the web, it’s a very common use case to want to upload them to a SharePoint site. There are two ways to achieve this, depending on if you have a Power Automate Premium account or if you don’t.

Content

Option 1. You have a Power Automate Premium license. 

Power Automate Desktop has been getting several updates lately, so a lot of Office 365 options have been added to it, including Microsoft Forms, Word, Excel, Teams and of course, SharePoint. These options are “premium” features that you can only access if you have a free trial enabled or a Power Automate license.
Power Automate Premium license

When we expand the SharePoint options, you will find the same options you have from Power Automate Cloud when using SharePoint. 

SharePoint options

To upload files to SharePoint, we need the “Create File” action, this action receives the file in “binary” format, so we need to use the “Convert file to binary data” to extract the file from our local computer and convert it to the format SharePoint will accept.

How to Convert file to binary data

Below is how this action is set up, just select the file using the file selector, and you can also create dynamic paths using variables. File will be returned into the “BinaryData” variable.

Convert file to binary data

Now, it’s time to call the SharePoint action. Just look for the “create file” and select the option under SharePoint.

SharePoint Actions

If this is your first time working with SharePoint from Power Automate Desktop, you will get prompted to create a new connection, just click on the “connection references” button and then create a new connection.

Connection References
Click on Connection References

Once you do that, Power Automate will connect you to all the SharePoint sites you have access to with the account you signed into.

Then, just set up the SharePoint action.

  1. Select SharePoint site
  2. Indicate folder path where file will be stored (you can also use variables to make it dynamic)
  3. Write file name (you can also use variables to make it dynamic)
  4. 4. File content should be the variable returned from the previous action “BinaryData”
How to Create a File in SharePoint Site

This is how the final flow will look

Final Flow of SharePoint

After executing the automation, your file will be uploaded to SharePoint!

File uploaded to SharePoint

Option 2. You don’t have a premium account

The workaround when you don’t have a premium account is syncing your SharePoint site to your local computer.

To sync your site to your site, just open the SharePoint site, and click on the “Sync” option.

How to find Sync Option in SharePoint Site

This will prompt you to sign into OneDrive and then it will add a folder into your PC that will sync from SharePoint to your PC and from your PC to SharePoint.

This is how it will look:

Final Look

To upload the files into SharePoint, we just need to create them in our local folder and that will automatically sync them to the site.

Just look for the “Move file” action and select the action under the “File” group.

How to move file in SharePoint

This is what you will get prompted:

  1. Select a single file or a whole folder to move
  2. Indicate Destination folder, this must be mapped to the folder that is syncing to SharePoint
  3. Select if you want files to be overwritten if the name already exists.
Move file in SharePoint
Move file in SharePoint

Once this single action is set up, you can execute the automation, this will first move the file to your local folder. Just wait a couple of seconds until it syncs to the cloud!

Folder syncing to the cloud

In a moment, you will see the new file in SharePoint!

New File in SharePoint

All set! Now you know the out-of-the box options to upload files from your local PC to SharePoint using Power Automate Desktop.

Walkthrough Video

https://youtu.be/gQobr4zWk4s

Uploading files to SharePoint from Power Automate Desktop streamlines data management. This smooth integration within the Microsoft Power Platform enhances workflow efficiency, enabling users to effortlessly transfer files and improve collaboration. Simplify your processes and elevate productivity with this powerful solution.

Leave a Comment

Your email address will not be published. Required fields are marked *