I use a change node immediately before sending to the bot. It uses the following JSONata to change the payload:
{
"chatId": chatId,
"content": "*" & $replace(topic, "_", " ") & "*\n" & $join($split(payload, "<br>"), "\n"),
"type": contentType,
"options": {
"parse_mode": "Markdown"
}
}
MQTT messages destined for output to Telegram have another change node that sets the correct chatId and:
As you can see, MQTT Telegram messages all start with the topic TELEGRAM/