Loop stops execution after first element

Hey! I have a strange problem with my n8n setup. In general it pull data from http, splits with function to list of items and then for each item it should:

  • query db with item
  • create new record in DB if no record exists

Output from my function node shows 10 items and thats ok,
But then after pg execute query and if-node I got only one result.
How to properly iterate over each item and not only first?

More details

Split in batches with 1 item in batch and definition of loop helped

1 Like

I think that if you use mode: independently in the execute query node, it will return as many items as inputs you provided. You can try that out. That way, you might now need the split in batches node.

1 Like

Did that fix the issue?

No, only adding split in batches with loop helped.

1 Like