Retry Requests for limited times in Flows

Hello, I’m having trouble performing a simple task in FLOWS.

I want to resend the same HTTP request 5 times if the result received isn’t what I expected. In the screenshot below, the resend is unlimited.

The REPEAT BLOCK doesn’t work for this because it continues to rerun the HTTP request even when the expected value is received. If I set the REPEAT BLOCK to 5 times, it calls the function 5 times without checking any conditions.

I also tried creating a variable and incrementing it, but it seems that variables can’t have their values ​​updated. (are not true variables)

Hey @g-lelis :waving_hand:

Welcome to the Postman Community! :postman:

Thank you for the question - I’m going to bring in @flows-daniel or @lunar-module-1 to help you out here :folded_hands:

Hi @g-lelis

Welcome to the forums!

We have a section in our docs here that shows how to use an evaluate block to increment and pass a variable that does up to x times. You can have two conditions variable less than 5 and also result isn’t what’s received in this case.

Let me know if this works for you.