Describe the problem/error/question
I want to get the value of id into the code node, const errMessage.
and then further use it.
CAn you please help.
What is the error message (if any)?
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.)
Share the output returned by the last node
Information on your n8n setup
- n8n version:
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app):
- Operating system:
Hi @Gouravdev, I can’t see a field
errorMessage on your
setValues node, so you’d need to update the expression to reference an existing field.
Also, you’d need to make sure to return a valid JSON object (when using the code node in “Run Once for Each Item” mode) instead of a single string value, like so for example:
n8n would then return a result as expected:
Hope this helps!