I am using the "Loop Over Items" node to split my items into batches of 30 to insert into a Google Sheet that is inside a document. The sheet it inserts to is with the item and the Google Sheets node uses an expression to set the sheet. The result displayed in the expression of the sheet ID when testing the workflow IS CORRECT, but the actual execution seems to be messing up because looking at the sheet itself it all went into the first item's sheet ID.
This is happening specifically for the "Append or Update Row" with the resource as "Sheet Within Document"
I was able to fix this issue by reducing the batch size to 1 and then adding an IF statement to check if the Loop's runIndex is divisible by 30 to go to a "Wait" node so I don't trigger any rate limits from Google.
To Reproduce
Insert a Loop Over Items node with a batch size of 30
My specific case, I had 14 items where half of them had one sheet id and other half had a different sheet id in the same document
Use a combination of a "Edit Set" node to map the columns and "Google Sheets" node with the resource as "Sheet Within Document" and operation is "Append or Update Row" where the document is selected from a list and the sheet is By ID that is set via expression where each item has a sheetId it is supposed to go into
If reproduced, all items will go wherever the first item's sheetId is set to
Expected behavior
Each item is supposed to go into it designated sheetId if batched by more than one.
Bug Description
I am using the "Loop Over Items" node to split my items into batches of 30 to insert into a Google Sheet that is inside a document. The sheet it inserts to is with the item and the Google Sheets node uses an expression to set the sheet. The result displayed in the expression of the sheet ID when testing the workflow IS CORRECT, but the actual execution seems to be messing up because looking at the sheet itself it all went into the first item's sheet ID.
This is happening specifically for the "Append or Update Row" with the resource as "Sheet Within Document"
I was able to fix this issue by reducing the batch size to 1 and then adding an IF statement to check if the Loop's runIndex is divisible by 30 to go to a "Wait" node so I don't trigger any rate limits from Google.
To Reproduce
Expected behavior
Each item is supposed to go into it designated sheetId if batched by more than one.
Operating System
Ubuntu Linux 22.02
n8n Version
1.52.2
Node.js Version
20.15.0
Database
SQLite (default)
Execution mode
main (default)