Widgets/Producer
Loop
Loop
A "Producer" type widget. Loop Widget iterates over an array of items. For each item in the array, it transmits the item itself through the output port and its zero-based index through the index port. Once all items have been processed, it transmits a true boolean value through the finish port.
The Loop Widget supports both manual iteration (requiring triggers on the next port) and automatic iteration (when Auto-Loop is enabled). It can also automatically clear its internal state after completion for memory management.
Inputs
-
array (DataType: Array) Receives an array to be iterated over. When an array is received, the Loop Widget will store it internally and reset the current index to 0. If
Auto-Loopis enabled, the Loop Widget will immediately start iterating through all items. -
next (DataType: Anything) Triggers the processing of the next item in the array. If
Auto-Loopis disabled, this port must be triggered for each item in the array to process them one by one. -
clear (DataType: Anything) Clears the last received array and resets the widget's state. This is useful for freeing up memory or preparing the widget for a new array.
Outputs
-
output (DataType: Automatically determined) Transmits the current item from the array. The data type of this port will match the type of the items in the input array (Number, String, Object, etc.).
-
index (DataType: Number) Transmits the zero-based index of the current item being processed.
-
finish (DataType: Boolean) Transmits
truewhen the loop has finished iterating over all the items in the array.
Custom Settings
This widget offers settings to customize its behaviour.
-
Auto Loop When enabled, the widget will automatically iterate through all the items in the array as soon as it's received on the
arrayport. If disabled, you will need to trigger thenextport to process each item. -
Auto Clear If enabled, the widget will automatically clear the internal array after the loop has finished. This is useful to free up memory when the array is no longer needed.

Examples
Manual Iteration (Auto Loop Disabled)
This example shows how to manually control the iteration process by triggering the next port for each item:
Drag the example onto the workspace to explore and experiment!
In this example:
- The Button widget triggers the Text widget to start the process
- The Text widget contains the array
["apple", "banana", "orange"]and transmits it to the Text to Object widget - The Text to Object widget parses the JSON string and transmits the array to the Loop widget through the
arrayport - Auto Loop is disabled, so the Loop widget stores the array but doesn't start processing
- Each time the
nextport on the Loop widget is triggered:- Transmits the current item through the
outputport to the Text widget - Transmits the current index through the
indexport to the Display widget - The internal index is incremented
- Transmits the current item through the
- After processing the last item, the
finishport transmitstrueto the Display widget - The Loop widget is ready to process the same array again if
nextis triggered
Automatic Iteration (Auto Loop Enabled)
This example demonstrates automatic iteration through all items in the array:
Drag the example onto the workspace to explore and experiment!
In this example:
- The Button widget triggers the process
- The Text widget contains the array
[1, 2, 3, 4, 5]and transmits it to the Text to Object widget - The Text to Object widget parses the JSON string and transmits the array to the Loop widget through the
arrayport - Since Auto Loop is enabled, the Loop widget immediately starts processing all items
- The Loop widget automatically:
- Transmits each number through the
outputport to the "Delay 1 sec" custom widget - Processes all items sequentially without manual intervention
- Transmits each number through the
- The "Delay 1 sec" custom widget introduces a 1-second delay before passing each value to the Display widgets
- The Display widgets show the processed values
- After processing the last item (5), the Loop widget transmits
truethrough thefinishport to the Display widget - The Loop widget is ready to process a new array if one is provided
📌 Notes
- The Loop Widget automatically detects the output data type from the first item in the array
- Index is 0-based (first item is at index 0)
- When Auto Loop is disabled, you must trigger the
nextport for each item you want to process - When Auto Loop is enabled, all items are processed synchronously without delays. For step-by-step visualization, use custom widgets with timing delays or manual iteration triggers.
- The
finishport transmitstrueonly after the last item has been processed - Auto Clear is useful for memory management in long-running recipes
- The
clearport preserves user settings (autoLoop and autoClear) while resetting the internal state - Works with any array type (numbers, strings, objects, mixed types)
- The Loop Widget maintains separate state for each widget instance
Glossary
-
Array
A collection of elements (numbers, strings, objects, etc.) stored in order, accessible by position.
-
Index
A position number starting from 0 that identifies an item's location in an array.
-
Iteration
The process of repeating operations for each item in a collection.
-
Memory Management
Efficiently managing computer memory to prevent waste and optimize performance.
-
Custom Widget (Widget Group)
A user-created widget built by grouping other widgets together, with custom inputs, outputs, and settings. Custom widgets allow users to create reusable components for complex workflows. In the examples above, the "Delay 1 sec" custom widget introduces timing delays between loop iterations to demonstrate the widget's behavior more clearly. (For more information, click the "?" icon on the custom widget in the workspace.)