Dear Community,
I have designed a Power automate flow to update a SharePoint list.
It's a scheduled cloud flow which will run once in a day and fetch data from an API, the API return around 10000 items, since the maximum number of foreach items limit for action 'Apply_to_each' is '5000', so I have split the API data using Filter Array action into multiple values based on some condition.
Now, under each 'Apply to each' for the filter array action, I check whether the current value is present in SharePoint list if yes, then a condition to check if some fields have updated value, then update the item else, create new item.
When I run the flow for the first time it worked fine, created around 3000 items in some couple of mins then the flow became slower creating 1-2 items in an hour, after canceling the flow and rerunning it again it behaves the same way.
Is there any way to optimize the flow. I have started the flow today, 20 Oct,2023 11:33 AM IST and it's been 6 hours the flow is still running. The smaller value of Filter array got completed but the value with 1000 and 4000 has been stuck in loop.
Please help me out with this issue. Attached is the Flow snapshot.
Edit: I have also tried by enabling the Concurrency Control with its max value i.e. 50.