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

Issue with "When Chat Message Received" node #12791

Open
Jason-Automation-Expert opened this issue Jan 23, 2025 · 2 comments
Open

Issue with "When Chat Message Received" node #12791

Jason-Automation-Expert opened this issue Jan 23, 2025 · 2 comments
Labels
in linear Issue or PR has been created in Linear for internal review

Comments

@Jason-Automation-Expert

Describe the problem/error/question

I started experiencing this issue on Monday, not sure if it is intermittent. There are two issues I'm seeing with the "when chat received node". First, when I embedded the n8n widget into my website, the actual text box where a user types their question was not displaying, the chat window was there, but you couldn't ask any questions. This appeared to be an issue specifically with that webhook. I have another active chatbot that I deployed a week ago, and not having any issues. I eventually duplicated that previous workflow and made adjustments to it for my new chatbot and that webhook URL worked. before I got a working chatbot I had tried recreating multiple times with a new worfklow and kept having the issue. So not sure if something in the creation of the webhook url from that node.

Secondly, I have the parameters set correctly, but for some reason the chatbot keeps logging errors but I'm not certain anyone has actually tried to use the chatbot other than my testing. But it logs an error intermittently within the executions, indicating that it is expecting the chatInput as the text input. The "when chat received node" is passing a parameter called action with a variable "loadPreviousSession", but I have confirmed I do not have that option selected in the node.

What I can't tell is whether or not this is happening when my customers are using the chatbot. Every time I try it in production, I have no issues, so then why am I getting executions and why is it erroring out due to invalid input.

What is the error message (if any)?

No prompt specified
Expected to find the prompt in an input field called 'chatInput' (this is what the chat trigger node outputs). To use something else, change the 'Prompt' parameter

Please share your workflow/screenshots/recording

Image

Image

Image

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

{
"nodes": [
{
"parameters": {},
"id": "336bf90f-bb9c-4304-b723-77524285e77b",
"name": "Window Buffer Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"typeVersion": 1.2,
"position": [
940,
420
]
},
{
"parameters": {
"public": true,
"mode": "webhook",
"options": {
"responseMode": "responseNode"
}
},
"id": "5ae14153-9d95-4008-a279-1f2be84e7dee",
"name": "When chat message received",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"typeVersion": 1.1,
"position": [
480,
200
],
"webhookId": "dfbed3e0-4409-4316-9f44-d608394d04f9"
},
{
"parameters": {
"resource": "assistant",
"assistantId": {
"__rl": true,
"value": "asst_ljFeftdxsAIG1m624Rpe7XSa",
"mode": "list",
"cachedResultName": "Autonomous Chatbot"
},
"options": {}
},
"id": "ce4aea9f-f752-4cac-8270-27f1207dcae9",
"name": "Chatbot",
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.5,
"position": [
700,
200
],
"credentials": {
"openAiApi": {
"id": "t82FdmvPda1s2iH5",
"name": "Autonomous Strategies Chatbot"
}
}
},
{
"parameters": {
"options": {}
},
"id": "c3c3ae48-664e-4dcb-908c-85e4085920ff",
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [
1080,
200
]
}
],
"connections": {
"Window Buffer Memory": {
"ai_memory": [
[
{
"node": "Chatbot",
"type": "ai_memory",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "Chatbot",
"type": "main",
"index": 0
}
]
]
},
"Chatbot": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
},
"Respond to Webhook": {
"main": [
[]
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "f0cdc47a0633c9bf51d1e8080408445de75e6a3042f16d5f533c7b83ec396bb2"
}
}

Share the output returned by the last node

N/A

Debug info

core

  • n8nVersion: 1.74.3
  • platform: npm
  • nodeJsVersion: 20.18.1
  • database: sqlite
  • executionMode: regular
  • concurrency: 50
  • license: community

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: filesystem

pruning

  • enabled: true
  • maxAge: 168 hours
  • maxCount: 2500 executions

client

  • userAgent: mozilla/5.0 (windows nt 10.0; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/131.0.0.0 safari/537.36
  • isTouchDevice: false

Generated at: 2025-01-22T10:22:18.585Z}

@Joffcom
Copy link
Member

Joffcom commented Jan 23, 2025

Hey @Jason-Automation-Expert,

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

@Joffcom Joffcom added the in linear Issue or PR has been created in Linear for internal review label Jan 23, 2025
@jeanpaul
Copy link
Contributor

@Jason-Automation-Expert Hi, unfortunately, I'm also unable to reproduce your issue. Can you tell me what's different between your testing and your customer's testing? Things like: Browsers, any errors logged in the console, that sort of things.

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

3 participants