Call (Telegram) Actions with blockly

Hi,

i want to send a message via Telegam action with blockly. Is it possibly?

At the moment i use an ECMAScript that looks like this:

var telegramAction = actions.get("telegram", "telegram:telegramBot:XXXXX")
telegramAction.sendTelegram("XXX", "Adjust Kitchen Temperature")

Is it possible to call telegram action (or in general any action) via blockly?

Greetings

Not yet. If you need to call Actions you need to write the code.

Ok. Is it possible to call an other ECMAScript from a blockly script with a parameter?

If this is possible i can write one Script that sends the message and i can pass the message text as an parameter to the script.

I don’t think that is supported yet either. Blockly is really basic. When you start to move beyond basic, writing the code by hand may be a better idea anyway.

To do it from JavaScript text though see OH 3 Examples: Writing and using JavaScript Libraries in MainUI created Rules.

1 Like

Ok. Is it possible to call an other ECMAScript from a blockly script with a parameter?

Yes it is by now. Check out the first post here.. I will soon add it the Blockly Reference as well

Also a custom block haa been provided here for download: Telegram

1 Like

This are great news