fix(Google Sheets Node): Fix insertOrUpdate cell update with object

This commit is contained in:
Michael Kret 2023-03-27 17:56:36 +03:00 committed by GitHub
parent 18efaf397a
commit 0625e2e6bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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]],
});
}
}