Workflow retry-step limitation, I quit Retool


We are facing a new limitation, that's the "too much" limitation for us which will lead us to quit retool if its not fixed ASAP.

We have a workflow where 1 block (Rest API) gives a status "pending/completed", we must retry this step until it's "completed". There is no way to achieve that using the Rest API + Branch.

The only way is to create a code block that will perform the retry.

1 Like


In your workflow, is the limitation just that you are calling the API and waiting for a "completed" response and the node is retrying too many times before the "completed" response is received?

Hi pyrrho!

So, the limitation is that I must poll (by sending 1 request) to get a status. The initial status is "pending", then at some point it's "completed". I must poll every 1 seconds until I get "completed". (there is no webhook open on the service that I need to poll

What is your desired state? Instead of a JS block that retries until the status is complete and then does something, you want a branch block that does what? Retries until it is complete and then does something?

Hey som!

One way to do this today would be to take advantage of Functions in Retool Workflows.

I would create a function that makes the API call to your resources and then call it in a Javascript block at the rate and with the exit criteria that you want.

So if you create the function to call the REST API and name it getStatus, your JS block could look something like

var status = await getStatus()
var currentIteration = 0
while ( != 'completed' && currentIteration < 60) {
  await new Promise(r => setTimeout(r, 1000))
  status = await getStatus()
  currentIteration += 1


This would call the Rest API, check the status and then sleep for a second if it's not completed and then try again.

Let me know if that helps!