FlowKit

Streaming AI responses in n8n: Chat Trigger, Webhook and AI Agent

Published 25 August 2026 · 6 min read

An AI agent that takes ten seconds to answer isn't necessarily a slow agent — sometimes it's just an agent that leaves its user staring at a blank screen for ten seconds. Streaming solves that exact problem: instead of waiting for the full response before displaying it as one block, n8n can return each generated fragment as it's produced, the same way ChatGPT does on screen. This guide covers where to turn this setting on — on the Chat Trigger, on a standard Webhook with Respond to Webhook, and on the AI Agent side — what it actually changes, and one known pitfall to test before going to production.

What streaming changes (and what it doesn't)

Streaming doesn't reduce the number of tokens generated, the total time the model takes to produce its full answer, or the API call's bill. What it changes is when each piece of the response reaches the client: as it's generated, rather than all at the end. For a model that takes eight seconds to produce a three-hundred-word answer, the user sees the first words appear within a second or two, then the rest scroll in progressively — instead of staring at a loading spinner for eight seconds before everything appears at once.

This distinction between actual duration and perceived duration isn't new: as early as 1968, Robert B. Miller's foundational study, “Response Time in Man-Computer Conversational Transactions” (AFIPS 1968), identified precise thresholds beyond which a delay breaks the user's train of thought — around one second to preserve continuity in an interaction. Streaming doesn't change the physics of the underlying computation, but it moves the user's experience to one side or the other of that threshold: they're no longer waiting for a result, they're watching one get built.

An interesting, more recent nuance tempers the idea that "faster always means better." A study presented at CHI 2026, “The Impact of Response Latency and Task Type on Human-LLM Interaction and Perception” (Tan et al., CHI 2026), found that answers delivered in two seconds are perceived as less thoughtful and less useful than answers arriving after nine or twenty seconds — users unconsciously associate a longer delay with a model that "thinks" harder. So what streaming actually solves isn't so much the duration itself as the uncertainty of waiting: watching the text build up progressively reassures the user that the system is working, without needing to fake the real generation speed.

The two pieces that must be enabled together

Streaming in n8n relies on Server-Sent Events (SSE) and always involves two nodes configured consistently: the workflow's entry point, and the node that produces the response to be streamed. If only one of the two is set to streaming, n8n silently falls back to standard request-response mode — the workflow keeps working normally, just with no streaming effect visible on the client side.

On the input side: Chat Trigger or Webhook

  • Chat Trigger: in the node's options, the Response Mode setting offers a Streaming Response choice. This is the most direct setting if you're using n8n's hosted chat or the @n8n/chat widget on your site.
  • Webhook: for a custom integration (your own frontend, an API you expose), the Webhook node must be set to the streaming-compatible response mode, and the Respond to Webhook node downstream must have its Enable Streaming option turned on. Without that setting on the Webhook side, a streaming-enabled Respond to Webhook node is ignored, like any other incompatible setting.

On the output side: the node that generates the response

The AI Agent node supports streaming natively: once the input is configured, every token the model generates is sent back as it's produced, with no extra configuration needed on the agent side. In recent n8n versions, this same node also exposes more than just the raw text: the agent's execution steps and its tool calls can be followed in near real time instead of only being discovered once execution finishes — useful for giving the user visibility into what the agent is doing during a tool call that takes several seconds (a web search, a database query, an external API call).

Step-by-step setup

  1. On the Chat Trigger node, open the options and set Response Mode to Streaming Response. For a Webhook, set the response mode to the streaming-compatible option and turn on Enable Streaming on the Respond to Webhook node that follows.
  2. Check that the downstream AI Agent node is the one actually producing the streamed final answer — not an intermediate Set or Code node reformatting the output before display, which would break the streaming effect.
  3. If you're using the @n8n/chat widget, no extra frontend configuration is needed: the widget detects the endpoint's streaming mode and displays tokens as they arrive automatically.
  4. For a custom Webhook integration, your HTTP client needs to know how to consume an SSE stream (EventSource in the browser, or a streamed read on the server side) rather than waiting for one complete JSON response in a single call.
  5. Test the full scenario in a staging environment before activating the workflow in production, especially if your agent uses tools: streaming behavior with intermediate tool calls deserves its own check, separate from a simple toolless question.

A known pitfall: file uploads and streaming mode

Several user reports describe file uploads breaking in the chat interface when Streaming Response mode is enabled on the Chat Trigger — the file the user sends doesn't correctly reach the workflow. If your assistant needs to accept attachments (a PDF to summarize, an image to analyze via a vision node), test that specific path before rolling out streaming broadly: either the behavior will have been fixed on your n8n version, or you'll need to disable streaming on that particular workflow in the meantime.

When streaming is worth it — and when it isn't at all

  • Worth it: a conversational chatbot where the user is watching the screen while waiting for an answer — the typical case of an AI chat widget on a website or a RAG assistant used live. The longer the answer, the sharper the perceived gain.
  • Probably worth nothing: a workflow called by a machine-to-machine integration waiting for one complete, parseable JSON response (streaming adds nothing for a caller that can't display anything before the end anyway), or a very short answer (a one-sentence classification) where the gap between streaming and a single-block response is imperceptible.
  • Mixed case worth knowing: a RAG chatbot with citations can stream the answer text token by token, but the sources block usually only appears once generation is complete, since it often depends on processing the full answer. That's expected behavior to plan for in the interface, not a bug.
  • Pitfall to avoid: a synchronous webhook called by a system with a short timeout anyway (a Slack command, for instance) doesn't benefit from streaming the same way a chat does — see our guide on webhook timeouts with a slow AI agent instead, which covers the immediate-response-then-background-processing pattern, better suited to that context.

Going further

Streaming is a UX setting, not a cost or performance lever: it fits naturally with the conversational workflows in the RAG Assistant Pack (€119), where a user asking their documentation assistant a question deserves to watch the answer build up rather than stare at a loading spinner. If the basics of the Chat Trigger or wiring up an AI Agent aren't in place yet, our guides on the Chat Trigger node and on connecting Claude or GPT to n8n cover the prerequisites before reaching for this level of tuning.

FAQ

Frequently asked questions

Do I need to enable streaming on just one node for it to work?

No. Streaming requires both the input node (Chat Trigger or Webhook) AND the output node (AI Agent, or Respond to Webhook with Enable Streaming) to be configured for streaming. If only one of the two is enabled, n8n silently falls back to standard request-response mode: the workflow still runs, but with no visible streaming effect.

Does streaming work with file uploads in the chat?

This is a documented point of caution: several users have reported that file uploads fail when the Chat Trigger is in Streaming Response mode. If your assistant needs to accept attachments, test that exact scenario before shipping it to production, or disable streaming on workflows that accept files.

Does streaming reduce the cost or the total duration of an AI call?

No, neither. The number of tokens generated and the total generation time stay identical: streaming only changes when each fragment of the response reaches the client, sending it as it's produced rather than all at once at the end. It's a perceived-latency win, not a real-latency or billing one.

Can you stream a RAG answer along with its citations?

Partially. The answer text can be streamed token by token like any generation, but the associated sources or citations are usually only available once generation is complete, since they often depend on post-processing the full answer. In practice, you stream the text and then reveal the citations block right at the end.

Bundle FlowKit Complet

€269