fix(Google Sheets Node): Tweaks (#7357)

Github issue / Community forum post (link here to close automatically):
This commit is contained in:
Michael Kret
2023-10-17 18:41:30 +03:00
committed by GitHub
parent a2d2e3dda7
commit d8531a53b9
10 changed files with 414 additions and 304 deletions

View File

@@ -1,7 +1,12 @@
import type { IExecuteFunctions, IDataObject, INodeExecutionData } from 'n8n-workflow';
import type { SheetProperties, ValueInputOption } from '../../helpers/GoogleSheets.types';
import type { GoogleSheet } from '../../helpers/GoogleSheet';
import { autoMapInputData, mapFields, untilSheetSelected } from '../../helpers/GoogleSheets.utils';
import {
autoMapInputData,
cellFormatDefault,
mapFields,
untilSheetSelected,
} from '../../helpers/GoogleSheets.utils';
import { cellFormat, handlingExtraData } from './commonDescription';
export const description: SheetProperties = [
@@ -131,7 +136,7 @@ export const description: SheetProperties = [
show: {
resource: ['sheet'],
operation: ['append'],
'@version': [4],
'@version': [4, 4.1],
},
hide: {
...untilSheetSelected,
@@ -154,7 +159,7 @@ export const description: SheetProperties = [
},
},
options: [
...cellFormat,
cellFormat,
{
displayName: 'Data Location on Sheet',
name: 'locationDefine',
@@ -181,7 +186,11 @@ export const description: SheetProperties = [
},
],
},
...handlingExtraData,
handlingExtraData,
{
...handlingExtraData,
displayOptions: { show: { '/columns.mappingMode': ['autoMapInputData'] } },
},
],
},
];
@@ -227,7 +236,7 @@ export async function execute(
setData,
sheetName,
headerRow,
(options.cellFormat as ValueInputOption) || 'RAW',
(options.cellFormat as ValueInputOption) || cellFormatDefault(nodeVersion),
false,
);