Pagination/Sub-workflow bug `Unknown top-level item key:'

Hey guys,

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:

Screenshot 2025-02-06 at 1.07.48 pm

ThIs is the code that used to work and now throws that error.

Screenshot 2025-02-06 at 1.08.17 pm

This is a screenshot of the workflow

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.

Thanks

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Update:

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:

Screenshot 2025-02-06 at 4.23.24 pm

which results in this function being triggered

Screenshot 2025-02-06 at 4.24.10 pm

below is an example of the data structure returned by the sub workflow

Screenshot 2025-02-06 at 3.51.56 pm

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’

Screenshot 2025-02-06 at 4.30.21 pm

If you need more clarification, feel free to ask!

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