Info Upfront
Hi there. I decided to build a little For-Loop-Node with 3 Inputs and 3 Outputs:
Inputs:
- Parameters (Input just to get the Loop started. Content irrelevant)
- DataIn (Input that shall be passed through to DataOut)
- CounterIn (Input that includes the current counter)
Outputs:
- Finished: Shall be called with all DataIn when Loop finished
- CounterOut: Outputs the current counter value. Is connected with CounterIn via a NoOperation
- DataOut: Is connected with DataIn via a Code Node
What is the problem?
It looks like only one of the inputs gets filled everytime. I compared with the compare-dataset and the merge node code and don’t see any requirement to “do something” to wait for all inputs to be available.
When adding a Wait-Operation, it’s visible that the node seems to wait for inputs, but the data is not filled.
Is there anything I should check or keep in mind to fix this issue?
What is the error message (if any)?
Not a real error message, but I can share the Logs:
Counter: []
Parameters: [{"json":{"Type":"Word","Value":"Hello World"},"pairedItem":{"item":0}},{"json":{"Type":"Number","Value":"5"},"pairedItem":{"item":1}},{"json":{"Type":"Number","Value":"8"},"pairedItem":{"item":2}}]
Data: []
Looping....
CurrentValue: 1
StartValue: 1
EndValue: 10
stepValue:1
Counter: [{"json":{"counter":1},"pairedItem":{"item":0,"input":2}}]
Parameters: []
Data: []
Looping....
CurrentValue: 2
StartValue: 1
EndValue: 10
stepValue:1
... I removed some lines here...
Counter: [{"json":{"counter":9},"pairedItem":{"item":0,"input":2}}]
Parameters: []
Data: []
For Loop finished!
CurrentValue: 10
StartValue: 1
EndValue: 10
stepValue:1
2023-12-30T19:35:30.
Please share your workflow
As mentioned, it includes my CustomNode; so, not sure if you can see it
Here’s a screenshot for completeness
Information on your n8n setup
- n8n version: 1.20.0
- Database (default: SQLite): Postgres
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
- Operating system: Linux (Debian or Ubuntu, not sure right now)