OH3 ECMA telegram send message script help

Platform information:
    Hardware: Raspberry pi 4
    OS: raspbian
    Java Runtime Environment: 8
    openHAB version: 3.1
Issue of the topic:

Could anyone please advise how to send a simple message using telegram using ECMA (and not dsl) code? I know its all correctly working and configured using the DSL code provided in the wiki but the problem is I want to incorporate this added line into an existing ECMA script instead.

I’ve unsuccessfully tried:

var OPENHAB_CONF = Java.type('java.lang.System').getenv('OPENHAB_CONF');
load(OPENHAB_CONF + '/automation/lib/javascript/core/actions.js');
Telegram.sendTelegram("telegramBot:717f3621c2", "Test")

Any suggestions? Many thanks in advance!

Keyword is “action”
Old but still valid I think -

Thats fixed it, thank you very much! I’m not sure how I missed that

1 Like