I don’t know why but the Alerts Cycle node would not cycle correctly the data, some data will not enter the loop arrow but the weird thing is that will eventually go to done (but not looped).
What is the error message (if any)?
No errors
Share the output returned by the last node
There’s no “last node” but as n8n says, in my test the alert cycle is fed by 33 items and in loop will enter only 20
Information on your n8n setup
n8n version: 1.73.1 (Self Hosted)
Database (default: SQLite): postgres
n8n EXECUTIONS_PROCESS setting (default: own, main): own, main
Running n8n via (Docker, npm, n8n cloud, desktop app): docker
I have found that any filtering of objects within the loop output path of a loop over items node potentially disrupts the completion or normal behavior of the loop. The problem might be with your Is Alert Already Cached branching some items completely out of the loop, where they route to Trigger SOAR Case Ingestion or Notify by Email and never return to the loop.
Try to rearrange things such that all items sent into the loop path actually flow back to the loop over node.
Also, for future reference, the Code Node that returns only 1 item, within the loop, could be disruptive if the batch size for the loop were anything but 1. I would probably try to avoid doing that within the loop path too.
I don’t want the main workflow to wait sub-worflows to end (I configured this by sub-workflow settings) and then next interation… so I am not using a merge node.
Plus: you’ve said that the problem is probably the “is Alerd Already Cached?” Condition node, but as you can see from the image below the cycle is getting 33 items (I think that total items should be like 77) but only cycling 20 from the start… I’ll try with your solution by the way.
n8n already iterates items in each node. Wondering if maybe you don’t need the alerts cycle loop at all. What was the initial motivation to use a loop over items node? Did you need to limit the rate of something within the loop or serialize something? Could you just pipeline all of the items through the steps and let n8n handle the “for each item” part?
I solved as you said not using the Cycle node, but that solution smells like a “work around”.
I like to use that node because it is more intuitive to play with and I guess it is also more versatile.
I think with n8n, trying to manually loop the flow to apply steps to the list of items is the “wrong” way. It certainly makes a lot more things awkward, and goes off the rails more easily when something happens during the loop path that interferes with the list of items flowing through.
It is definitely counter-intuitive if you are accustomed to using loops in a programming language, but once you start thinking of a workflow as a pipeline of actions, to apply to a set of things, it starts making more sense.
Please mark the post with the answer as the solution so that others who find this in the future can find the answer. That will also re-tag the item as “Support Done.” Thanks.