telegram - module for sending notifications via telegram

New in version 2.2.

Synopsis

Parameters

Parameter Choices/Defaults Comments
chat_id
required
Telegram group or user chat_id
msg
required
What message you wish to send.
msg_format
(added in 2.4)
    Choices:
  • plain ←
  • markdown
  • html
Message format. Formatting options `markdown` and `html` described in Telegram API docs (https://core.telegram.org/bots/api#formatting-options). If option `plain` set, message will not be formatted.
token
required
Token identifying your telegram bot.

Notes

Note

  • You will require a telegram account and create telegram bot to use this module.

Examples

- name: send a message to chat in playbook
  telegram:
    token: '9999999:XXXXXXXXXXXXXXXXXXXXXXX'
    chat_id: 000000
    msg: Ansible task finished

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
msg
string
success
The message you attempted to send

Sample:
Ansible task finished
telegram_error
string
failure
Error message gotten from Telegram API

Sample:
Bad Request: message text is empty


Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

Maintenance

This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.

For a list of other modules that are also maintained by the Ansible Community, see here.

Author

  • Artem Feofanov (@tyouxa)

Hint

If you notice any issues in this documentation you can edit this document to improve it.