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

monday.com Backslash in Field Values Not Escaped Correctly During Item Creation or Update #11913

Open
vincekruger opened this issue Nov 27, 2024 · 1 comment
Labels
in linear Issue or PR has been created in Linear for internal review

Comments

@vincekruger
Copy link

vincekruger commented Nov 27, 2024

Bug Description

When creating or updating an item where a field value contains a backslash (), the backslash is not being escaped correctly. The expected behaviour is that backslashes are stored as double backslashes (\) to ensure proper handling and functionality.

This issue causes unexpected behaviour in the application, as the fields with unescaped backslashes do not function as intended. Testing the same scenario directly with the API confirms that the correct escaping (double backslashes) resolves the issue.

mutation {
  create_item (board_id: 1234567, group_id: "topics", item_name: "Testing", column_values: "{\"text0__1\": \"Testing with -> Backslash issues \ <- fails.  \\n Other characters .&^%$#  \"}") {
    id
  }
}

Workflow Example

{
  "name": "Testing Monday.com",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "id": "3cddf73d-6a42-482e-a384-821e9d2c4f72",
      "name": "When clicking ‘Test workflow’"
    },
    {
      "parameters": {
        "resource": "boardItem",
        "boardId": "{redacted}",
        "groupId": "topics",
        "name": "test",
        "additionalFields": {
          "columnValues": "={\n  \"text__1\": \"{{ $json.content }}\"\n}"
        }
      },
      "type": "n8n-nodes-base.mondayCom",
      "typeVersion": 1,
      "position": [
        440,
        0
      ],
      "id": "4cc4870a-3ef4-4a95-bc63-935fb534b432",
      "name": "Monday.com",
      "credentials": {
        "mondayComApi": {
          "id": "{redacted}",
          "name": "Monday.com"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "73ae47c5-4472-4134-b0ce-5928319318cb",
              "name": "content",
              "value": "Testing with -> Backslash issues \\ <- fails. \\\\n Other characters .&^%$#",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        220,
        0
      ],
      "id": "ebbc58cb-9b8b-4f01-bc26-aca7427618fb",
      "name": "Edit Fields"
    }
  ],
  "pinData": {},
  "connections": {
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Monday.com",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "0fe9a72b-45c1-453a-a768-3accf78aff57",
  "meta": {
    "instanceId": "{redacted}"
  },
  "id": "{redacted}",
  "tags": []
}

To Reproduce

  1. Create or update an item with a text field with a backslash.
  2. Verify the stored value for the field.
  3. Observe that the backslash is not escaped (single \ instead of \).

Expected behavior

Fields containing backslashes should automatically escape them as double backslashes (\) during creation or update.

Operating System

Ubuntu Server 20.04 LTS

n8n Version

1.68.1

Node.js Version

docker image

Database

SQLite (default)

Execution mode

main (default)

@Joffcom
Copy link
Member

Joffcom commented Nov 27, 2024

Hey @vincekruger,

We have created an internal ticket to look into this which we will be tracking as "GHC-507"

@Joffcom Joffcom added the in linear Issue or PR has been created in Linear for internal review label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in linear Issue or PR has been created in Linear for internal review
Projects
None yet
Development

No branches or pull requests

2 participants