Error with Text Classifier Node

Text Classifier Node is giving an error " Problem in node ‘Text Classifier‘

Could not get parameter". The AI assistant says it’s a bug. See attached photos

Information on your n8n setup

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @AI_Workshop,
Could you share the error details as well or alternatively share your workflow.

I am having the same issue and when I force to continue with the error, it only gets out from my first category even when it is wrong

  • **n8n version: 1.56.2
  • **Database (default: SQLite):I don´t know this answer
  • **n8n EXECUTIONS_PROCESS setting (default: own, main):own
  • **Running n8n via (Docker, npm, n8n cloud, desktop app) npm locally
  • Operating system: windows 10
type or paste code here
```{
  "name": "My workflow 8",
  "nodes": [
    {
      "parameters": {
        "options": {}
      },
      "id": "e46890f1-a076-4fa2-ba59-5cab2ce7b870",
      "name": "Groq Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGroq",
      "typeVersion": 1,
      "position": [
        1440,
        260
      ],
      "credentials": {
        "groqApi": {
          "id": "693S89XnlTfEevbc",
          "name": "Groq account"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "49225554-557e-4194-bcfd-a157bc57c6b4",
      "name": "Groq Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatGroq",
      "typeVersion": 1,
      "position": [
        800,
        100
      ],
      "credentials": {
        "groqApi": {
          "id": "693S89XnlTfEevbc",
          "name": "Groq account"
        }
      }
    },
    {
      "parameters": {},
      "id": "afab62cb-c64f-4e5f-8871-8a088babfee4",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        360,
        460
      ]
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "8318d5af-313a-4bf5-b618-1fc58f290838",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.1,
      "position": [
        -340,
        140
      ],
      "webhookId": "43b9f0ec-6647-496d-8272-e5fc44b36fca"
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "adfa5145-8cf2-4ee6-9208-d814446f799f",
      "name": "Groq Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGroq",
      "typeVersion": 1,
      "position": [
        -40,
        360
      ],
      "credentials": {
        "groqApi": {
          "id": "693S89XnlTfEevbc",
          "name": "Groq account"
        }
      }
    },
    {
      "parameters": {
        "messages": {
          "messageValues": [
            {
              "message": "That person does not like us"
            }
          ]
        }
      },
      "id": "afe12b45-edf9-4136-bb54-5b0574c653a8",
      "name": "Basic LLM Negative",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.4,
      "position": [
        460,
        -60
      ]
    },
    {
      "parameters": {
        "messages": {
          "messageValues": [
            {
              "message": "That person like us"
            }
          ]
        }
      },
      "id": "85f3f5ad-ffde-47ed-9a85-fc31e193b3ae",
      "name": "Basic LLM Positive",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.4,
      "position": [
        620,
        300
      ]
    },
    {
      "parameters": {
        "inputText": "={{ $json.chatInput }}",
        "categories": {
          "categories": [
            {
              "category": "Negative",
              "description": "The person does not like us"
            },
            {
              "category": "Positive",
              "description": "The human likes us"
            }
          ]
        },
        "options": {
          "fallback": "discard"
        }
      },
      "id": "093fbf39-78c2-4d4d-b955-5967ff54dddd",
      "name": "PositXNegat",
      "type": "@n8n/n8n-nodes-langchain.textClassifier",
      "typeVersion": 1,
      "position": [
        -40,
        140
      ],
      "alwaysOutputData": false,
      "executeOnce": false,
      "retryOnFail": false
    }
  ],
  "pinData": {},
  "connections": {
    "Groq Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Basic LLM Positive",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Groq Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Basic LLM Negative",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "PositXNegat",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Groq Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "PositXNegat",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "PositXNegat": {
      "main": [
        [
          {
            "node": "Basic LLM Negative",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Basic LLM Positive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "87be1dda-cc21-4efb-bb1e-837fa02c9af7",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "8645ba0b5ee33fc95472804da8cff26c77f44a8b9b5944bda223cb0c73e90e0c"
  },
  "id": "i0LuP9opvnXpTEE9",
  "tags": []
}

Any help would be highly appreciated, I am just depending on this to avoid programming a solution for it.

Hey @Alexandre_Levinson

This is a known bug and I think a fix is being released soon. The workaround at time of writing is to

  1. open the text classifer node
  2. add option > system template (no need to change it)
  3. test again