n8n/packages/nodes-base/nodes/Google/Sheet/GoogleSheets.node.ts
Michael Kret d5488725a8
fix(Google Sheets Node): Read operation execute for each item (#7800)
Github issue / Community forum post (link here to close automatically):
2023-11-28 11:02:11 +02:00

31 lines
1 KiB
TypeScript

import type { INodeTypeBaseDescription, IVersionedNodeType } from 'n8n-workflow';
import { VersionedNodeType } from 'n8n-workflow';
import { GoogleSheetsV1 } from './v1/GoogleSheetsV1.node';
import { GoogleSheetsV2 } from './v2/GoogleSheetsV2.node';
export class GoogleSheets extends VersionedNodeType {
constructor() {
const baseDescription: INodeTypeBaseDescription = {
displayName: 'Google Sheets',
name: 'googleSheets',
icon: 'file:googleSheets.svg',
group: ['input', 'output'],
defaultVersion: 4.2,
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
description: 'Read, update and write data to Google Sheets',
};
const nodeVersions: IVersionedNodeType['nodeVersions'] = {
1: new GoogleSheetsV1(baseDescription),
2: new GoogleSheetsV1(baseDescription),
3: new GoogleSheetsV2(baseDescription),
4: new GoogleSheetsV2(baseDescription),
4.1: new GoogleSheetsV2(baseDescription),
4.2: new GoogleSheetsV2(baseDescription),
};
super(nodeVersions, baseDescription);
}
}