Issue Summary
When using a Merge node within a workflow that includes a Loop Over Items and an If node, the Merge node does not return the expected filtered data. Specifically, it includes items that should have been filtered out based on the conditions in the If node.
Workflow
Workflow Explanation
In this workflow:
- Code node generates an array of items, each with a
"name"
,"value"
, and"ok"
property. - The Loop Over Items node iterates over each item.
- The If node checks if
"ok"
istrue
and only allows items that match this condition to continue. - The Merge node is expected to aggregate only the items where
"ok"
istrue
from the If node.
Expected Output vs. Actual Output
- Expected Output: Only items with
"ok": true
are included. - Actual Output: The output unexpectedly includes items with
"ok": false
, meaning the Merge node is not consistently excluding items based on the If condition.
Environment Details
- n8n version: 1.58.1
- Database: SQLite (default)
- Execution Process: Own (default, main)
- Running n8n on: n8n Cloud
Could anyone help troubleshoot why the Merge node isn’t applying the If condition correctly within the loop?