![]() |
Telegram group - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Application Store (https://forum.logicmachine.net/forumdisplay.php?fid=11) +--- Thread: Telegram group (/showthread.php?tid=5552) |
Telegram group - CristianAgata - 03.08.2024 Hi community, I need to create telegram company group where send LM5 notifications. Someone has already done? My will it is send event notifications simultaneously at 10 users. I already thanks all can help me. Best regards Cristian RE: Telegram group - CristianAgata - 03.08.2024 (03.08.2024, 15:19)CristianAgata Wrote: Hi community, A little update, i've reached to do that...... The only thing it is thst I don't know how..... I've done done something without understand why ![]() ![]() ![]() If someone have a guide he is welcome. have a good weekend. BR Cristian RE: Telegram group - AlexLV - 03.08.2024 Hi Cristian, not sure about company (business??) telegram account, but you can send info to many telegram users, but only one can send commands to LM: https://forum.logicmachine.net/showthread.php?tid=4692 And look this for telegram usage, hope it helps you: https://forum.logicmachine.net/showthread.php?tid=2666&pid=29437#pid29437 Alex RE: Telegram group - CristianAgata - 04.08.2024 (03.08.2024, 17:38)AlexLV Wrote: Hi Cristian, Hi Alex, Thanks for your answer, what I have to do it is a little bit different. A LM5 must send via telegram all the notification event to many users (a telegram group in my case) and the client as administrator can add or remove users. Anyway I reach and it works fine. As fast as possible I will post a list of operation as configure. BR Cristian RE: Telegram group - admin - 05.08.2024 For groups, when looking for chat id using getUpdates API call find chat where type is supergroup. Note that chat id can start with a minus (negative number). If sending messages is not working then check the API response, point nr.6 here: https://kb.logicmachine.net/notifications/telegram/ RE: Telegram group - AlexLV - 05.01.2025 Hi, is possible more in detail describe how to find new created group ID? In same places I also found that bot should be added into new group. Also I open web telegram, try to find group id there. With group ID I taken from web telegram message was not sent. Log: * arg: 1 * string: {"ok":false,"error_code":400,"description":"Bad Request: chat not found"} * arg: 2 * number: 400 BR, Alex RE: Telegram group - admin - 06.01.2025 You must add your bot to the group first. RE: Telegram group - AlexLV - 06.01.2025 Hi, I add my existing bot into new group, when trying send command message, I see such log: * arg: 1 * string: receive error * arg: 2 * string: error:0A000126:SSL routines::unexpected eof while reading from resident tgread script: function callback(text, userid, username) log(text, userid, username) if (text == "AlexOn") then grp.write('0/2/3', 1) end if (text == "AlexOff") then grp.write('0/2/3', 0) end if (text == "TeraseOn") then grp.write('0/4/4', 1) end if (text == "TeraseOff") then grp.write('0/4/4', 0) end end token = 'here my token' require('user.tgupdates')(token, callback) What I did wrong? Of course I changed group id to new, Also I see incoming messages from SL in group, I receive error in SL when trying to send command message from group Alex RE: Telegram group - AlexLV - 07.01.2025 Strange, but today suddenly begin to work.. No any changes from my side was done.. (Telegram side??) So steps: 1. Create new tg group. 2. Add members to tg group. 3. Add your bot to group. I also added bot to admins of group and gave access to messages. 4. Send message into your group. 5. Using getUpdates API call find chat where type is supergroup. (https://kb.logicmachine.net/notifications/telegram/ p.4) 6. Change chat_id to taken from supergroup in user.telegram library (Scripting --> User libraries) 7. Test it. ![]() Alex |