Hello everyone,
I’m currently running n8n locally using Docker on my laptop, and I’ve encountered an issue while developing my workflow.
Problem:
I want to pass the output data from the “Extract Details” node to the “Pass Programs” node, which appears later in the workflow. However, the “Pass Programs” Code node does not receive all the data produced by “Extract Details.”
Observations:
The “Extract Details” node outputs 7,621 items across 326 iterations inside the loop.
The “Pass Programs” node only outputs 326 items (one per iteration), and all items contain the same content, as shown in the image.
Questions:
Why does this behavior occur, and how can I fix it so that all extracted data is correctly passed to the “Pass Programs” node?
Thank you for taking the time to read my question. I’d really appreciate any help or insights.
Hi, I think your workflow should look like this, but I can’t test it on my side. the output of the loop node can help also to verify that theory before trying it…
hello @Nestor , thank you for your response. I have tried your approach but the “Pass Changes“ code node still doesn’t work as expected. The output of the loop node is 327 items including: 326 items in the loop branch ( each one is one day and it’s program schedule data), the last item is in the done branch with 326 output for the “Detect Changes1” node.
You managed from our suggestion to use a subworkflow to use “split” the nested looping…
And it seems you just “eliminated” the initial loop, instead where actually your problem is… 1 item(can contain an object with multiple arrays/objects.)… and you seems that you have items (and it means maybe you need to splitout to iterate again trough them)…
Soo.. pinning data in the critical points as well is advides since some of us don t ue some sevices(personally i don t have mysqlq)..
And try first put on paper your flow(not the workflow)… then try put nodes that accomplish some tasks.
What are you doing at moment, is just circleying around lol.
Explain to us what you want to achieve and some informations.
Cheers!
@Parintele_Damaskin Sorry for your confusion but the one you answered for me the previous day was another problem of another workflow. That was a nested loop problem and i solved it because of your help (very appreciate that).
I have defined my problem very clear in this situation above where i cannot pass the data from one node to another one. I want to pass the data correctly. I always try to provide as much information as i can like pin the data. However, you already known there is the length limit or html_raw here so i will try as much as i can. Thank you so much!
As i have assumed, you still don tget how looping or nested loop works in n8n…anyway, @Wouter_Nigrini already “pointed” you in the right direction…
Beside that, some code nodes that have an overkill code just for some smple inflate/split array/objects ito items and procces i woul have apporoahhe d different path since is just “comparation” you are trying to achive at the end, and that s why i commented
thank you @Parintele_Damaskin i have try your approach and the Pass Programs node still cannot pass all the data from the Extract Details node. i dont understand why in another workflow i try the same approach of passing the data, it worked but this one doesnt. If the behavior is correct, the output of Pass Programs node should be 7621 items. Here is the file i use as input of all my workflow: gg drive
hey @TrinhNhatHuy !
Yea, that behaviour is known since clears its internal buffer every time a new loop starts… and some “twiks” are needed look for internal executions details.
*I used your file and it get 763, but the principle should be the same.
@Parintele_Damaskin Finally, I was able to solve the problem. Thank you so much for your guidance—I understand it now!
Have a great day and Happy New Year