Describe the problem/error/question
I’m struggling with understanding why and how the output of a node that runs multiple times is repeated instead of concatenates/merged.
In this simple workflow, a Google Spreadsheets node is used on one spreadsheet document to get the rows of its two sheets by their name. The node gets these two sheets’ names from the previous code node which inputs the array of two items into the Spreadsheet node.
The Spreadsheet node seems to run two times (supposedly for each of the sheetName items, where can i confirm this?). But its final output just repeats the rows from only the first sheets two times, instead of containing the rows of both sheets.
If there would be just one set of three rows with the data from one sheets in the final output, then i’d guess the node runs only once, or, after multiple runs, only the first or last result might be used. But the data from only the first sheet is repeated n times (n is the number of items the spreadsheet node gets a s input – and btw, if i add a third sheet, the data from the first sheet gets repeated three times).
What’s going on and what concept am i not getting here?
Is the sheet node really running once for each input item?
Please share your workflow
Data in the Google Spreadsheet:
Sheet “ONE”:
ID |
---|
ONE A1 |
ONE A2 |
ONE A3 |
Sheet “TWO”:
ID |
---|
TWO A1 |
TWO A2 |
Original: n8n-test-sheets - Google Sheets
Share the output returned by the last node
Expected output:
[
{
"row_number": 2,
"ID": "ONE A1"
},
{
"row_number": 3,
"ID": "ONE A2"
},
{
"row_number": 4,
"ID": "ONE A3"
},
{
"row_number": 2,
"ID": "TWO A1"
},
{
"row_number": 3,
"ID": "TWO A2"
}
]
Actual output:
[
{
"row_number": 2,
"ID": "ONE A1"
},
{
"row_number": 3,
"ID": "ONE A2"
},
{
"row_number": 4,
"ID": "ONE A3"
},
{
"row_number": 2,
"ID": "ONE A1"
},
{
"row_number": 3,
"ID": "ONE A2"
},
{
"row_number": 4,
"ID": "ONE A3"
}
]
Information on your n8n setup
- n8n version: 1.74.3
- Database (default: SQLite): n8n cloud
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
- Operating system: n8n cloud