Error "Failed to receive response" in Chat Trigger (Home Assistant Add-on)

Hello everyone,

I installed the n8n add-on for Home Assistant and the initial access worked perfectly. However, when setting up a simple workflow using the Chat Trigger node connected to an AI Agent (with the Google Gemini Chat Model), I encounter the following error in the chat interface after sending a message: “Error: Failed to receive response”.

I’ve already run some isolation tests to try to debug this:

  • The Gemini API credential is validated and connected.

  • If I change the trigger to manual (When clicking ‘Execute workflow’) and pass the prompt directly into the node, the workflow runs successfully and the model processes the response.

  • The problem happens only when the input comes from the Chat Trigger. The execution seems to pause/stall at the trigger. The agent node shows no failure (doesn’t turn red) and no error logs are generated in the console.

I’ve already tried removing the memory node to avoid RAM overflow in the container, but the timeout behavior in the chat window persists.

Hey @Ricardo_Mendonca Welcome!
Have you tried manually defining the chat trigger’s output into the AI agent? Like this:

I think this should work, let me know how this goes.

Hi @Ricardo_Mendonca

The problem isn’t that your AI or your workflow is broken—it’s that the “middleman” (the Home Assistant network layer) is getting impatient. When you send a message, the AI takes a few seconds to think and generate a response. During this silence, Home Assistant thinks the connection has stalled and cuts it off to save resources, which results in the “Failed to receive response” error.

To fix this, you need to change how n8n sends the answer back. Instead of letting the Chat Trigger handle the response automatically, change the trigger’s settings to “Use response nodes” and add a “Respond to Chat” node at the very end of your workflow. This changes the communication method and typically prevents Home Assistant from killing the connection prematurely.

If that doesn’t work, the issue is likely a configuration mistake regarding your web address. n8n might be trying to send the response to an internal address that the browser can’t reach. You can fix this by ensuring the “Webhook URL” in your add-on settings is set to your full, external Home Assistant address.

If your environment is set to "N8N_HOST=0.0.0.0" , you may need to replace it to localhost or your custom domain

Check to see if any of these apply

hi @Ricardo_Mendonca, welcome to the n8n community!
I’d first check if the execution is created when the message is sent and if the Agent produces output normally. If the execution completes successfully, open the browser console (F12) and check for any websocket/SSE errors. It would also be helpful to know the exact version of the n8n Add-on and Home Assistant, as that would help determine if the issue is in the chat UI layer or in the integration via Ingress.