fix(Google Sheets Trigger Node): Do not return header row in rowAdded mode (#13119)

This commit is contained in:
Elias Meire
2025-02-07 12:57:18 +01:00
committed by GitHub
parent ac8c5527ca
commit cd8b300d5c
2 changed files with 61 additions and 0 deletions

View File

@@ -120,6 +120,9 @@ export class GoogleSheetsTrigger implements INodeType {
default: { mode: 'list', value: '' },
// default: '', //empty string set to progresivly reveal fields
required: true,
typeOptions: {
loadOptionsDependsOn: ['documentId.value'],
},
modes: [
{
displayName: 'From List',
@@ -530,6 +533,11 @@ export class GoogleSheetsTrigger implements INodeType {
(options.dateTimeRenderOption as string) || 'FORMATTED_STRING',
);
if (Array.isArray(sheetData) && sheetData.length !== 0) {
const zeroBasedKeyRow = keyRow - 1;
sheetData.splice(zeroBasedKeyRow, 1); // Remove key row
}
if (this.getMode() === 'manual') {
if (Array.isArray(sheetData)) {
const returnData = arrayOfArraysToJson(sheetData, columns);