The problem is that you have to at least return an object. So something like { key: 'value' }
Anyway, in this case no Code-Node is required. You can simply access it directly on the HTTP Request node. So what you have written at the total end should work. It is already a string, and even if it would not be one, it would get converted to one automatically.
What you can do to debug this issue is to open the browser console and execute the HTTP Request node. You will then see the exact call that got made in it.
Hi @yukyo, this looks like a problem with the URL you are sending data to. Could you double-check this field and if youâre still having trouble perhaps share your workflow (you can simply select the relevant nodes on your canvas, then press Ctrl+C to copy them, then paste them here on the forum)?
i have a loop, the issue is that after the loop we have another http request losing the data from previos node
to access previos nodes we use the node name but at the time the code runs, the data of previos node has change and allays brings the data from last run
with data from nodes after the las http request we did this:
Hi @Msaustral, I donât think I fully understand which problem exactly youâre having . Can you share a workflow using which the problem can be reproduced?
First is important to understand that you do not simply have two items, you have two different runs with one item each. If you would have one run (so each node executes just once) with two items, what you build would work. But because the nodes execute twice and $node returns always the data of the last run, do you experience this issue.
So now to the solution:
You can simplify it generally by using a Set-Node instead of a Function/Code-Node. On it activate the option âKeep Only Setâ. That changes everything already from multiple lines of JavaScript code to two simple expressions
Instead of using the old $node["node_name"] syntax, use to the new $("node_name") one instead
The expression for the first parameter âid_centryâ would then look like this: