n8n Streaming

function

Seamlessly connect Open WebUI to N8N workflows with real-time streaming support, enabling powerful AI agents that can access external APIs, databases, and services while filtering metadata for clean conversation flow.

webfox
@webfox
·
a year ago
865
7
4.7K
Updated a year ago
Created Aug 8, 2025
n8n_streaming.py
Python · 500 lines
"""
title: n8n Streaming
author: James @ foxbyte.tech (inspired by owndev)
author_url: https://github.com/webfox/
n8n_template: https://github.com/owndev/Open-WebUI-Functions/blob/master/pipelines/n8n/Open_WebUI_Test_Agent.json
version: 1.0.0
license: Apache License 2.0
description: A pipeline for interacting with N8N workflows with full streaming support. Seamlessly connects Open WebUI to N8N AI agents and workflows.
features:
  - Real-time streaming responses from N8N workflows
  - Filters out N8N metadata for clean output
  - Encrypted storage of sensitive API keys

n8n Streaming for Open WebUI

Connect Open WebUI directly to your n8n workflows with real-time streaming support. Create powerful AI agents that can access external APIs, databases, and services while maintaining natural conversation flow.

Features

  • ✅ Real-time streaming responses
  • ✅ Automatic metadata filtering for clean output
  • ✅ Encrypted credential storage
  • ✅ User context and chat history passing
  • ✅ Compatible with any N8N workflow

n8n Workflow Requirements

  • n8n version 1.105.4 or higher

Webhook Node:

  • Response Mode: "streaming" (essential for real-time responses)

AI Agent Node:

  • Options → Enable Streaming: true (enables token-by-token streaming)

Respond to Webhook:

  • Respond With: "allIncomingItems" (returns all workflow data)

0