Docs
n8n Chat Streaming

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:
    1. Update n8n to the latest version
    2. 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:

  1. Open your workflow in the n8n editor
  2. Select the Chat Trigger node
  3. Go to OptionsAdd FieldResponse Mode
  4. Set the Response Mode to "Streaming"

Option B: Webhook Node

If you're using a Webhook node as your trigger:

  1. Select the Webhook node in your workflow
  2. Navigate to RespondStreaming
  3. 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

  1. Select the AI Agent node in your workflow
  2. Go to Add optionEnable streaming
  3. 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:

  1. Configure input node - Enable streaming on your Chat Trigger or Webhook node
  2. Configure output node - Enable streaming on your AI Agent node
  3. 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:

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