entryton
entryton

Reputation: 290

Handle more than 5000 items in Power Automate

I am setting up a Flow that can read an Excel file and insert the items to a list in SharePoint Online.

However, the Flow fails when there are more than 5000 rows in the excel.

Even when I set an item limit of 5000, I get this error:

Unable to process template language expressions for action 'Apply_to_each' at line '1' and column '5658': 'The number of foreach items limit exceeded for action 'Apply_to_each': maximum '5000' and actual '5120'.'.

How can I work around this?

Upvotes: 0

Views: 8977

Answers (2)

entryton
entryton

Reputation: 290

We had an approximate count on the rows that would need to be imported. So we had multiple read excel actions.

  • In the first one, we read the first 5000 rows and insert them to the list.
  • In the next action, we skip the first 5000 items and read the next 5000; then insert them to the list.

We had enough actions to cover all the expected rows, and the Flow is working fine.

Upvotes: 0

Haukland
Haukland

Reputation: 755

The free license allows up to 5000 for each items, while several other licenses allow 100,000. From the documentation: enter image description here

This is per flow, so a workaround like having multiple excel files with 5000 lines or several loops with a variable where the line number is stored will not work.

Upvotes: 1

Related Questions