We have a workflow which read an excel sheet which contain 12,000 rows >> then Foreach those rows, as follow:

enter image description here

Now the issue is that the first action will read all the 12,000 rows >> but the Foreach can handle only the first 5000 rows.

So is there a way to force the flow to have 3 ForEachs? first one will process the rows from 1 to 5000 >> second will process the rows from 5001 to 10,000 >> last one will process the rows from 10,001 to the end?

1 Answer 1


You can try using skip(...) and take(...) functions. skip(...) will skip a number of items from the beginning of an array, e.g. to skip 5000 items:


take(...) will take a number of items from the beginning of an array, e.g. to take first 5000 items from an array:


If you combine them together, you can take items 5001 - 10000 from an array:


So you can create three parallel branches in your flow:

  • Branch one: take([array_of_items],5000)
  • Branch two: take(skip([array],5000),5000)
  • Branch three: take(skip([array],10000),5000)

Then, inside each branch, you can have a separate foreach iterator.

  • thanks for the reply.. so you mean the Skip and take inside the Action options?
    – John John
    Oct 29, 2021 at 0:43
  • You can do it inside your Apply for each action, in the Select an option from previous steps field like so: take(skip([List_rows_output_goes_here],10000),5000) Oct 29, 2021 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.