Hey there people! I am having some questions on using output of a node after a set of nodes and also on sending data from webhook to two different nodes at the same time in a single workflow.
Regarding using data from previous nodes
Pls refer to the workflow below. Here, the workflow is running till the second IF node. After that, I cannot get the previous nodes’ data to use in creating a new table and adding rows in Postgres.
The basic thing is, I receive a string (Session ID) from the webhook. I am using that to create a table in Postgres and insert values later.
Inputs from the webhook node look like this
The binary files:
The text data (including the Session ID):
I’m using this information to run the workflow until the OpenAI node without issues. After that, I am not able to refer the values from the previous nodes to use them further. The error is -
(This is taken from the Postgres node.)
How to go about this? I tried using a merge node and could not get which node to attach in the 1st input and use the data properly. Also, will the workflow take a different branch directly to the Merge node/different node?
My workflow
Regarding sending output data to multiple nodes
I tried creating the node in the below structure to overcome the issue above. Still couldn’t get it to work. So, I used a different workflow to call a new webhook which creates the tables separately. That worked for creation. But, later on I need that Session ID to use in inserting rows in Postgres.
So, how will this work?
In this, will the webhook send data to both the branches and both gets executed at the same time, everytime the webhook is called?
Also, if this is possible, can I implement something like this?
How does branching work if we do not have a node like IF or Switch?
I would appreciate any help in this regard.
Information on your n8n setup
- n8n version: 0.230.3
- Database: Postgres
- n8n EXECUTIONS_PROCESS setting: own
- Running n8n via: Docker
- Operating system: Ubuntu Server 22.04 LTS