[undefined] on PostgreSql parameter for 2 previous nodes

Hi, any help please on setup a workflow to setup postgresql with variables as parameters.

I tried others workflows an noticed that cant pull data from 2 previous nodes or more, it shows as “undefined”.

Its like that only pull data from last previous node.

Preformatted text

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • **n8n version: 1.41.1
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: main):
  • Running n8n via (Docker):
  • **Operating system: Linux ubuntu

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

Hi @Daniel_Martin_Leon_S
:wave: welcome to the n8n community!

To preview correctly the value of that expression ($('Edit Fields')...) all the previous nodes in the workflow must be executed correctly. In fact, the data from previous nodes is passed through the workflow.

In your case, the first Postgres node should execute correctly and then the second one (Postgres 1) will be able to access the data correctly.

As you can see in this example:

the workflow runs correctly and from the last Postgres node I can access all the data from the previous nodes:

I attach here a similar demo workflow:

Let me know if this helps!

3 Likes

Thanks, am tried reading the writted csv one just in fron the other and it works, on my original workflow, for some reason the empresa_id the value is 1 a number but is taking as string on the if node it works when changed to number. Thanks for your time and efford to helping me.

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