Can the False evaluation of an IF block repeat a previous block?

I have an API request that returns with a job status in the body. I would like to make the request again if the status does not equal “DONE” because I cannot call the next API until the status is “DONE”. I have tried passing the status through an If block with a basic FQL expression to evaluate if the status is “DONE” and sending the FALSE path back to the start of the API request, but it doesn’t appear to work that way.

I’ve also tried using the Repeat block to run 20 times with the TRUE path leading to a Collect block, thinking that doing so might break the Repeat block. That doesn’t appear to work either, though.

Is there a no-code way to accomplish this task? Are there any other low-code suggestions?

Hey John!

This certainly is the odd issue. I was able to setup an environment similar to what I’m seeing in your screenshot and was able to get it to work.

On first send, “Start” sends a “NOT DONE” status which triggers it to “re-send” the request that gives us the “DONE” status before it runs the true flow.

Can you maybe try using a delay block before re-sending the request? I’m wondering if there’s some kind of timeout that’s ending the execution before the request has a chance to return done.

Hi Kevin!

Thanks for your help! Following your example, I can get it to make the call if the response != “DONE” but it doesn’t really loop. it’ll just call that next block. If that next call results in “DONE” then it will follow the true path, but it doesn’t seem to go back through the false path–at least with my test data. I’ve spoken to one of our integration developers, and he doesn’t know of any limits on the get status API that I’m calling. There is a limit on total calls within a rolling minute, but my little flow I’m building isn’t reaching anywhere near those limits.

Do you know if the If block is allowed to run through a branch more than once?

I really appreciate your help so far. Here is my updated flow with some annotations to illustrate the above.

Ah! Bummer,

I’m not sure what the problem could be here then. When I set my test to return false repeatedly, it’ll keep running until I stop it.

In my example, I had it looping “Not Done” for some time and then while it was still looping, updated the request (Postman Echo service!) to return “Done” which completed the true flow.

But looking at your Flow, that should work.

It wasn’t as no-code as I’d hoped, but it was simple enough to figure out with a little bit of googling. I put this test in my get status request and it works flawlessly.

1 Like