Live Developer Training: next batch coming soon. Be the first to know.Live training: next batch soonJoin the waitlist →Join →

How to Upload File to SharePoint Document Library using Power Apps?

While working with the SharePoint Online document library, we sometimes need to upload a file or multiple files from Power Apps to the SharePoint document library.

In this Power Apps tutorial, I will explore in detail information about upload files from Power Apps to the SharePoint document library including:

  • Power Apps upload file to SharePoint document library using flow
  • Power Apps upload multiple files to SharePoint
  • Power Apps upload file to SharePoint document library without flow

Power Apps Upload File to SharePoint Document Library

Recently, I got the opportunity to work with Power Apps upload files to the SharePoint document library using different real-time scenarios.

I have created a SharePoint document library named “Policy Documents,” which has the fields below.

Column NameData Type
NameIt is a default single line of text
ModifiedDate and time
Modified ByPerson or Group
Review DateDate and time
Is ApprovedYes/NO
powerapps upload file to sharepoint document library

Now, I would like to upload or add a file from Power Apps to the SharePoint document library. Unfortunately, there is no direct way to upload a file or files to the document library from Power Apps.

But there is a way to overcome this issue, like connecting the Power Automate Instant flow to the Power Apps and uploading files using a single button click from Power Apps to the SharePoint document library.

NOTE:

As of the last update in January 2022, uploading files to a SharePoint document library directly from Power Apps without using Power Automate is not directly supported.
However, we can directly upload the files from Power Apps to the SharePoint list without using any flows.

Have a look at the below screenshot for the output.

power apps upload file to sharepoint document library

To achieve it, follow the below steps. Such as:

1. On the Power Apps Screen, insert an Edit form control and set its DataSource to any existing SharePoint list for the “Attachment control.”

DataSource = 'Company Attachments'

Where,

  • ‘Company Attachments’ = SharePoint Online list
powerapps upload multiple files to sharepoint

2. Now cut the Attachment control, paste it outside the form, and delete the form. You can see some errors will appear in the Attachment control. To resolve those errors, follow the below properties.

DisplayMode = DisplayMode.Edit
Items = Blank()
Max attachments = 1
upload multiple files from powerapps to sharepoint document library

3. Now, the Attachment control is ready to attach any file. Once you click on the Attach file link from the attachment control, it will redirect you to your local system to select the files.

powerapps upload file from local

4. Documents or files cannot be uploaded directly to a SharePoint document library from Power Apps; instead, a Power Automate flow must be created for this purpose.

5. For that, go to the Power Automate section, select the Create new flow button, and click on the + Create from blank button, as shown below.