flow
(required): The entry point for the loop. Connect the node(s) that should execute before the loop begins.condition
(required): A boolean value determining whether the loop should continue. The loop will run as long as this input is true
.completed
: Triggers when the loop has finished executing, either because the condition became false
or the maximum iterations were reached.loopBody
: Connects to the node(s) that should execute on each iteration of the loop.maxIterations
: The maximum number of times the loop is allowed to run before forcibly exiting. This prevents infinite loops. Default is 10.flow
input.condition
input. This will be checked at the start of each iteration to determine if the loop should continue.loopBody
output to the first node that should run on each loop iteration.flow
input to complete the loop circuit.completed
output to any nodes that should run after the loop has finished.maxIterations
configuration value to set an appropriate limit for your use case.flow
input of a While Loop node.true
as long as count is greater than 0.condition
input.loopBody
to a Subtract node. Connect the Variable to the Subtract node’s first input and set the second input to 1. This will decrement count by 1 each iteration.flow
input.completed
output to a final Debug node with the message “Loop finished!”.maxIterations
limit. Choose a value high enough that the loop can complete under normal conditions, but not so high that a buggy infinite loop would hang your spell for too long.false
, otherwise the loop will run until the iteration limit and may not complete its intended task.false
in the middle of an iteration, the current iteration will still complete.maxIterations
limit, the completed
output will still trigger. Check the iteration counter if you need to determine whether the loop exited “naturally” or not.