Logo
ХелпдескУправление знаниямиБизнесуТарифыЧто такое KCS?Блог
Русский
Личный кабинет
Автоматизации и интеграции
© 2023 - 2026 ООО «Свормика». Swarmica - Платформа управления знаниями и ресурсами техподдержки. Версия: 6.1.2

#1803: How to set up sending notifications about Swarmica events to Telegram

Отредактирована: сегодня

Instruction

To set up notifications in Telegram, you need the following:

  • A link to send messages through a chat bot of the form https://api.telegram.org/bot<TOKEN>/sendMessage
  • Chat ID (ChatID)
  1. Log in to Swarmica as Administrator.

  2. Create a webhook in Settings - Outgoing Webhooks, enter Name, URL, Method - POST, and in the Data field, enter data of the form:

{
  "text": "<message_text>",                     # notification text template
  "parse_mode": "markdown",                     # notification text formatting type
  "disable_web_page_preview": true|false,       # disabling the preview. You can disable (set true) to avoid cluttering the chat screen
  "disable_notification": true|false,           # disabling the notification on the end device (for example, a mobile phone). To disable, set true
  "reply_to_message_id": null|"<message_id>",   # the message will be sent as a response to another message. Set null explicitly to avoid accidental response.
  "chat_id": "<ChatID>"                         # chat ID
}

Click Save.

It should look something like this:

More details on forming the notification text can be found here.

  1. On the next page, in the Headers field, add data of the form:
{
  "accept": "application/json",
  "User-Agent": "<Sender_identificator>",
  "content-type": "application/json"
}

Here, "User-Agent" is the message source identifier. For example, you can specify "Swarmica telegram bot".

Click Save.

It should look something like this:

  1. Create an action for the event in Settings - Actions for Event - Create - Outgoing Webhook.

  1. On the next page, enter the Name, select the created webhook as Action, choose the Event Type, set the necessary conditions, set the Status to enabled, and click Save. For example, for the event of creating a new request, the settings would look like this: