Hey,
I have updated my n8n to version 1.123.0 to get that streaming enabled respond to webhook node. So I have tested it in my UI and it does not act same like streaming Ai Agent node, In Ai Agent node it actually sending chunks into client side,
It is staring begin chunk and ends with end chunk, but in between there are multiple chunks for message content. but in respond to webhook node it has only 3 elements for streaming structure, all the message contain into one chunk and pass it to client side in one time. it does not typing in the frontend side.
Thanks,
Hey @Abhiru_Wijesinghe !
Webhook Trigger and Respond to Webhook are 2 different nodes right?
The Webhook Trigger should have the option with “Streaming” as Response , then there are couple of nodes that support streaming like the AI Agent node(you have as well to enable that option “Streaming” to it), and the “Respond to Webhook” node can be removed…
Once I will get to my PC, I can show you even in F12 console log the chunks.
Can you share an image with the setup?
My version is 1.113.4
Cheers!
Hi ,Yeah those are two separate nodes, you are right, in previous versions if we want streaming, first we enable the stream in webhook node and enable AI agent node streaming button.But now n8n has introduced streaming for ‘Respond to webhook node’. Since guardrail node has introduced streaming should return after output guardrail node. But now chunks are looks like this.
{
"type": "begin",
"metadata": {
"nodeId": "81076212-76f3-45f4-b9bf-9bb882b1eceb",
"nodeName": "Respond to Webhook14",
"itemIndex": 0,
"runIndex": 0,
"timestamp": 1765181578630
}
}
{
"type": "item",
"content": "**Rubik’s Cube Pricing** \n- **Item code:** CUBE_RU \n- **Recommended retail (incl. tax):** $22.00 \n- **Recommended retail (ex‑tax):** $18.18 \n- **Wholesale price (ex‑tax):** $18.18 \n- **Promotions / tiered pricing:** None active \n\nI don’t have information on the invention date or location.",
"metadata": {
"nodeId": "81076212-76f3-45f4-b9bf-9bb882b1eceb",
"nodeName": "Respond to Webhook14",
"itemIndex": 0,
"runIndex": 0,
"timestamp": 1765181578630
}
}
{
"type": "end",
"metadata": {
"nodeId": "81076212-76f3-45f4-b9bf-9bb882b1eceb",
"nodeName": "Respond to Webhook14",
"itemIndex": 0,
"runIndex": 0,
"timestamp": 1765181578630
}
}
Hey @Abhiru_Wijesinghe !
Oh… right now I am going to take a look at it, and definitely try to see…
Ok…. It seems that thhe trigger streams as soon as a streaming-capable node in the workflow emits data.
Ythen yoou choose which node actually streams by where you enable streaming:
If you only enable streaming on the AI Agent, the user will see the raw agent output streamed, even if you have more nodes after it.
If instead you want the guardrailed output (after a Guardrail or Set node) to be what streams,yin your case id would do:
-Turn off streaming on the AI Agent.
-Place a Respond to Webhook node after your Guardrail node, and enable Enable Streaming there…
Soo… response comes after all processing (including Guardrail or any otjer node), because the ‘Respond to Webhook node’ becomes the streamning endpoint?
When I get at PC I will definitely try it!
Cheers!
1 Like