I'm using this Flow to extract data from a Sharepoint list with more than 5000 rows. I get the lowest and highest ID. Then I initialise the threads variable, so I can query Sharepoint the right number of times. At the moment I'm hardcoding 4 elements into the array and the Flow runs the Apply to each 4 times.
This means the Flow will retrieve data from a list containing up to 20000 rows.
Instead of hardcoding 4 elements into the array and concurrency control, is it possible to work out the highest ID - lowest ID and divide the difference by 5000.
For example if my Sharepoint list has 27000 rows, I would want 6 elements in the array.