Telegram message_thread_id issue

Since few updates ago Telegram presented new feature: topics- more details are on Topics in Groups, Collectible Usernames, Voice-to-Text for Video Messages and More

You call an API adding message_thread_id to write in any topics inside your group.
For instance: https://api.telegram.org/botABCid/sendMessage?chat_id=-group_id&text=test123&message_thread_id=2

i want to you this feature in my notifications. Just to send proper notification to proper topic.
I was trying in Developer tools (services) to test this, but message_thread_id is not recognized and not working. Any ideas how can I use this in notifications?

2 Likes

Did you ever figure this out?

In my opinion this functionality should be inserted as a field in the message sending service in the “thread”/topic.
For now it is missing.
But I’d be happy to be proved wrong.
In the official integration I see nothing!

I think it’s better to move in thread “feature-requests” add message_thread_id on sendmessage, sendphoto, sendvideo
ecc


What do you think @szymarek
@martinhjelmare (sorry if i disturb ;))

curl -X POST -H ‘Content-Type: application/json’ -d ‘{“chat_id”: “-100XXXXXXXX”, “message_thread_id”: “{{ thread_id }}”, “text”: “{{ message_text }}”,“parse_mode”: “HTML”, “disable_notification”: false}’ https://api.telegram.org/bot65XXXXXXXXXXXX:XXXXXXXXXXXXXXXXzI88Lu54E6aYo2Ww/sendMessage

This is a test


For API :

Any update on it?

Ciao a tutti,
ho provato anche ad integrare la funzione message_thread_id nel file di configurazione «configuration.yaml» senza alcun risultato:

# Telegram BOT
telegram_bot:
  - platform: polling
    api_key: XXXXXXXXX:XXXXXXXXXXXXXXXXXX
    allowed_chat_ids:
      - XXXXXXXXXXXXX

notify:
  - name: HA
    platform: telegram
    chat_id: -XXXXXXXXXXX
    message_thread_id:
      - XXXX

Qualcuno ha provato altre strade?
Grazie

@pieromobile I am trying to do the same. Did you have any luck getting it to work? or where to put the message thread id

Thanks

Per ora non funziona!
Se altri hanno informazioni su come fare considerando che da qualche giorno sono state aggiornate le API di Telegram.

Unless someone said something difference there is not information on the documentation about how to send message to specific group using a threat ID specific.

I can achieve with no issue send my message to a Telegram Group but only to the #general Threat, using the allow chat id mark in bolt

telegram_bot:

  • platform: webhooks
    api_key:
    url: https://:80
    allowed_chat_ids:
    • 123456789 # this is a user
      - -123456789 # this is a group (with the “-” symbol)

Im wondering why with Uptime Kuma i can easy send notification using the same Telegram Boot to the same group and to specific Threath topic in this example will be something like

  • -123456789 ==> This is the default
  • -123456789_1 => This is the topic for UptimeKuma notification
    - -123456789_2 => This will be if possible the topic for HA notifications

If someone was able to implemen please advise will be really helfull !