diff --git a/packages/nodes-base/nodes/Google/Sheet/GoogleSheets.node.ts b/packages/nodes-base/nodes/Google/Sheet/GoogleSheets.node.ts index de374ff9bf..54837e1982 100644 --- a/packages/nodes-base/nodes/Google/Sheet/GoogleSheets.node.ts +++ b/packages/nodes-base/nodes/Google/Sheet/GoogleSheets.node.ts @@ -10,14 +10,15 @@ export class GoogleSheets extends VersionedNodeType { name: 'googleSheets', icon: 'file:googleSheets.svg', group: ['input', 'output'], - defaultVersion: 2, + defaultVersion: 3, subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}', description: 'Read, update and write data to Google Sheets', }; const nodeVersions: IVersionedNodeType['nodeVersions'] = { 1: new GoogleSheetsV1(baseDescription), - 2: new GoogleSheetsV2(baseDescription), + 2: new GoogleSheetsV1(baseDescription), + 3: new GoogleSheetsV2(baseDescription), }; super(nodeVersions, baseDescription); diff --git a/packages/nodes-base/nodes/Google/Sheet/v1/versionDescription.ts b/packages/nodes-base/nodes/Google/Sheet/v1/versionDescription.ts index f634d96f1a..573775cf9f 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v1/versionDescription.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v1/versionDescription.ts @@ -6,7 +6,7 @@ export const versionDescription: INodeTypeDescription = { name: 'googleSheets', icon: 'file:googleSheets.svg', group: ['input', 'output'], - version: 1, + version: [1, 2], subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}', description: 'Read, update and write data to Google Sheets', defaults: { @@ -51,6 +51,33 @@ export const versionDescription: INodeTypeDescription = { }, ], default: 'serviceAccount', + displayOptions: { + show: { + '@version': [1], + }, + }, + }, + { + displayName: 'Authentication', + name: 'authentication', + type: 'options', + options: [ + { + // eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased + name: 'OAuth2 (recommended)', + value: 'oAuth2', + }, + { + name: 'Service Account', + value: 'serviceAccount', + }, + ], + default: 'oAuth2', + displayOptions: { + show: { + '@version': [2], + }, + }, }, { displayName: 'Resource', diff --git a/packages/nodes-base/nodes/Google/Sheet/v2/actions/versionDescription.ts b/packages/nodes-base/nodes/Google/Sheet/v2/actions/versionDescription.ts index f2d4e5f8be..3dfaed137f 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v2/actions/versionDescription.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v2/actions/versionDescription.ts @@ -9,7 +9,7 @@ export const versionDescription: INodeTypeDescription = { name: 'googleSheets', icon: 'file:googleSheets.svg', group: ['input', 'output'], - version: 2, + version: 3, subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}', description: 'Read, update and write data to Google Sheets', defaults: {