[SOLVED] Sending Telegram messages with text formatting

Hello everyone,

im currently experimenting with sending Telegram messages from OpenHAB (2.4) via the Telegram Action (1.13.0) and the Telegram Bot API. My problem right now is that I can’t seem to get text formatting to work. Not with Markdown and not with HTML. Below is my configuration and an example Telegram message.
I found another topic here in the forum where somebody does exactly what I’m trying to do seemingly without issue so I am wondering if I just missed something really obvious or it just doesn’t work the way I want to.



abc_bot.chatId = 123
abc_bot.token = 123456789
abc_bot.parseMode = Markdown


sendTelegram("abc_bot", "*Die Lampe Badezimmer ist noch an!*")

Example message

Configuration looks fine to me.
Check, if this PR is part of 2.4.

As it’s an OH1 addon, you could install it manually by

Afterwards, telegram new version should instantly work as expected.

Hi @Syn, thanks for the hint, the PR changes are actually already included the latest documentation so I expected the features to already be included in the public version which is not the case. I installed the 1.14.0 snapshot and now it works as expected!

Hi @Udo_Hartmann, I installed the snapshot and actually had to restart the container, but now it works without issue. Thanks!

Well, there are at least 3 public versions online, OH2.4 (aka stable), OH2.5M1 (aka milestone or testing) and OH2.5 snapshot (aka unstable). You can change the documentation to show the different versions (right upper corner on every page), but by default it will display latest version.

Use the following syntax in your message:

*bold \*text*
_italic \*text_
*bold _italic bold ~italic bold strikethrough~ __underline italic bold___ bold*
[inline URL](http://www.example.com/)
[inline mention of a user](tg://user?id=123456789)
`inline fixed-width code`

pre-formatted fixed-width code block

pre-formatted fixed-width code block written in the Python programming language

A detailed blog: http://sforsuresh.in/telegram-bot-message-formatting
1 Like