Issue when using Item List node based on n-2 node

Hi I need to loop through elements to perform certain task (create a database page in notion and then create a certain nb of block). But I have ab issue due to the fact that the field to split our is not in the previous node but in the node before (n-2).

If I do this, it works fine :

But if I insert a node in between, it does not work :

I get that error in the Item List node :

1 item
ERROR: Couldn't find the field '[object Object],[object Object]' in the input data
25/05/2023 13:08:48
Item Index: 0
NodeOperationError: Couldn't find the field '[object Object],[object Object]' in the input data
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/ItemLists/V1/ItemListsV1.node.js:808:35)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:652:51)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:592:68
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Thanks for any help.

Hi, nobody has an idea of my problem ? thx

Hey @One1Tick, you’re issue here is that the Itemlist node actually expects the key/path to the item. In your second example you pass the value in instead, so that it does not work anymore. Can you tell me more about what you’re trying to achieve? Currently, it does not make sense to me why you would want to add a node in between those two :slight_smile:

Thanks @Niklas_Hatje ! The reason is that my first node is a webhook (this is the node I get the ItemList from). Then I need a notion node to create a record in a notion databse and set some fields in it. Then the I should make a loop too add more blocks in the new notion record. For this I need the Id of the record coming from the notion node and tje itemlist coming from the webhook. More details in this thread… Loop through json - #3 by One1Tick
Thanks again :pray:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.