Upload multiple files in SharePoint using Power Automate – more than 5000 documents

Upload Multiple Files in SharePoint: Step-by-Step Guide (2026)

No comments

Loading

Updated 2026: Learn how to upload multiple files in SharePoint quickly and efficiently. This step-by-step tutorial covers modern SharePoint document libraries, drag-and-drop uploads, and optional Power Automate automation to streamline your workflow.

If we want to test the SharePoint document library threshold limit issue, we need to have a document library with more than 5000 documents. So, in this Power Automate flow, we will learn how to create multiple files very quickly.

Introduction to Uploading Multiple Files in SharePoint

Uploading multiple files in SharePoint can save time and streamline document management. In this guide, we’ll show you the easiest ways to upload files efficiently, including modern library features and optional automation with Power Automate.

Upload Multiple Files in SharePoint with Power Automate

Before getting into the Power Automate, let’s talk about the prerequisites.

Prerequisites for Uploading Multiple Files in SharePoint

As part of the prerequisites, perform the below:

  • Create a document library called “UploadMoreThan5KDocuments.”
  • Create a folder named “Template.”
  • Manually upload the sample file named “TemplateFile.docx.”
  • Optional: Create a choice type column named “ItemCreatedChannel” with the value “Manual” or “Power Automate”

 

Upload multiple files in SharePoint Online document library using Power Automate
Upload multiple files in SharePoint Online document library using Power Automate

Power Automate: Upload Multiple Files in SharePoint

Below is the Power Automate flow that will create multiple files in the SharePoint Online document library.

Power Automate flow to create multiple files in SharePoint
Power Automate flow to create multiple files in SharePoint

This is a manually triggered flow. It has two sections:

  • Variable declaration
  • Do Until Loop

Declare Variables for Uploading Multiple Files in SharePoint

Initialize below two variables:

  • intVarItemCount – Integer Type with initial value 1. This number is the starting number of the loop.
  • strVarItemTitleToBeCreated – String Type, This will be passed in the Name column as value.
Initialize variable in auto increment number in power automate
Initialize variable in auto increment number in power automate

Get File Content by Path to Upload Multiple Files in SharePoint

Add a “Get file content using path” action and pass the below parameters:

  • Site Address: Your site URL
  • File Path: Select your template file uploaded in the prerequisites section. This is the key template file; based on this file, other files will be created.
Get File Content using Path in Power Automate
Get File Content using Path in Power Automate

Use Do Until Loop to Upload Multiple Files in SharePoint

Below is the Do Until loop section.

Do Until Loop Power Automate - Auto increment number in power automate to add multiple files in SharePoint

Auto increment number in power automate to add multiple files in SharePoint
Auto increment number in power automate to add multiple files in SharePoint

Explanation of Do Until Loop in Power Automate:

Step 1:


@variables('intVarItemCount') is equal to 5000

In change limit, count is equal to 5000

Changes limit in Do Until Power Automate loop
Changes limit in Do Until Power Automate loop

Notes:

  • The default change limit is 60, you must change to the desired number you want to create in the list.
  • For example, we have given the number 5000, however, you could give any positive number which is less than or equal to 5000. More than 5000 numbers, will not accept.
  • This number count control how many items should be created in the list.
  • If you want to create more than 5000 items in the list, then you need to execute this flow more than once or you need to execute this in batch.

Step 2:

Add a compose action and add the “intVarItemCount” variable in it.


@{variables('intVarItemCount')}

Add compose action Power Automate Do Until Loop

Step 3:

Add compose action to convert the number to a string. Add the below value to the compose action.


string(outputs('Compose_-_Item_Sequence_Number'))

Add compose action to convert number to string

Add compose action to convert number to string

Step 4:

Add a set variable action for the “strVarItemTitleToBeCreated” variable. And using the Concat function add two strings (‘Item_’ and ‘incremented number).


concat('Document_',outputs('Compose_-_Convert_item_sequence_to_string'),'.docx')

