I know that there is a method this.getInputData() to get input data from previous node, but how can I get data from 2 or more previouse node? for example the workflow below
I have a custom node called RG Info, this node want to consume the same data from Big Query, splitted by Split In Batches node. I’m not sure the MySQL and Slack node will return the data that I want, so, how RG Info get the output data from Big Query using given scenario?
In the expression builder at the bottom there is a Nodes option, You can use this to get the results from previous nodes so it would be something like {{$node["Google BigQuery"].parameter["your_field"]}}
To get the output from the SplitInBatches node, you can use the expression {{$node['SplitInBatches'].json['THE COLUMN NAME']}}.
However, you need to use the SplitInBatches node here. n8n will process all the incoming values. You can read more about it here: Looping in n8n | Docs
The expression that @Jon shared will return the values of the parameters that you configure in the Google BigQuery node.
Expression info invalid
An expression here won't work because it uses .item and n8n can't figure out the matching item. This is because the node 'If' returned incorrect matching information (for item 0 of run 0).
Try using .first(), .last() or .all()[index] instead of .item.
becuase there is a filter between the node i want to access and the current node. How to access what I need?