n8n version: 1.105.0 and 1.104.1 (tried on both)
hosting: cloud
In the attached image, there is a very simple and basic workflow wherein 5 items are passed by code node (Debug - Dummy Data Generator) to the loop over node. However the loop over node just pass 1 item to the next node (Debug - Logger) and flow ends.
The code in the first code node (Debug - Dummy Data Generator) is as under:
// — DEBUG NODE —
// This node generates a simple, perfectly structured list of 5 items
// to test if the Loop Over node is functioning correctly.
const outputItems = ;
for (let i = 1; i <= 5; i++) {
const newItem = {
json: {
stock_name: TEST_STOCK_${i},
test_id: i
}
};
outputItems.push(newItem);
}
// This returns an array of 5 correctly structured n8n items.
return outputItems;
and the code in the second code node (Debug - Logger) is as under:
console.log(‘Loop iteration is running for:’, $input.item.json.stock_name);
return $input.item;
The loop over node is with default settings (batch size - 1 and nothing else).
Please help me finding out the rearon. Thanks.