Concat function add two string in Power Automate

The Concat function add two string in Power Automate

Note:

  • Here we created the file name as “Document_1”, “Document_2”, and “Document_3”, etc. However, you could give some other values. Here the “Document_” part is fixed and the number part is dynamic (auto-incremented).

Step 5: Create file action in Power Automate

Add a “Create file” action and pass the below parameters:

  • Site Address: Your site URL
  • Folder Path: Select the document library path where you want to upload the files; here we have selected the document library root folder.
  • File Name: Pass the file name from the previous step, “strVarItemTitleToBeCreated”
  • File Content: Pass the body of the get file content using path or directly use this – @{body(‘Get_file_content_using_path’)}

Create file action in Power Automate

Create file action in Power Automate

To add files in SharePoint using Power Automate, use the Create file action. For detailed official guidance, refer to the Microsoft SharePoint Connector in Power Automate documentation.

Step 6: Update file properties in Power Automate (Optional step)

Add an update file properties action and pass the below parameters:

  • Site Address: Your site URL
  • Library Name: Your document library name
  • Id: Item ID from the previous step create file action or directly like use this – @{outputs(‘Create_file’)?[‘body/ItemId’]}
  • Title (Optional): Here we have passed the title as “Document_ItemID”, for this we have passed as –
    concat(‘Document_’,outputs(‘Create_file’)?[‘body/ItemId’])
  • ItemCreatedChannel Value (Optional) – Select as Power Automate (it has two values, Power Automate and Manual)
Update file properties in Power Automate
Update file properties in Power Automate

Step 7: Final Step

Increment the “intVarItemCount” variable by 1. For that add increment variable action.

Add increment variable to auto increment number in Power Automate
Add increment variable to auto increment number in Power Automate

That’s it we are done with the flow. Now let’s run the flow manually as this type of manually triggered flow. Then, take a break, then see the status, you could see that 5000 documents have been created in the document library.

2026: Upload 5000+ Files in SharePoint Using Power Automate

We could see that 5000 documents have been created in the list ‘AddMoreThan5KDocuments’ library.

Create more than 5000 documents in SharePoint using Power Automate
Create more than 5000 documents in SharePoint using Power Automate

Summary: Upload Multiple Files in SharePoint Using Power Automate

In this article, we learned how to upload multiple documents to a SharePoint Online document library using Power Automate. We covered how to efficiently handle bulk uploads by auto-incrementing numbers in a Do Until loop. You also learned how to:

  • Use the Get file content by path action in Power Automate
  • Use the Create file action to add files in SharePoint
  • Retrieve file information using Get file properties in Power Automate

Frequently Asked Questions (FAQs)

  • Q: How do I upload multiple files in SharePoint using Power Automate?
    A: You can upload multiple files by creating a Power Automate flow that uses the Get file content by path and Create file actions. Use loops like Do Until to handle bulk uploads efficiently.

  • Q: Can I upload more than 5000 files to SharePoint at once?
    A: Yes, using Power Automate, you can upload thousands of files. Auto-increment numbers in loops help process large batches without errors.

  • Q: How do I preserve metadata when uploading multiple files?
    A: Ensure required columns in your SharePoint library are mapped in Power Automate using Get file properties and set them during the Create file action.

  • Q: Is there a file size limit when uploading multiple files to SharePoint?
    A: SharePoint Online supports files up to 250 GB each. For large batches, Power Automate handles files sequentially to avoid failures.

  • Q: Do I need special permissions to upload multiple files using Power Automate?
    A: Yes, you need edit permissions in the target document library and a Power Automate account with access to SharePoint.

  • Q: Where can I find official Microsoft documentation for these actions?
    A: Refer to Microsoft Power Automate SharePoint actions for official guidance.

Related Power Automate Tutorials

You may also find these Power Automate tutorials helpful to enhance your workflow automation skills:

 

About Post Author

Do you have a better solution or question on this topic? Please leave a comment