n8n Chat Streaming
Learn how to configure n8n chat streaming and enable real-time AI responses in your chat widgets.
The N8N Chat UI widget now supports chat streaming, delivering AI-generated responses word by word in real-time. This creates a much more responsive and engaging chat experience for your users, eliminating the wait time for complete responses.
What is Chat Streaming?
Chat streaming transforms the traditional request-response cycle into a continuous flow of data. Instead of waiting for your n8n workflow to generate the complete response before displaying it, users now see text appearing progressively as it's being generated, similar to how ChatGPT and other modern AI interfaces work.
Before (Traditional): User sends message, waits, then complete response appears at once
After (Streaming): User sends message and response appears word by word in real-time
This feature makes conversations feel faster, smoother, and more natural, significantly improving the user experience.
How It Works
Chat streaming is supported in both managed and standalone widget types. The best part? Your chat widget automatically supports streaming without any configuration changes on your end.
When widget detects that streaming is enabled in your workflow, it seamlessly switches from the traditional request-response mode to streaming mode. If streaming isn't configured in your backend, the widget continues to work exactly as before.
Prerequisites
Before configuring chat streaming, ensure you have the latest version of n8n:
- n8n Cloud users: You're automatically running the latest version, no action needed
- Self-hosted users: If you don't see the "streaming" option in your nodes:
- Update n8n to the latest version
- If you're already on the latest version and still don't see the streaming option, try removing and re-adding the node to your workflow
This will ensure you have access to all the latest streaming features.
Enabling Streaming in n8n
To enable chat streaming, you need to configure both input and output nodes in your n8n workflow. Chat streaming requires enabling streaming on both the node that receives the message (input) and the node that generates the response (output). No changes are required in your chat widget as it automatically detects and handles streaming responses.
Step 1: Configure Input Node (Required)
First, enable streaming on the node that receives chat messages. You have two options:
Option A: Chat Trigger Node
If you're using the Chat Trigger node:
- Open your workflow in the n8n editor
- Select the Chat Trigger node
- Go to Options → Add Field → Response Mode
- Set the Response Mode to "Streaming"
Option B: Webhook Node
If you're using a Webhook node as your trigger:
- Select the Webhook node in your workflow
- Navigate to Respond → Streaming
- Enable the streaming option
Step 2: Configure Output Node (Required)
Next, enable streaming on the node that generates responses. Currently, only the AI Agent node supports streaming output:
AI Agent Node
- Select the AI Agent node in your workflow
- Go to Add option → Enable streaming
- Toggle the streaming option to enabled
Complete Setup Required
Important: Both the input node (Chat Trigger or Webhook) and the output node (AI Agent) must have streaming enabled for chat streaming to work. If streaming is only enabled on one node, the workflow will fall back to traditional request-response mode.
Supported Widget Types
Chat streaming is fully supported across both of our widget hosting services:
- Managed Widgets - Full streaming support with automatic detection when configured in your n8n workflow
- Standalone Widgets - Complete streaming support that works seamlessly with your streaming-enabled n8n workflows
Compatible with All Widget Display Types
Both managed and standalone widgets support streaming across different display modes:
- Popup widgets - Floating chat button that opens a chat window
- In-page widgets - Chat interface embedded directly in your webpage
Important Considerations
Automatic Fallback Behavior The chat widget is designed to be backward compatible. If your n8n workflow doesn't have streaming enabled, the widget automatically falls back to the traditional request-response mode. This means you can gradually enable streaming for specific workflows without breaking existing implementations.
No Widget Configuration Required
Unlike many other features that require widget configuration, chat streaming is entirely controlled from your n8n workflow. This design choice ensures:
- Simplified setup - Enable streaming with just a few clicks in n8n
- Centralized control - Manage streaming behavior from your workflow logic
- Automatic detection - The widget intelligently adapts based on your backend configuration
Getting Started
To start using chat streaming:
- Configure input node - Enable streaming on your Chat Trigger or Webhook node
- Configure output node - Enable streaming on your AI Agent node
- Test your implementation - Send a message through your chat widget to see streaming in action
That's it! Your existing chat widget will automatically detect and utilize the streaming capability.
Video Tutorial
For a complete walkthrough of setting up chat streaming in n8n and seeing it in action with the widget, watch this step-by-step demo:
Related Documentation
- Backend Integration - Learn about the basic response format and n8n workflow setup
- Metadata - Send custom context and data with your messages
- Voice Input - Combine streaming with voice messages for enhanced interactions
- Official n8n Chat Streaming Support Documentation - Setup instructions from n8n
Summary
- Enable streaming on both input (Chat Trigger or Webhook) and output (AI Agent) nodes in n8n
- Widget automatically detects and supports streaming without configuration
- Works with both managed and standalone widget types
- Provides real-time word-by-word response delivery for better user experience