telegram
Send notifications using telegram
Collection: community.general
Full Name: community.general.telegram
Synopsis
Send notifications using telegram
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| api_args | dict | Any parameters for the method. For reference to default method, V(SendMessage), see U(https://core.telegram.org/bots/api#sendmessage). | ||
| api_host | string | api.telegram.org | Custom telegram API host. | |
| api_method | string | SendMessage | Bot API method. For reference, see U(https://core.telegram.org/bots/api). | |
| token | string | yes | Token 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