Why am I receiving a "TypeError: Cannot read properties of undefined" error in the "add single row" workflow for Google Sheets?

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

Hi
I keep getting this error which has only stared showing recently on part of the workflow in “add single row” to Google Sheets. I made no changes prior to this appearing.
TypeError
Cannot read properties of undefined (reading ‘label’)
DETAILS
at Object.run (file:///tmp/pdg/dist/code/cb…904f55ad84/code/google_sheets/actions/add-single-row/add-single-row.mjs:80:44)
at null.executeComponent (/var/task/launch_worker.js:288:53)
at MessagePort.messageHandler (/var/task/launch_worker.js:788:28) (modificato) (modificato)

It looks like you’re encountering a TypeError in your Google Sheets “Add Single Row” action. This error typically occurs when the code is trying to access a property of an undefined object. Specifically, the error message indicates that it cannot read the label property of an undefined object. Given that you mentioned no changes were made prior to this error appearing, it’s possible that the structure of the data being passed to the Google Sheets action has changed, or there might be an issue with the configuration of the action itself. Here are a few steps you can take to troubleshoot and resolve this issue: 1. Check the Data Being Passed: Ensure that the data being passed to the “Add Single Row” action is correctly structured and contains all the necessary fields. If the data structure has changed, you may need to update the action configuration accordingly. 2. Verify the Configuration: Double-check the configuration of the “Add Single Row” action in your workflow. Make sure that all required fields are properly filled out and that the references to previous steps are correct. 3. Test with Sample Data: Try running the action with sample data to see if the issue persists. This can help identify if the problem is with the data being passed or with the action configuration. 4. Review the Workflow Logs: Check the workflow logs for any additional error messages or details that might provide more context about the issue. Here is a step-by-step guide to reconfigure the “Add Single Row” action: ## How do I use the Add Single Row action? 1. Search for the Google Sheets app from the step menu. 2. Select the Add Single Row action. 3. Connect your Google Sheets account. 4. Select a Spreadsheet or pass a string from a previous step. 5. Select a Worksheet Id or pass a string from a previous step. 6. Select a Does the first row of the sheet have headers? or pass a boolean from a previous step. 7. At the bottom of the step, click Test to run the action and test the configuration. If the issue persists after following these steps, you may want to reach out to Pipedream support for further assistance. You can visit Support - Pipedream for more support options. If you have any specific questions about the data being passed or the configuration of the action, please provide more details, and I’ll be happy to help further.

I fixed it by deploying an earlier workflow

I fixed the issue by running a previous workflow that was effectively and apparently identical