Telegram tts bot

Hello everyone, i’m trying to build a telegram bot to handle a tts with alexa.
How do I set the tts trigger after the callback_query and sending a sentence to telegram?
For now it plays any sentence without command or callback.

Ps. sorry for my English

- id: telegramtts
  alias: telegram tts
  hide_entity: true
  trigger:
  - platform: event
    event_type: telegram_callback
    event_data:
      data: /tts
  action:
  - service: telegram_bot.answer_callback_query
    data_template:
      callback_query_id: '{{ trigger.event.data.id }}'
      message: tts
  - service: notify.telegram
    data_template:

      message: >- 

        Say something
    
        
- alias: 'Telegram bot send tts'
  trigger:
    platform: event
    event_type: telegram_text
  action:
  - service: notify.alexa_media_echo_dot
    data:
        message: "{{ trigger.event.data.text }}" 
        data:
            type: tts

I managed to setup the telegram bot actionable notification with this guide.

1 Like