Why is the 'google_sheets-add-single-row' action resulting in an "undefined is not an array or an array-like" error?

This topic was automatically generated from Slack. You can find the original thread here.

Is the google_sheets-add-single-row action broken?

Here’s my very straight forward code that should work:

const vals = {
            externalUserId: "128",
            actionId: 'google_sheets-add-single-row',
            configuredProps: {
              googleSheets: { authProvisionId: 'apn_P8hpnQo' },
              sheetId: '1R_LcJ_eK6U6YgOThl2WP6MayievVZgBG_npdmWg0ZTc',
              worksheetId: 0,
              hasHeaders: false,
              myColumnData: ["hello"]
            }
          }
        const resp = await pd.runAction(vals)
        console.log("resp is ", resp)

Leads to error:

{"os":[{"ts":1746494179461,"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/e4207de98c73060cf90653524592081661abecd9e78d47c101ab55bdc7e8c265/code/google_sheets.app.mjs:177:13)\n    at Object.run (file:///tmp/__pdg__/dist/code/e4207de98c73060cf90653524592081661abecd9e78d47c101ab55bdc7e8c265/code/actions/add-single-row/add-single-row.mjs:152:33)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async file:///var/task/component_maker.mjs:151:11\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:141:20)\n    at async MessagePort.anonymous (file:///var/task/component_maker.mjs:177:9)"}}]}

https://pipedream.com/docs/connect/components/#passing-dynamic-props-id

Thanks that helped me solve it. Now I have another issue where even though i’ve setup my application logo, when the connect frontend iframe pops up it uses the Pipedream logo instead of my app

This works properly in development but not in production

I’ve seen this be related to caching — can you try in an incognito window or clearing your browser cache etc?

yup it was due to caching. I have another question though, is it possible to use my app client id for certain apps? If not it’d be a great feature. Basically, I would be able to give pipedream my oauth client details so that it would create the user accounts on my oauth client instead of pipedreams. When I try to authenticate an app that I haven’t configured with my oauth, it fallsback to pipedream

Everything would work just as it did through connect. The accounts would just be approved through my oauth client instead of pipedreams for the ones I have configured.

Definitely: GitHub

Wow. Beautiful. You guys have something really special here.

When using our own oauth, does pipedream still show the “X uses Pipedream to connect” modal?

Yes, that screen is always there, but your brand and app will show on the authorization popup from the app provider

Got it

I assume I could just link to the normal oauth with the provided pipedream redirect and pipedream would still get the appropriate data

Not sure I follow that question — can you clarify?

Imagine I setup a google calendar integration oauth on pipedream, and use the default non-pipedream oauth url to authenticate with google calendar. So on the onboarding side, the user goes directly to the google calendar oauth page and approves the app. Lets assume I also use the provided pipedream oauth redirect url for the google calendar integration so after the user finishes authentication, they get redirected to the pipedream redirect url for my calendar client.

I would assume pipedream would be able to get the needed credentials

Sorry, I’m not following that at all

and use the default non-pipedream oauth url to authenticate with google calendar
What OAuth URL are you talking about here?

The oauth page pops up after you click “Continue” on the pipedream connect modal. That view is the default app’s oauth view/page but it’s setup to use the pipdream account credentials. If we used our own credentials, we could open that page directly (for oauth clients) without going through the pipedream connect modal

If you skip going through Connect, then Pipedream won’t have those user’s credentials