PARALLAX

telegram

Send notifications using telegram

Collection: community.general

Full Name: community.general.telegram

Synopsis

Send notifications using telegram

Parameters

NameTypeRequiredDefaultDescription
api_argsdictAny parameters for the method. For reference to default method, V(SendMessage), see U(https://core.telegram.org/bots/api#sendmessage).
api_hoststringapi.telegram.orgCustom telegram API host.
api_methodstringSendMessageBot API method. For reference, see U(https://core.telegram.org/bots/api).
tokenstringyesToken identifying your telegram bot.

Example

yaml
- name: Send notify to Telegram
  community.general.telegram:
    token: '9999999:XXXXXXXXXXXXXXXXXXXXXXX'
    api_args:
        chat_id: "000000"
        parse_mode: "markdown"
        text: "Your precious application has been deployed: https://example.com"
        disable_web_page_preview: true
        disable_notification: true

- name: Forward message to someone
  community.general.telegram:
    token: '9999999:XXXXXXXXXXXXXXXXXXXXXXX'
    api_method: forwardMessage
    api_args:
        chat_id: "000000"
        from_chat_id: 111111
        disable_notification: true
        message_id: '{{ saved_msg_id }}'

- name: Send notify to custom telegram API host
  community.general.telegram:
    token: '9999999:XXXXXXXXXXXXXXXXXXXXXXX'
    api_host: "telegram.example.com"
    api_args:
        chat_id: "000000"
        parse_mode: "markdown"
        text: "Your precious application has been deployed: https://example.com"
        disable_web_page_preview: true
        disable_notification: true
Search
    ↑ ↓ move↵ openesc close