Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Google Sheets Node): Accommodate special characters when updating row #13589

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dana-gill
Copy link
Contributor

@dana-gill dana-gill commented Feb 28, 2025

Summary

The parameterName doesn't get properly parsed without the additional
quotes when we call the values parameter

Workflow for testing. You do not have to use the same special characters -- just make sure some of the cells have special characters:

{
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "id": "c78a115a-5600-4f1e-8740-f3ca9d038d3a",
      "name": "When clicking ‘Test workflow’"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1oqFpPgEPTGDw7BPkp1SfPXq3Cb3Hyr1SROtf-Ec4zvA",
          "mode": "list",
          "cachedResultName": "lol",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1oqFpPgEPTGDw7BPkp1SfPXq3Cb3Hyr1SROtf-Ec4zvA/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Sheet1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1oqFpPgEPTGDw7BPkp1SfPXq3Cb3Hyr1SROtf-Ec4zvA/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "ha []": "kayyyy$",
            "macarena": "baile",
            "Real.1": "t&c",
            "21 \"": "Σ"
          },
          "matchingColumns": [
            "ha []"
          ],
          "schema": [
            {
              "id": "Real.1",
              "displayName": "Real.1",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "21 \"",
              "displayName": "21 \"",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "dfd",
              "displayName": "dfd",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "ha []",
              "displayName": "ha []",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "macarena",
              "displayName": "macarena",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        220,
        0
      ],
      "id": "342460fd-baef-4514-9d07-7716b4ed3aff",
      "name": "Google Sheets",
      "alwaysOutputData": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "5hJuQNmnEpxoehAN",
          "name": "Google Sheets account"
        }
      }
    }
  ],
  "connections": {
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "ee90fdf8d57662f949e6c691dc07fa0fd2f66e1eee28ed82ef06658223e67255"
  }
}

Related Linear tickets, Github issues, and Community forum posts

Resolves https://community.n8n.io/t/the-column-to-match-on-parameter-is-required-problem/82132
Resolves https://linear.app/n8n/issue/NODE-2482/community-issue-n8n-nodes-basegooglesheets-column-to-match-on-error
Resolves #13442

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

The parameterName doesn't get properly parsed without the additional
quotes when we call the values parameter
Copy link

codecov bot commented Feb 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@n8n-assistant n8n-assistant bot added n8n team Authored by the n8n team node/improvement New feature or request labels Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team node/improvement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

n8n-nodes-base.googleSheets: Column to Match On error even when match is provided
1 participant