My Flow with a loop isn't looping

I have a Flow that roughly looks like this

  • Request A (get X from response)
  • Request B (get Y from response)
  • For Loop on Y
  • Request C (pass X and pass Y)

I’m expecting Request C to be called multiple times, because Y has multiple items. I suspect my issue is related to X, but I don’t know how to say “For each item in Y, call Request C, and pass X every time”

Other notes

  • if I stick a log on Y, I can see it iterate as many times as I expect. But Request C is always called only once, for the first iteration
  • Request C is successful, but after the first iteration, the entire Flow is stuck
  • No errors

Hi @atorrenosensei

Could you provide a screenshot of your flow that isn’t working? It will be easier for me to debug that way :slight_smile:

I will share multiple screenshots, from left to right

So, grab stuff from a source site, add it to a destination site, then go back and grab details from the source site, and add it to the new thing you created on the destination site.

I think this is the critical part

The inputs into the final request are things that are coming from the For Loop, and a thing that came from a previous request.

The Flow guid is 664e29d4ac22f2003c5d2aac if that helps as well.


Thanks for providing that.

Reading through and trying to recreate a simplified version of this flow on my own, I believe the issue is that you’re using two For Blocks which will operate asynchronously and lead to unexpected results. In your second screenshot, you can place a collect block after you’ve created the SQL reports request. This will wait until the first For Block finishes before continuing.

Another (potential) issue is in that second screenshot request, the token port looks like it isn’t connected to any value.

Thanks for reviewing, I’ll try out a few things based on your suggestions!

The 2 loops was the issue. The first loop was actually not necessary, I adjusted it to directly grab the response array at 0. Thank you!!!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.