Describe the issue/error/question
Although this is a large workflow, the problem is actually very simple - an issue with nested Split into Batches is all that’s going on here
Trying to set up a nested batch system using a solution offered by @harshil1712 here (How to use a nested split in batches?). There are two batches that get run:
- RSS_Batch
- Line_Batch
Consider two runs items passed through RSS_Batch (which will each fetch 15 RSS Feed items - 15 x 2 = 30 in total for both items):
For the first item, everything runs fine, no problem. Once we loop through RSS_Batch for a second time for second time, the first process runs fine.
But for the second process:
The first item (item 16) runs no problem through Line_Batch. Then it is the second item (item 17), which somehow fails to pick up the correct data for item 17 but takes the data from the Notion
node instead; this causes it to error at 17.
I think, for some reason, it is not picking up the next item in Line_Batch when we run for a second time. Maybe this is due to how IF2 is configured (using {{!$node["Line_Batch"].context["noItemsLeft"]}} = true
to reset the second loop as per @harshil1712 (How to use a nested split in batches?).
Would be very grateful for some feedback as to how to get the nested loops to properly operate on the second iteration.
Please share the workflow
Share the output returned by the last node
Errors because it cant find the correct data
Information on your n8n setup
- n8n version: Latest
- Database you’re using (default: SQLite): SQLite
- Running n8n with the execution process [own(default), main]: main
- Running n8n via [Docker, npm, n8n.cloud, desktop app]: Docker