function main (userId)
SendEmailMessage("address@company.com",
"Cooler malfunction. Low oil level.",
"Cooler error #12 has occurred.
Низкий уровень масла.
");
end
The function is available since WebHMI 2.7.4710 version.
==== SendTelegramMessage(chatId, message) ====
The SendTelegramMessage function sends a message with the text **message** to the chat with Id = **chatId**. Returns 1 if an error occurred and 0 if successful. Success does not mean delivering a message, but only success when creating a query. To use this function, you must have an Internet connection, an account in the [[level2:introduction_to_level2| Level2]] system. The service is free.
To get ChatId, go to [[http://telegram.me/webhmibot]] on your mobile phone (by pre-installing Telegram) and start the dialog with bot webhmibot using the /start command. In response you will receive a message with a unique chatId.
Example:
{{ network:telegram_screenshot.png?direct&400 |}}