How to use set node property or JSON in the JS code node

Describe the problem/error/question

How I can use the output of set node into the code node.


like propertyName into code node, means assign the value of propertyName to const Message.

Second:
I want to use the code and link result values into next node set node.

What is the error message (if any)?

Please share your 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 :wave:

You could fix that up with const Message = $('Set').item.json.propertyName; :+1:

Thanks @EmeraldHerald :slight_smile:
I facing some other issues to return this value.

Let me explain the use case.

I have added a switch condition based on the execution ID. Depending on the value of the execution ID, the code and link should be returned to the next node and set as value and value1.

If the Message is equal to 24011, then do this. Otherwise, do that. If neither condition is met, then the default case should be returned.

Could you please help me complete this workflow?

Thanks :pray:

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