From 1797cdab5b9e7f23c9f62ce7c6c34c1c2c26b07e Mon Sep 17 00:00:00 2001 From: Michael Kret <88898367+michael-radency@users.noreply.github.com> Date: Mon, 27 Mar 2023 17:56:36 +0300 Subject: [PATCH] fix(Google Sheets Node): Fix insertOrUpdate cell update with object --- .../nodes/Google/Sheet/v2/helpers/GoogleSheet.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/nodes-base/nodes/Google/Sheet/v2/helpers/GoogleSheet.ts b/packages/nodes-base/nodes/Google/Sheet/v2/helpers/GoogleSheet.ts index c40aa13ffe6b4..dfc1d4fe58df8 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v2/helpers/GoogleSheet.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v2/helpers/GoogleSheet.ts @@ -536,9 +536,15 @@ export class GoogleSheet { columnNames.indexOf(name), ); + let updateValue = item[name] as string; + if (typeof updateValue === 'object') { + try { + updateValue = JSON.stringify(updateValue); + } catch (error) {} + } updateData.push({ range: `${decodedRange.name}!${columnToUpdate}${updateRowIndex}`, - values: [[item[name] as string]], + values: [[updateValue]], }); } }