Telegram integration - telegram_text event not triggered

Hello everyone;

I am trying to setup the telegram integration. I have created a bot, and verified through the telegram API that it gets the messages that I send to it, it is part of a group and inside the telegram app I see “bot has access to messages” so that side should be ok.

On home assistant side, I have configured it like so:

telegram_bot:
  - platform: webhooks
    api_key: 'my_key'
    allowed_chat_ids:
      - some_group_id

notify:
  - platform: telegram
    name: ernesto
    chat_id: some_group_id

The notify platform works perfectly, and I can send messages through the bot without any issue; the problem I face is that no matter what I type in the relevant group, I see no event generated. I tried to subscribe to telegram_text or telegram_command through the developer tools, but nothing pops up; I have a very simple automation set up, but it never gets triggered:

alias: Telegram Trial
description: ''
trigger:
  - platform: event
    event_type: telegram_text
condition: []
action:
  - service: notify.ernesto
    data:
      message: Message received.
mode: single

At this point, I am at a loss. I am 99% positive I am missing a trivial & fundamental step, but I just can’t figure this out.

Thanks to anyone who will find some time to help.

Ciao,
V

according to the documentation should be
- platform: polling

not webhooks

Hello pepe59,

The way I understand it is that either webhooks or polling should work in this case, while broadcast is to be used if one needs to send only.

At any rate, polling is the first setting I have used but the behavior was the same.

have you found solution? I got same problems

Did you found the solution?
Looking the documentation, the group id should start with a -

# Example configuration.yaml entry
telegram_bot:
  - platform: webhooks
    api_key: YOUR_API_KEY
    allowed_chat_ids:
      - 123456789 # example id of a user
      - -987654321  # example id of a group, starts with a -

Hope it helps!