I recently updated my n8n instance from version 1.64.1 to 1.76.3. In one of my workflows, I have a sub-workflow that has a http request and uses an IF Node to handle pagination. Previously, this setup worked as expected, but after the update, I’m encountering an issue where I get the following error:
ThIs is the code that used to work and now throws that error.
Could anyone advise if it’s still possible to retrieve all items from the Returns Product Information node across all iterations within a if loop?
I’m also aware that pagination can be handled within the HTTP Request node, but it would be helpful if this approach could still work and I’m also curious as to why it doesn’t anymore.
For anyone also experiencing a similar issue, I believe its a n8n bug introduced in the [email protected] when Sub-workflow debugging was introduced. The sub-workflow now returns metadata. Although the metadata key isn’t a recognised n8n item key, all recognised keys are shown below:
which results in this function being triggered
below is an example of the data structure returned by the sub workflow
To resolve this you need to add [0].json to the end as shown below
Then it will work like normal as there will be no top-level keys present, which will avoid the check and result in the item keys being wrapped in ‘json’