{ "name": "verify-workflow-output-in-loop", "helpers": [ { "key": "sub", "name": "verify sub: names its result from inside a loop", "active": true, "nodes": [ {"id": "in", "name": "Input", "type": "workflow-input", "position": {"x": 0, "y": 0}, "config": {"fields": [{"name": "n", "type": "number", "required": true}]}}, {"id": "items", "name": "Items", "type": "code", "position": {"x": 0, "y": 100}, "config": {"code": "return { items: ['only'] };"}}, {"id": "loop", "name": "Loop", "type": "loop", "position": {"x": 0, "y": 200}, "config": {"inputField": "data.result.items"}}, {"id": "out", "name": "Out", "type": "workflow-output", "position": {"x": 0, "y": 300}, "config": {"source": "fields", "fields": [{"name": "named", "value": "from inside the loop"}, {"name": "item", "value": "{{loop.item}}"}]}} ], "connections": [ {"sourceNodeId": "in", "sourceOutput": "main", "targetNodeId": "items", "targetInput": "data"}, {"sourceNodeId": "items", "sourceOutput": "main", "targetNodeId": "loop", "targetInput": "data"}, {"sourceNodeId": "loop", "sourceOutput": "loop", "targetNodeId": "out", "targetInput": "data"} ] } ], "nodes": [ {"id": "n1", "name": "Trigger", "type": "click-trigger", "position": {"x": 0, "y": 0}, "config": {}}, {"id": "call", "name": "Call", "type": "call-workflow", "position": {"x": 0, "y": 100}, "config": {"workflowId": "{{helper:sub}}", "inputSource": "fields", "fields": [{"name": "n", "value": "1"}]}} ], "connections": [ {"sourceNodeId": "n1", "sourceOutput": "main", "targetNodeId": "call", "targetInput": "data"} ], "expect": { "call": {"status": "completed", "output": {"result": {"named": "from inside the loop"}}} } }