Hi. I’ve found information from Github and that you could utilise Telegram app tp send messages using this kind of URL
tg://msg?text={{SOMETEXT}}&to={{PHONENUMBER}}
but fail to get it work in Shortcuts (Mac or iPhone).
Shortcuts does ask if it can open Telegram, but absolutely nothing happens on Mac and on iPhone the message gets into “Saved Messages” view’s text field. And neither one sends it to recipient.
In order for Shortcuts to send something to that person on Telegram, that person has to first be 1) saved as a contact in Telegram, and 2) saved as a contact on your phone. I realized that when I was getting an error, the contact on my phone was not properly synced with the contact details of that person’s Telegram contact info. I added those details to my phone contact record for that person and merged any duplicate contacts.I was then able to execute actions as a message to this person’s contact in Telegram.
This extra step may not matter, but I also noticed that the Telegram URL for this person’s contact (not sure how it got there in the first place) was not functional because I clicked on it and it returned a Telegram error page. I then updated the URL with the person’s correct or perhaps ‘updated’ “@“ username and that one opened their profile in Telegram. I saved the updated URL in my phone’s contact record for them. I.e. https://t.me/@[Telegram username]
Again, not sure if this last mention helped or not, but it was something I did.