comment resoudre ce probleme
Information on your n8n setup
- n8n version: 2.19.2
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app): docker
- Operating system: windows 11 23H2
Hi @Erro_Erro
Take note this is an English forum, so do use an online translator before you post next time.
The error “Failed to receive response” essentially means that the chat window sent a request, but it never got an answer back. It is like sending a text message and seeing that it was delivered, but the other person never replies. The workflow started running, but the final answer got lost or blocked before it could reach your screen.
The most likely cause is the “Limit” node you placed at the end of the workflow. In n8n AI setups, the AI Agent needs to send its response directly back to the chat trigger. By putting a Limit node after the AI Agent, you have essentially placed a roadblock in the way, preventing the answer from returning to the chat interface. Removing this node is the first thing you should try.
Another possibility is that the system is simply timing out. Because your workflow is doing a lot of heavy lifting—reading files from a disk and searching a MongoDB database—it takes much longer to generate an answer than a simple chat would. If the process takes too long, the chat window stops waiting and displays an error, even if the AI is still working in the background.
There could also be a technical failure within one of your tools. If the Google Gemini API key is incorrect or the MongoDB connection is unstable, the AI Agent might crash silently. To find out if this is happening, you can check the “Executions” tab in n8n; any node that has turned red is the specific point where the workflow failed.
To solve this, start by deleting the Limit node and testing the chat again. If that doesn’t work, check your execution logs for red error messages to see if a specific tool is crashing. You can also try disconnecting the file and database nodes temporarily to see if the AI responds on its own, which will help you figure out exactly which part of the chain is broken.
Hi @Erro_Erro
It looks like the fix is in your AI Agent node, not in the Chat Trigger itself.
You need to map the user message correctly inside the AI Agent. In the field Source for Prompt (User Message), please choose Define below instead of using the automatic Chat Trigger option. This is important because Define below lets you manually tell the AI Agent exactly which value should be used as the user’s message.
Then paste this expression into the Prompt User Message field:
={{ $('When chat message received').item.json.chatInput }}
This tells the AI Agent to read the chatInput value from the Chat Trigger node and use it as the user’s message.
Please copy the JSON below and replace it with your current Chat Trigger and AI Agent nodes.
Important: the node name inside the AI Agent expression must match your Chat Trigger node name exactly. If your node has a different name, update this part:
$('When chat message received')
sorry for writing in French, I have tried before without all the nodes, just the chat and AI but the error persisted, I don’t know what to do anymore
I’ve tried but no change, the error message is displayed without send the response in ai node
Can you send your JSON here, I can check for you and give you a solved JSON, @Erro_Erro
i find and fix the error ,
my container had the -e N8N_HOST=0.0.0.0 , it’s the error , i replace 0.0.0.0 by localhost and the error is fixed ! thank for all