Switch node not passing through all values

Hi,

I am trying to set up a workflow which populates fields from three sources and does a merge. If have mocked up this in the code below
After the merge depending on how the Mode field from one of the sources is populated (it can be “Live”, “Periodic” or “Daily”) , I use a switch node to pass the data to 1 of 3 distinct http nodes.

My problem is that when I get to the switch node it is only passing 1 parameter through (the one used to determine which node to use).

I know I am doing something really silly here but cant quite figure it out.

Thanks in advance for the help.

workflow

Here is a screenshot showing how the output is only feeding through the field query:

Information on my n8n setup

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

Hey @gavraq,

Each set node creates one item with a single key, so you end up with three items, each having just one key:
image

I think what you want to achieve is one item with all three keys. Check if this solution works for your case:

You could actually put this in one set node (but this depends on the case—might be coming from different sources). Remember to set Input Fields to Include if needed

If you face more issues, I’ll be happy to help :3
Simon

1 Like

Hey @Shirobachi thank you so much, I realised now that it all needs to be in a single linear flow so I did that and removed the merge and it works perfectly. Thanks for the help!

1 Like

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