From 26ad091f473bca4e5d3bdc257e0818be02e52db5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Uhrbach?= Date: Tue, 15 Oct 2024 06:54:23 +0200 Subject: [PATCH] perf(Google Sheets Node): Don't load whole spreadsheet dataset to determine columns when appending data (#11235) --- .../nodes/Google/Sheet/v2/actions/sheet/append.operation.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/append.operation.ts b/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/append.operation.ts index 907a70b0fc..70d6c29efa 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/append.operation.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/append.operation.ts @@ -226,7 +226,9 @@ export async function execute( keyRowIndex = locationDefine.headerRow as number; } - const sheetData = await sheet.getData(range, 'FORMATTED_VALUE'); + const [sheetNameForKeyRow] = range.split('!'); + const sheetNameWithRangeForKeyRow = `${sheetNameForKeyRow}!1:${keyRowIndex}`; + const sheetData = await sheet.getData(sheetNameWithRangeForKeyRow, 'FORMATTED_VALUE'); if (sheetData === undefined || !sheetData.length) { dataMode = 'autoMapInputData';