Skip to content
eWiki The practical AI reference

How-To Guides

How to Connect and Test an n8n Chat Trigger AI Workflow

White and gray geometric shapes connected by black rods across a pale grid, with a glowing blue sphere near the center.

Connect Chat Trigger to an AI Agent or another agent or chain root node, choose hosted or embedded access, match the response mode to that setup, and test privately before making the chat public.

Connect Chat Trigger to the AI workflow

Start the workflow with Chat Trigger and connect it to an agent or chain root node. One documented n8n pattern connects Chat Trigger directly to an AI Agent. This establishes the route from a user’s message into the AI workflow.

Account for executions when planning the workflow. Every message received by Chat Trigger starts a separate workflow execution. A conversation with 10 incoming user messages therefore uses 10 executions from the applicable allowance.

During development, leave Make Chat Publicly Available disabled. The chat then remains accessible through the manual chat interface rather than being exposed publicly. This gives you a private place to check the trigger-to-agent connection before sharing the workflow.

A densely wired white breadboard beside a black smartphone, gray box with a blue light, pen, and open notebook.

Choose hosted or embedded chat access

Hosted Chat uses the interface supplied by n8n. Embedded Chat uses a custom interface, which can be n8n’s chat widget or another implementation, and calls the webhook URL displayed in the Chat Trigger node’s Chat URL field. n8n also documents direct webhook calls as an available way to use Chat Trigger.

Choose access controls alongside the interface. Chat Trigger supports None, Basic Auth, and n8n User Auth. None allows anyone to use the chat. Basic Auth protects it with a shared username and password, while n8n User Auth limits access to users who are logged in to n8n.

The response path differs for embedded chats. The Chat node is not supported when Chat Trigger is in Embedded mode, so an embedded workflow that needs a defined response must use Respond to Webhook instead. As an editorial recommendation, consult n8n’s current chat-widget documentation when configuring the client for your deployment.

A person holds a blue Ethernet cable beside an open laptop and a gray network switch on a white table.

Configure responses and test before sharing

Select a response mode that matches the workflow:

  • When Last Node Finishes returns the response code and data produced by the final executed node.
  • Using Response Nodes returns messages defined by a Chat node or Respond to Webhook node rather than the last node’s data.
  • Streaming sends data back in real time while the workflow processes it. This requires compatible nodes, such as an AI Agent node with streaming support.

A Chat node requires Chat Trigger in the same workflow, with Response Mode set to Using Response Nodes. It can send a message and continue immediately, or send a message and pause execution until the user replies. For Embedded mode, use Respond to Webhook instead of the Chat node.

Keep public availability off while checking the workflow through the manual chat interface. Confirm that messages reach the agent or chain and that the chosen response path returns the intended workflow output. If earlier messages are loaded from memory, configure Chat Trigger and the agent to share the same memory sub-node so conversation history has one source. Enable public availability only after these checks succeed.

Conclusion

Connect Chat Trigger to the agent or chain first, then choose hosted or embedded access and select the response behavior that fits that topology. Test with public availability disabled. Before enabling access, verify the response path and choose the appropriate authentication option; for an embedded interface, confirm that replies are routed through Respond to Webhook rather than the unsupported Chat node.

Disclosures and limitations

  • AI assisted with drafting this article. Product behavior and configuration details are based on the cited official n8n documentation.
  • This guide does not claim hands-on testing. Verify current controls and availability in n8n before publishing a workflow.

Sources

Improve this guide

Report a problem or suggest the next question

Submissions enter a private editorial queue. They are reviewed and deduplicated before any public update or new page is created.