Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
46 lines
1.6 KiB
TypeScript
46 lines
1.6 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.7,
|
|
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
description: 'Read, update and write data to Google Sheets',
|
|
builderHint: {
|
|
message:
|
|
'For workflow data storage, DataTable with upsert avoids duplicates. Use Google Sheets when spreadsheet collaboration is specifically needed.',
|
|
relatedNodes: [
|
|
{
|
|
nodeType: 'n8n-nodes-base.dataTable',
|
|
relationHint: 'Prefer for workflow data storage with upsert',
|
|
},
|
|
],
|
|
},
|
|
};
|
|
|
|
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),
|
|
4.3: new GoogleSheetsV2(baseDescription),
|
|
4.4: new GoogleSheetsV2(baseDescription),
|
|
4.5: new GoogleSheetsV2(baseDescription),
|
|
4.6: new GoogleSheetsV2(baseDescription),
|
|
4.7: new GoogleSheetsV2(baseDescription),
|
|
};
|
|
|
|
super(nodeVersions, baseDescription);
|
|
}
|
|
}
|