Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion source/_integrations/telegram_bot.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ data:

## Notification actions

Available actions: `send_message`, `send_photo`, `send_video`, `send_animation`, `send_voice`, `send_sticker`, `send_document`, `send_location`, `edit_message`, `edit_caption`, `edit_replymarkup`, `answer_callback_query`, `delete_message`, `leave_chat` and `set_message_reaction`.
Available actions: `send_message`, `send_photo`, `send_video`, `send_animation`, `send_voice`, `send_sticker`, `send_document`, `send_location`, `edit_message`, `edit_message_media`, `edit_caption`, `edit_replymarkup`, `answer_callback_query`, `delete_message`, `leave_chat` and `set_message_reaction`.

Actions that send contents (`send_*`) will return a list of `message_id`/`chat_id` for messages delivered (in a property called `chats`). This will populate [Response Data](/docs/scripts/perform-actions#use-templates-to-handle-response-data) that you can further utilize in your automations to edit/delete the message later based on the `message_id`. See the example later on this page for usage instructions.

Expand Down Expand Up @@ -396,6 +396,26 @@ Edit a previously sent message in a conversation.
| `disable_web_page_preview` | yes | True/false for disable link previews for links in the message. |
| `inline_keyboard` | yes | List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data or external URL (https-only). Example: `["/button1, /button2", "/button3"]` or `[[["Text btn1", "/button1"], ["Text btn2", "/button2"]], [["Google link", "https://google.com"]]]` |

### Action `telegram_bot.edit_message_media`

Edit a previously sent message media in a conversation.

| Data attribute | Optional | Description |
| -------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `config_entry_id` | yes | The config entry representing the Telegram bot to edit the message media. Required if you have multiple Telegram bots.|
| `message_id` | no | Id of the message to edit. When answering a callback from a pressed button, the id of the origin message is in: {% raw %}`{{ trigger.event.data.message.message_id }}`{% endraw %}. You can use `"last"` to refer to the last message sent to `chat_id`. |
| `chat_id` | no | The chat_id where to edit the message media. |
| `timeout` | yes | Timeout for sending the media in seconds. Will help with timeout errors (poor internet connection, etc) |
| `media_type` | no | The media type: `animation`, `audio`, `document`, `photo` or `video`. |
| `url` | no | Remote path to the media. |
| `file` | no | Local path to the media. |
| `caption` | yes | The title of the media. |
| `authentication` | yes | Define which authentication method to use. Set to `basic` for HTTP basic authentication, `digest` for HTTP digest authentication, or `bearer_token` for OAuth 2.0 bearer token authentication. |
| `username` | yes | Username for a URL which requires HTTP `basic` or `digest` authentication. |
| `password` | yes | Password (or bearer token) for a URL that requires authentication. |
| `verify_ssl` | yes | True/false for checking the SSL certificate of the server for HTTPS URLs. Defaults to True. |
| `inline_keyboard` | yes | List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data or external URL (https-only). Example: `["/button1, /button2", "/button3"]` or `[[["Text btn1", "/button1"], ["Text btn2", "/button2"]], [["Google link", "https://google.com"]]]` |

### Action `telegram_bot.edit_caption`

Edit the caption of a previously sent message.
Expand Down