1
1
mirror of https://github.com/n8n-io/n8n.git synced 2024-09-11 13:15:28 +03:00

fix(Google Sheets Node): Update name and hint for useAppend option (#10443)

This commit is contained in:
Michael Kret 2024-08-15 19:01:35 +03:00 committed by GitHub
parent 4dee7cc36e
commit c5a0c049ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 20 additions and 19 deletions

View File

@ -14,7 +14,7 @@ import {
mapFields,
untilSheetSelected,
} from '../../helpers/GoogleSheets.utils';
import { cellFormat, handlingExtraData } from './commonDescription';
import { cellFormat, handlingExtraData, useAppendOption } from './commonDescription';
export const description: SheetProperties = [
{
@ -198,14 +198,7 @@ export const description: SheetProperties = [
...handlingExtraData,
displayOptions: { show: { '/columns.mappingMode': ['autoMapInputData'] } },
},
{
displayName: 'Use Append',
name: 'useAppend',
type: 'boolean',
default: false,
description:
'Whether to use append instead of update(default), this is more efficient but in some cases data might be misaligned',
},
useAppendOption,
],
},
];

View File

@ -18,7 +18,12 @@ import {
checkForSchemaChanges,
untilSheetSelected,
} from '../../helpers/GoogleSheets.utils';
import { cellFormat, handlingExtraData, locationDefine } from './commonDescription';
import {
cellFormat,
handlingExtraData,
locationDefine,
useAppendOption,
} from './commonDescription';
export const description: SheetProperties = [
{
@ -212,14 +217,7 @@ export const description: SheetProperties = [
...handlingExtraData,
displayOptions: { show: { '/columns.mappingMode': ['autoMapInputData'] } },
},
{
displayName: 'Use Append',
name: 'useAppend',
type: 'boolean',
default: false,
description:
'Whether to use append instead of update(default), this is more efficient but in some cases data might be misaligned',
},
useAppendOption,
],
},
];

View File

@ -258,3 +258,13 @@ export const handlingExtraData: INodeProperties = {
default: 'insertInNewColumn',
description: "What do to with fields that don't match any columns in the Google Sheet",
};
export const useAppendOption: INodeProperties = {
displayName: 'Minimise API Calls',
name: 'useAppend',
type: 'boolean',
default: false,
hint: 'Use if your sheet has no gaps between rows or columns',
description:
'Whether to use append instead of update(default), this is more efficient but in some cases data might be misaligned',
};

View File

@ -20,7 +20,7 @@ export const versionDescription: INodeTypeDescription = {
hints: [
{
message:
"Use the 'Use Append' option for greater efficiency if your sheet is uniformly formatted without gaps between columns or rows",
"Use the 'Minimise API Calls' option for greater efficiency if your sheet is uniformly formatted without gaps between columns or rows",
displayCondition:
'={{$parameter["operation"] === "append" && !$parameter["options"]["useAppend"]}}',
whenToDisplay: 'beforeExecution',