Telegram binding, getActions() and JSR223 / python

I disabled the old telegram action and installed the binding. The channels work and I see messages I send to the configured chat. But the way back fails and sending telegram messages is what I really want.
I try to send a telegram message from a JSR223 / python script and I can’t get the call to getActions() done. Whatever I tried, I either got a NameError: global name ‘getActions’ is not defined
or an Attribute Error object has no attribute ‘getActions’. Tried it on event, ir, the function or with no object.

There is an Telegram Actions example at https://openhab-scripters.github.io/openhab-helper-libraries/Guides/Actions.html#actions, but that relates to the old Telegram action, not the new Binding, as far as I understood it.

What is it I’m missing?
Thanks in advance for any pointers

(edited twiceto reflected my further searches)

How does this work for you (replace <uid> with the proper UID)?

            # no import needed
            actions.get("telegram", "telegram:telegramBot:<uid>").sendTelegram(u"Message to send")

works like a charm, thanks Scott!

1 Like