A lot of Issues with I try to use $(node_XXX).item and it force me to use first() instead

Describe the problem/error/question

I am working on a workflow that has to iterate over a list of customers and for each customer there are a lot of steps that I have to do with diferents nodes and almost at the end I have to send an email to the specifc customer i am working on in the iteration, but when I try to use the $(loop over item).item.json… not work, and I have to change item for $(loop over item).first() but if I use first() all my email go to the same customer (because first always refers to the same customer). I have tried everything but nothing seems to solve this situation…

What is the error message (if any)?

NA

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
![Screen Shot 2024-08-29 at 12.12.36 PM|690x351](upload://dZoS5z2s7hT1LErNiIKgqOSbQNK.jpeg)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • 1.53.2
  • Database (default: SQLite):
  • default
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Docker compose on a VPS
  • Operating system:
  • ubuntu
1 Like

Would be great if you could share your workflow inside the pre-formatted text element here. It seems you tried it before, but it did not work.

Maybe this working example helps you. The expression in the Redis node.

In some cases it also helps to use a Set node and later pull data from that one.

Thanks…I am sorry but I do not know how to paste worklow like you did… How can I do that

You can mark all nodes of your workflow, copy them to your clipboard, then click the “</>” icon in the comment editor and replace the placeholder with the content of your clipboard.

I Had rid off a lot of nodes and js code because of limits of 32K bytes…

In the workflow I upload above I had to eliminate a lot of nodes becuase of there are a 32k limit size. but mi Issue is that that i need to use { $(‘Un_telefono_a_la_vez’).item.json.nombre_tel.result.nombre }} instead of { $(‘Un_telefono_a_la_vez’).first().json.nombre_tel.result.nombre }} in any Node after loop but I am realizing that in some point n8n loose how to link previous items… I guess…

Hi, I am guessing that when I use List
or JS Code node and thos return multiples items N8N losse previous items links… Between my loop Node and the node that I need to reference to the item that loop is iterating I have some nodes like List, or JsCode that return a lot of records and just after execute that nodes Inmediatly N8N loose the item reference from loop node and force me to use first(). I am testing it, this is a suposition and I making some change to be sure

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