mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
fix(Google Sheets Trigger Node): Do not return header row in rowAdded mode (#13119)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user