This topic was automatically generated from Slack. You can find the original thread here.
Hey team, we are having issues with Google Sheets - Update Row action. I am getting undefined is not an array or an array-like error. Below is the payload and error objects:
Payload:
const payload = {
externalUserId: "1",
id: "google_sheets-update-row",
configuredProps: {
sheetId: "1Ip7aBaRpDzXxfcixuC_S9OzbkQNWSL4Fc5rQSC_e4R0",
worksheetId: 0,
hasHeaders: true,
row: 2,
col_0000: "Ferhat2",
col_0001: "Test",
allColumns: '[["Name", "Subject"]]',
googleSheets: { authProvisionId: "..." }
},
stashId: undefined
};
Error obj:
const response = [
{
ts: 1759330234675,
k: "error",
err: {
name: "Error",
message: "undefined is not an array or an array-like",
stack:
"Error: undefined is not an array or an array-like\n" +
" at Object.sanitizedArray (file:///tmp/__pdg__/dist/code/68dce02580f83861eb0a86c11237015a86c8505a3000d4a8dc474ab580cd6657/code/google_sheets.app.mjs:178:13)\n" +
" at Object.run (file:///tmp/__pdg__/dist/code/68dce02580f83861eb0a86c11237015a86c8505a3000d4a8dc474ab580cd6657/code/actions/update-row/update-row.mjs:169:33)\n" +
" at file:///var/task/component_maker.mjs:170:42\n" +
" at async captureObservations (/var/task/node_modules/@lambda-v2/component-runtime/src/captureObservations.js:28:5)\n" +
" at async run (file:///var/task/component_maker.mjs:157:20)\n" +
" at async file:///var/task/component_maker.mjs:199:11"
}
}
This action doesnt work on demo app, but it works on pipedream platform. Below is the props taken from execution trace on pipedream.com, for the same action:
{
"googleSheets": {
"authProvisionId": "apn_b6h8Dbl",
"$auth": {
"oauth_client_id": "**********",
"oauth_access_token": "**********",
"oauth_refresh_token": "**********",
"oauth_uid": "**********"
}
},
"sheetId": {
"__lv": {
"label": "Projects",
"value": "1tUQ1qd2ade-s4radfo_KN6iuaajwvCjbgrT9DM5IrOc"
}
},
"worksheetId": {
"__lv": {
"label": "Sheet1",
"value": 0
}
},
"hasHeaders": true,
"row": 3,
"col_0000": "Restaurant",
"col_0001": "Pending2",
"allColumns": "[[\"Project name\",\"Status\"]]"
}
I’ve tried couple of things:
• Wrapped the sheetId and worksheetId with lv/__lv objects like the demo app does
• Passed hasHeader true/false
• Passed allColumns as array
No luck so far. We have 2 demos today with clients and I would love to fix it as Google Sheets is very popular. Please let me know if you need anything else