Use case
In this use case we will automatically send a Telegram message notifying the reporter of the issue about its status. The message will be delivered to a dedicated Telegram chat. After sending, we will save the response status in the description field.
🗒️ Prerequisites
For this use case, we need a Telegram bot (create or use an existing one), a Connection for communicating with Telegram and a Custom action for executing the send message operation.
Telegram bot
Create a new Telegram bot or make sure you have access to your bot API token of your Telegram account.
Create a connection
Configure the connection either inside the post function configuration or within the Remote actions page in the Manage apps administration by setting the following input.
Name
Telegram
Connection type
Choose External.
Base URL
https://api.telegram.org
Authentication
Choose No authentication.
Create a custom remote action
Create the action either inside the post function configuration or within the Remote actions page in the Manage apps administration by setting the following input.
Name
Notify the reporter
Method
Choose POST.
Default connection
Choose Telegram.
REST path
The BOT_API_TOKEN is the one you get as soon as a new bot is created.
/BOT_API_TOKEN/sendMessage?{chat_id}&{text}
The values used below are created for the example only. Please provide real input from your instance for making the use case realistic.
Parameters
chat_id
The chat_id is an unique identifier for the target chat or username of the target channel. In this case you can use the chat id we provide as follows:
-1001535712522
text
The ticket %{issue.key}-%{issue.summary} was transitioned to status %{issue.status}.
⚒️ Configuration
Add the Execute remote action post function to the desired transition or create a new transition and choose the Expert mode.
Select action
Choose the previously created action which we named Notify the reporter.
Select connection
The default connection of the selected action should be preselected, which is Telegram.
Update issue fields (optional)
Other default options like Response body, Response status or Set field value manually are available in any mode in the post function.
Select the field to be set.
Choose Description.
Set the value.
Choose Response status.