Respond to webhook not responding with correct text format in embedded chat

Describe the problem/error/question

Since very recently, when i use the Respond to Webhook node to respond to the user query in embedded chat, the formatting of the HTML response is not correct on the clientside chat.

The text is wrapped in quotes, and things that were in markdown, like new lines (\n\n1) are not converted, like so:

”Example text :\n\n1”

This did not use to be the case, for example last week it would generate the HTML correctly, with tags for the text, and new lines being correctly created.

The chatbot response is also correct if i remove the node and use the output straight from the AI agent node, so it seems to be a problem with the webhook response node.

I don’t recall changing it recently, but since discovering this issue i made sure the “Respond with:” field is set to “Text” (as it was already) and i set the Content-Type to text/html to be sure.

The HTML is correct when testing on N8N cloud on the test chat

Where could this issue be from?

What is the error message (if any)?

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.109.1
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
  • Operating system:

Hi @bluescript,

did you already find a solution to this problem? Experiencing the same issue…

If anyone is experiencing the same issue, the solution is to wrap the text in a JSON-object:

{"output": "text"}

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.