For Loop Close (Deprecated)¶
Closes a deprecated for-loop construct. It decrements the loop counter and re-invokes the enclosed subgraph while the remaining count is greater than zero, passing through any auxiliary values each iteration. Use this only for legacy graphs; prefer the newer Loop Open/Close nodes.

Usage¶
Pair this node with For Loop Open (Deprecated). Connect For Loop Open’s flow_control output to this node’s flow_control input. Provide any values you want to persist across iterations via the optional initial_value inputs. The node internally decrements the counter and continues looping until the remaining value is no longer greater than zero, then returns the final carried values.
Inputs¶
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| flow_control | True | FLOW_CONTROL | Loop control link from For Loop Open (Deprecated). Drives the loop’s lifecycle. | Link from For Loop Open (Deprecated) -> flow_control |
| initial_value1 | False | WILDCARD | First value to carry through and update each iteration. | Text, Image, Dict, or any data |
| initial_value2 | False | WILDCARD | Second value to carry through and update each iteration. | Counter, List, or any data |
| initial_value3 | False | WILDCARD | Third value to carry through and update each iteration. | Accumulated result object |
| initial_value4 | False | WILDCARD | Fourth value to carry through and update each iteration. | Auxiliary state |
Outputs¶
| Field | Type | Description | Example |
|---|---|---|---|
| value1 | * | Final value of the first carried data after the loop completes. | Final text/image/result object |
| value2 | * | Final value of the second carried data after the loop completes. | Final counter/list/state |
| value3 | * | Final value of the third carried data after the loop completes. | Final accumulated result |
| value4 | * | Final value of the fourth carried data after the loop completes. | Final auxiliary state |
Important Notes¶
- This node is deprecated. Prefer using Loop Open and Loop Close for new workflows.
- Works only when connected to For Loop Open (Deprecated) via the flow_control input.
- The loop counter is decremented each iteration and the loop continues while remaining > 0.
- Optional inputs initial_value1–initial_value4 are carried across iterations and returned as outputs.
- On internal errors, outputs may return as None.
- Requires supporting arithmetic and comparison nodes (integer subtraction and condition). If those nodes are missing, the loop will fail to expand.
Troubleshooting¶
- Loop never runs or exits immediately: Ensure the remaining value provided by For Loop Open is greater than 0.
- Graph doesn’t expand or errors about missing operations: Make sure integer math and condition nodes are available and correctly installed.
- Outputs are None: This typically indicates an internal error during expansion; check the node connections and types of initial_value inputs.
- No updates to carried values: Verify you’ve wired the outputs of the loop body back into the corresponding initial_value inputs on For Loop Close.