How to pass previous Node data with HTTP Request Response

Hi,

I have setup a Code Node and then HTTP request node. HTTP Node response coming as below

And My Code Output Is coming as below

Is there any way that I can pass my Code Node Output along with the HTTP Response. When I use Merge node, it output comes as 2 outputs, But I want a single output with the combination of HTTP and Code Outputs. Is there any way to do that?

Information on your n8n setup

  • **n8n version: 1.22.4
  • **Database (default: SQLite): SQLite
  • **n8n EXECUTIONS_PROCESS setting (default: own, main):own
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):Docker
  • **Operating system:Windows

@AmilaDeshan , it sounds like you did not set up Merge node correctly. Below is the improvisation of how it could be done just to guide you in the right direction. Also, I see no reason for placing HTTP Request node after code unless it uses some values from it. Though, it doesn’t really matter if only one item is produced by both nodes.

The main point is to use “Combine” mode with “Merge By Position” option. You probably used “Append” mode, and hence you got two items in the output.