Sending Alert and Request to the Telegram group and channel

Alert and Notification via Request can be sent not only to a personal chat, but also to a group or Telegram channel.

Sending an Alert to a group

1. Add @notification_from_bot to your group. After that, the ID of the group where the bot was added will be sent to the group messages.

2. Copy the group ID and paste it into the Alert settings in Telegram ID field.

3. Make a save.

Sending Alert to the channel

1. Get the channel ID in any way possible (channel ID can be found using third-party services or bots).

2. Add @notification_from_bot to the channel admins.

3. Add the channel ID to the Alert settings in Telegram ID field.

4. Save the bot.

Sending an alert by Request to a group or channel

1. Get the channel/group ID in any available way.

2. Add the bot from where the request will be sent, by the administrator to the channel or by a member to the group.

3. Create SendMessage request to the Telegram API in the constructor.

The request method is GET.

Request URL — https://api.telegram.org/bot1/sendMessage?chat_id=2&text=3

where:

1 — bot token in Telegram

2 — ID of the group or channel to which the message will come (we take the group ID in the User States or through the @BotNotification, the channel ID can be found in third-party sources)

3 — the alert text, use + sign instead of spaces

To send an alert with a Native request, select SendMessage method in the component, add the Request body to the settings:

{
"chat_id": "-12345",
"text": "Checking a request to a channel/group"
}

where 12345 is the ID of your group or channel.

When using Native request, the bot from which the request is sent must also be added to the group/channel where the request is sent.