# Call (Telegram) Actions with blockly

**URL:** <https://community.openhab.org/t/call-telegram-actions-with-blockly/110754>\
**Category:** Scripts & Rules\
**Tags:** blockly\
**Created:** [December 21, 2020, 6:47pm UTC](https://community.openhab.org/t/call-telegram-actions-with-blockly/110754 "2020-12-21T18:47:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christian\_Kittel](https://community.openhab.org/user_avatar/community.openhab.org/christian_kittel/32/42548_2.png) [@Christian\_Kittel](https://community.openhab.org/u/Christian_Kittel)\
**Post date:** [December 21, 2020, 6:47pm UTC](https://community.openhab.org/t/call-telegram-actions-with-blockly/110754/1 "2020-12-21T18:47:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rlkoshak](https://community.openhab.org/user_avatar/community.openhab.org/rlkoshak/32/75251_2.png) [@rlkoshak](https://community.openhab.org/u/rlkoshak)\
**Post date:** [December 22, 2020, 12:06am UTC](https://community.openhab.org/t/call-telegram-actions-with-blockly/110754/2 "2020-12-22T00:06:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Christian\_Kittel](https://community.openhab.org/user_avatar/community.openhab.org/christian_kittel/32/42548_2.png) [@Christian\_Kittel](https://community.openhab.org/u/Christian_Kittel)\
**Post date:** [December 22, 2020, 8:36am UTC](https://community.openhab.org/t/call-telegram-actions-with-blockly/110754/3 "2020-12-22T08:36:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rlkoshak](https://community.openhab.org/user_avatar/community.openhab.org/rlkoshak/32/75251_2.png) [@rlkoshak](https://community.openhab.org/u/rlkoshak)\
**Post date:** [December 22, 2020, 2:57pm UTC](https://community.openhab.org/t/call-telegram-actions-with-blockly/110754/4 "2020-12-22T14:57:35Z")

</div>

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](https://community.openhab.org/t/oh-3-examples-writing-and-using-javascript-libraries-in-mainui-created-rules/108526).

---

<div class="post-metadata">

**Author:** ![stefan.hoehn](https://community.openhab.org/user_avatar/community.openhab.org/stefan.hoehn/32/81928_2.png) [@stefan.hoehn](https://community.openhab.org/u/stefan.hoehn)\
**Post date:** [December 25, 2021, 8:28pm UTC](https://community.openhab.org/t/call-telegram-actions-with-blockly/110754/5 "2021-12-25T20:28:43Z")

</div>

> 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.](https://community.openhab.org/t/extending-blockly-with-new-openhab-commands/127169/1). I will soon add it the [Blockly Reference as well](https://community.openhab.org/t/blockly-reference/128785/1)

Also a custom block haa been provided here for download: [Telegram Actions](https://community.openhab.org/t/telegram/130507)

---

<div class="post-metadata">

**Author:** ![Christian\_Kittel](https://community.openhab.org/user_avatar/community.openhab.org/christian_kittel/32/42548_2.png) [@Christian\_Kittel](https://community.openhab.org/u/Christian_Kittel)\
**Post date:** [December 26, 2021, 9:41am UTC](https://community.openhab.org/t/call-telegram-actions-with-blockly/110754/6 "2021-12-26T09:41:53Z")

</div>

This are great news
