[Beta] New Workflows Loop Block

Hi all,

We are excited to announce improvements to the loop blocks are now available in beta both Cloud and Self-hosted deployments, versions 3.42 or later. If you would like to enable them for your organization, please complete this form or email me at andrei@retool.com.

This revamp aims to address many of the pain points of the current loop block:

  • Iteration-level timeouts
  • Sequential execution/batching/delays without need for custom code
  • Ignore iteration-level errors
  • Access entire response for REST queries, including metadata

Iteration-level timeout

Previously, the timeout of the loop block was effective at the block level, which capped the execution time at 10 minutes, regardless of the number of iterations. The new loop block allows timeouts of up to 30 seconds per iteration.

Note that this feature is only available when executing the entire workflow, not when previewing a single block

Execution modes and delays

The new loop block provides parallel, sequential, and batched execution modes, as well as the ability to set delays between iterations or batches. Previously, loops iterations would run in parallel by default, and this behavior could only be changed by modifying the loop code manually.

Improved iteration-level error handling

It is now possible to ignore iteration errors. Previously, errors in one iteration would fail the entire loop block.

Access metadata

The metadata for each iteration is now exposed and accessible in subsequent blocks. Previously, the loop block would not return metadata by default when running a query in a loop.

Note that enabling this feature will only change the behavior of newly created loop blocks, and existing loop blocks will continue to function as before.

Full documentation: Loop block V2 | Retool Docs

We would love to hear your feedback on this feature. Please let us know if you have any questions or suggestions!

1 Like

Looks pretty sweet.

Can the block be configured to timeout at 30 seconds per iteration OR 10 mins for the block? Or will it always be a per iteration timeout?

With the new version, the timeout will be per iteration - no timeout at the block level. But we could adjust that in the future if there is still a need for block level timeouts.