ERROR: Unknown top-level item key: pairedItems [item 0]

On the workflow after a IF I need to replace the . for , on a field that i receive on webhook.

I have similar nodes on the workflow and works.
This one is an array, but was working on other workflow, the same code.

What is the error message (if any)?

ERROR: Unknown top-level item key: pairedItems [item 0]

Access the properties of an item under .json, e.g. item.json

Please share your workflow

Workflow
Webhook test

Share the output returned by the last node

I need to replace the . for ,

Information on your n8n setup

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

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:

Hey @rafaelxc,

This is something I picked up in on your other thread for for this workflow. While looking into this I found a bug that I have put in a fix for with the Google Sheets node that should resolve this but I am just waiting for the review process so we can get it merged and available in a future release.

Thanks @Jon
Let me see If i understood.
The syntax I’m using now is correct and there is a bug that needs to be fixed?
or the new syntax you sent me on another topic is the correct one?

Is there any workaround that can be made while fix is in development?

This was working on another workflow i have.

Hey @rafaelxc,

Looking at the code in the node you are trying to mix old code with new which can get a bit confusing, The fix I put in though will solve the unknown top-level item key: pairedItems issue. At the moment I don’t have a creating workaround for this as the data is being set by the Google Sheets node incorrectly.

Try changing the code node to something like

var replaceob = $("Webhook").first().json["body"]["items"]["1"]["item_value"].toString();
for (item of $input.all()) {
  delete item.pairedItems
  item.json.replaceob = replaceob.replace(/\./g, ',');
}


console.log('Done!');
return $input.all();

This will then delete the invalid pairedItems item

Perfect @Jon

Working now! Thanks

1 Like

New version [email protected] got released which includes the GitHub PR 7862.

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