Split Out Items (Item Lists) not working on Function node data

I found out that the Split Out Items operations doesn’t work on Function-generated data. “Coudn’t find the field…”

I compared it with the Customer datastore node, aggregating it and then splitting out without any problem.
Completely udentical data from the Function node fails. You can check it out. The top branch works, the bottom one doesn’t

If the data a node does output is identical, then n8n will to 100% behave the same as it does not care, or even know about the node-type which does output the data.

In your case is the data very different.

The Item Lists1 has a “name” property for all items (in this case one item):

The Function Node has the “name” property only for the first item and not the second (for that reason the error message. There is one item with just “name” property and a second item with just an “email” item):

So you would have to change your Function Node to only return one item with both properties set.

The Function Node could would then look like this:

return [
  {
    json: {
      name: ['Jay Gatsby', 'José Arcadio Buendía'],
      email: ['[email protected]', '[email protected]']
    }
  },
];

Hope that is helpful!

1 Like

To my shame, I was confused. Thank you for pointing out my mistake.

No problem. Writing custom items in a Function-Node is honestly neither the simplest, best documented, or most intuitive thing :wink:

Happy to hear that it was helpful Have fun!

1 Like