Chat Trigger: Failed to receive response

Hi, I use self-hosted n8n with Docker and Caddy.

My Chat Trigger always shows “Error: Failed to receive response”.

Both OpenAI and Gemini credentials connect successfully. Executions show “Succeeded” in 79ms, but the AI Agent doesn’t run.

I also tested without the WordPress tool and changed the Response Mode, but the issue remains.

What could be causing this, and how can I fix it?

Hi @aisha_jamal, check whether one specific chat message reaches the Agent’s main input.

Open browser DevTools → Network, send a unique message such as chat-probe-517, and select the chat request whose payload contains action: sendMessage. Share its request URL, HTTP status and response body.

Then open the matching n8n execution and check whether the Chat Trigger output contains that exact message. If it does but the Agent has no run data, check the main connection from Chat Trigger to Agent and whether the Agent is disabled. If there’s no matching execution, the request details will help locate where delivery failed.

Please also share your n8n version, workflow JSON with sensitive values removed, and whether this happens in the editor’s chat, hosted chat, or an embedded widget.

Adding to Anshul’s checks, the 79ms is the big clue. A run that finishes that fast means only the Chat Trigger executed, so the Agent never got the message. Usually it’s one of these:

1. Open that execution and look for the AI Agent node. If it’s not there at all, the Chat Trigger isn’t wired to the Agent’s main input (easy to miss if it got connected to a tool or memory input instead), or the Agent is deactivated.

2. Set Response Mode on the Chat Trigger to “When Last Node Finishes.” If it’s set to “Using Respond to Webhook Node” and there’s no Respond to Webhook node in the workflow, the chat returns nothing and you get exactly this error.

3. If the Agent does run but the chat still shows the error, look at Caddy. Add this inside your reverse_proxy block so it doesn’t buffer the response:

reverse_proxy n8n:5678 { flush_interval -1 } And check your n8n container env has: WEBHOOK_URL=https://your-domain.com/ N8N_PROXY_HOPS=1

If none of that fixes it, post your n8n version and your Caddyfile (with the domain blanked) and I’ll take a look.

Hi @aisha_jamal, one small addition: the 79 ms duration doesn’t by itself tell us which nodes ran. The execution details should show whether the Chat Trigger produced data and whether the Agent received it.

For the Caddy setup, check the request and execution Anshul mentioned before changing proxy settings. If you do check the webhook URL, it should point to your public n8n URL rather than being left blank. The variable name depends on your n8n version; the reverse proxy guide explains the settings.

Could you share your n8n version and whether this happens in the editor chat or the hosted chat? Please remove any tokens from request details.

Before changing Caddy again, it helps to know which request produces that text. In the n8n chat frontend, “Error: Failed to receive response” is set in one catch block (packages/frontend/@n8n/chat/src/plugins/chat.ts, handleMessageError). That catch runs when the send request rejects: a network failure or blocked request, or in streaming mode a non-OK response (packages/frontend/@n8n/chat/src/api/message.ts, sendMessageStreaming). A non-2xx response in normal mode is displayed as the response body instead.

So in DevTools → Network, find the request with action: sendMessage. If it has no status, or shows as failed or blocked, the problem is between the browser and n8n (URL, proxy, or CORS). If it has a status and a body, it’s a different path, and the body tells you what it is.

Could you share that status and the first few hundred characters of the response? Also the exact WEBHOOK_URL value, with any tokens removed.