Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Introduction

Telegram is a widespread messaging service for all kinds of platforms and devices (similar to WhatsApp).
While WhatsApp only supports sending end-to-end messages from one physical mobile phone number to another, Telegram allows the creation of custom "Bots".

...

Write down the chat ID, in this case "569011464", because we'll need it in the next step.

(tick)(tick) Well done, you have now finished setting everything up. Now let's configure your telegram bot within the NETx BMS Core Server.

...

All done. You are now able to send messages to your custom bot within the NETx BMS Platform.

Send a

...

message via XLogic

As mentioned in the Messenger module configuration, NETx BMS Platform ships with pre-built messenger Commands.
We can use the "MESSENGER.SENDTELEGRAMMESSAGE" Command to send a test message to our bot.

...

Select the "MESSENGER.SENDTELEGRAMMESSAGE" Command, enter the name of the previously configured profile and a test message.
Click "Execute". You should now receive the entered message within the Telegram application on your mobile phone.


Nice job! You can now use this Telegram messenger profile whenever you want to send a message to your bot (for example in an action within the Web Manager).

Send a message via LUA

you can send telegram message within LUA scripts. To do so, you have to use the LUA function XMessage.

XMessage is general LUA function that can be used to send notification and visualization message via LUA. For sending telegram messages, the following parameter values must be used:

  1. Device: not used for sending Telegram messages. Leave it empty.
  2. User: not used for sending Telegram messages. Leave it empty.
  3. Type: the string value "Telegram" must be used.
  4. Profile: enter the name of your Telegram profile that you want to use to send the message.
  5. Message: message text as string.

For sending a Telegram message with profile "Tutorial", use the following LUA code:

Code Block
nxa.XMessage("","","Telegram","Tutorial", "Hello from NETx BMS Core Server!")