Hello! Im doing some tests regarding the google sheet node and noticed that the node wont work if the expression output is dynamic. It just looks for the first thing that matches and dump all the data in there.
“financial” here is the output of $json.type coming from the code node
and it just dumps all the data in the first sheet it matches eventhough the output $json.type is dynamic as seen in the dump text in the sheet. The other sheets are empty.
Hi! First of all, you have to change your Google Sheets node options.
Start with “Mapping column mode” — change it to “Map each column below”, then click “Add field.”
You’ll see your column names from the sheet appear after clicking “Add field.” Then, choose your column name and enter your value. You can also drag your values from the previous node.
2- If you don’t use a “Split Out” node, your Google Sheets node will only append the first item to your sheet.
Add a “Split Out” node between your Code node and Google Sheets node so you can append multiple rows to your sheet.
Your main goal is to add rows according to the sheets name, right? Use “Switch” Node. Like an example in below. In this situation, you won’t have to make the sheet name dynamic.
Switch Node example: Financial > output 0 > Your sheets node sheet name: financial
I think it can be used, but I couldn’t fully understand why it didn’t work. Maybe it’s related to the Google Sheets API. It might be necessary to specify which sheet to write to before execution, rather than dynamically. Sorry that i couldn’t help.