I am in community edition and selfhosted. Not able to share, its asking me to upgrade. But its a simple workflow. Pasted below
Request1 and Request2 are sending some request and getting some response.
For simplicitly i made the switch with two routes and the condition is empty, so it satisfies both . But see the data below from first and second route in the noop node.
Found a workaround to add a Edit Fields (Set), then combined all the objects i wanted into fields and the switch was able to pass the first object to both the nodes. But looks like there is a bug?
can you share the rules you are using in the switch node? What you copied is empty which could be why you are triggering noth outputs.
Looking at your workflow as each node runs once for each input I would expect the switch node to only run for the second http request node, If you want to run it for both you would need to tweak your workflow design.
I purpose fully made it empty in this scenario, just to make sure both route nodes are getting all the data. Even if i place some condition, why would it empty the output of other nodes ? Is there any way to carry over them ?
As i mentioned earlier, only the first block gets carried over and not all.
May be in didn’t put my problem more detail. The problem i see with switch node or i am not sure if switch node is suppose to be working that way. I was expecting output of all the previous nodes to be passed to both the no op node. But only the first route node always receives the output from every previous nodes. In my case. I could see the output from Request1 and Request2. But for the second route node. The output of both Request1 and Request2 are empty.
I was expecting something like a router , which copies all output to all nodes if conditions satisfies both.
As i mentioned i have used as a workaround to add a edit node (set) just before the switch and merged all the data what i needed into mappings and that is passed onto both the nodes.
I think there is a bit of confusion here. The data does get through for both routes. What you show as no data is the “schema” (not data as such). That is indeed there seems to be an issue with how the schema is being presented. This, however, should not stop the workflow in further data processing. If it does happen in your case, then as @Jon pointed out we would like to see the actual references you use that would demonstrate no data as opposed to UI output for schema.
To make is clearer, here’s what UI shows for both “Schema” and “JSON” on the very same node
Hmmm, new to n8n and trying to understand these difference.
I was using the Spec to drag the condition and was working until i used the switch, where the spec is not carried over to all the nodes. Only the data. And also for the data, its only the output of the previous node, but not the combination of all the data from previous nodes. AMZN data in request2 is the input data being received. But the request2 node makes APPL HTTP request and gets output related to APPL. But then, it outputs only APPL and AMZN is now not part of the serialized node. So when i place a SWITCH to route traffic to both direction. Both nodes receives APPL data only but the spec is populated with data for first route node but not the second one.
Is there any way to keep joining the outputs of previous nodes and keep passing on ? Or i need to have Set data between each node and parse and keep the mapping to the output data ? Seems like little innefficient from user perspective.
This is what i was saying. The output just have APPL and not the AMZN merged .
It is by design. The output of the node always shows only the output produced by this node. This does not mean, however, the data from the previous nodes is not available to the following nodes.
If you check the input of the next node in “JSON” view, you will see the data for all the previous nodes that have run already. There seem to be a bug indeed that “Schema” view showed the misleading message “No fields - item(s) exist, but they’re empty”.
Again the data still should be available and it is a matter of referencing it correctly.
There are a few approaches you can take.
As you discovered, you could use Set node and bring all the data you need from the previous nodes into the output of this single node
You can reference any previous node when you need it utilizing the expression described in Output of other nodes
You might get what you need utilizing Merge node connecting the outputs of the previous nodes
One more important topic related to this discussion is Item linking concepts | n8n Docs. This is the bases of how nodes’ outputs get accessible from the following nodes.
n8n is quite flexible and usually gives you many options you can choose from depending on the task at hand.
Thanks a lot @ihortom . Finally i was able to get it to work without the need for set node. I was always looking for UI options and i never thought about referencing in the code directly. It worked perfectly.
Here is the alternate node, where i was not seeing the data. But was able to refer the node and get the data