Optional node execution

Describe the problem/error/question

From version 1.0, what is the correct way to access an optional node, which may or may not be executed?

What is the error message (if any)?

[ERROR: no data, execute “Set1” node first]

Please share your workflow [Updated]

Information on your n8n setup

  • n8n version: 1.0.1
  • Database (default: SQLite): PostgreSQL
  • n8n EXECUTIONS_PROCESS setting (default: own, main): main
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Linux

First, you have to make sure that the node is connected. Because with v1, nodes will only execute if they receive data.
Regarding accessing the data. You would then probably write:

{{ $json.value2 || $json.value1 }}
1 Like

Thanks for the quick response. The example I created was not very clear, correct me if I’m wrong, to access via $json it is necessary that both nodes are paired, however the problem I am having after updating to v1 and accessing data from more than a step back that haven’t been executed, so I need to access them via $node['NotPairedNode'] / $('NotPairedNode').

Ah yes, in that case, it is really more complicated. Right now do not think there is a way of doing that anymore. We will think about it and see if there is a good way to make that possible.

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