Hey, I think you have the items of your other sheets but it is on the other page, also, it’s likely that you have duplicate data because you link the done of the second loop to your first loop.
Here’s a way to avoid that :
(the split node is doing what your code node does)
You might not need the second loop as n8n already treat items sequentially, so you can do this :
Thank you so much @lugnicca!
The first solution does the job but it processes all of the records together. Is there anyway I can force it to process all the rows from the first sheet only after that it should read the second sheet and process it’s records?
The reason is, we need to update the record in the same sheet based on different conditions.
If we process all records together, how would we know from which sheet this row/record is coming from?
As n8n process items sequentially, you can just treat each item in the same flow without adding another loop, so each row will be treated in order of the sheet :
You can test it :
If you really want to do a loop, the way I would see would be to call a subworkflow that will loop through your items.