Telegram response error: Bad Request - Can't parse entities

Hello team,
It looks like a remake of issue reported on Mar 21, but the fix offered there did not work in my case. In my workflow Tools Agent outputs the text to Telegram Response node list of my today’s activities. Sometimes it throws the error “Bad Request: can’t parse entities: Unsupported start tag “” at byte offset…” (please see screenshot).
I already tried to fix the problem by setting additional field “Parse Mode” to HTML in Response node, as well to explicitly instruct Tools Agent to return well formatted HTML in output. Nothing helped. Problem still persists.

Information on n8n setup

  • n8n version: 1.89.2

Try to add this .replaceSpecialChars().removeTags().removeMarkdown().replaceAll('?','').trim() after $json.output in the text field

So it should be like:

{{$json.output.replaceSpecialChars().removeTags().removeMarkdown().replaceAll('?','').trim()}}
4 Likes

Anas thank you - it worked!

1 Like

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