Code node loop damages first object property

I’m setting up a workflow that takes in data from a CSV, uses that data to build a Markdown template, and sends the rendered Markdown in an email. Everything is fine until it gets to the code node responsible for building the Markdown. Bizarrely, the loop refuses to allow access to the first property of each item, even though that item shows up in console.log(item.json). Notice how in the first image, the body field in the output starts with undefined, even though the uid property shows up correctly in both the input and the console.

The only thing that looks suspicious to me is that, in the console view, the mangled property’s name appears in quotes when none of the others do. It doesn’t matter whether I try to access the property using the dot syntax or the array syntax. Either way, it comes up undefined.

Any thoughts?

Edit:

I’m using n8n version 1.67.1 on a Raspberry Pi running Manjaro. It’s running in Docker using SQLite (since it’s just a test instance for now).

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:

And the (partial) workflow in question:

Hi @page_f

Thanks for posting here and welcome to the community! :cake:

Were you able to consistently get this? I just tried to replicate what you’re getting but could not reproduce it :confused:

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