Step by step, sending a notification to the telegram group with the telegram bot (with Action)

HBT
Silver 4
Silver 4
  • Creating a Telegram Robot    
  • Type @Botfather in Telegram search. Botfather is considered the father of all robots and all robots are created with @Botfather.              HBT_3-1644068383045.png                           
  • Click on Botfather. Type /help in the message screen that will open. All commands related to the BotFather object are displayed

 HBT_4-1644068480514.png

 

  • Click on /newbot or type /newbot followed by the name you want to give the robot and press enter. For example: RBrother_bot (BOT NAME must end with 'bot')

    

 

 

 

  • Edit the robot's display name with /setname. Example: Robot Brother
  • To learn Bot ID and Token, type /Token and press enter

HBT_5-1644068638365.png

 

  • Create a new TELEGRAM group, add the people you want to add to this group.
  •  To send messages via Telegram API and robot, you will need your Group's ID and your Robot's ID and Token. Various tools are available to obtain this ID.  Add the @RawDataBot bot to your group. After adding the Telegram Bot Raw bot, it will automatically show information about your Group.

HBT_6-1644068721211.png

  •  Once you know the group ID, you can delete @RawDataBot from the group.

Now that we have the Group ID and Robot ID and Token, we can create the Telegram API format.

https://api.telegram.org/bot{botIDAndToken)/sendMessage?chat_id=GroupID&text

https://api.telegram.org/bot5165294646:AAF8svNYwB2dZXEcgxirfg4hPPS-KNZgY6w/sendMessage?chat_id=-7911... 

To make sure that the API is working, you can test it by using your own Bot ID, Token, Group ID, and paste the link into the address bar of Google Chrom. 

What we will do for Telegram Bot is complete.

 

  • Now let's look at what we will do in our app   

             In the Behavior Section, add a New Action,    

Action Name : AppsheetToTelegram

For Record Table:YourTableName

Do This : External: go to a website

Target: 

 

"https://api.telegram.org/bot5165294646:AAF8svNYwB2dZXEcgxirfg4hPPS-KNZgY6w
/sendMessage?chat_id=-791179187&text="&
"★"&CONCATENATE(NOW(),"Please count this product: " ,
         SELECT(ITEMSTABLE[NAME],
               [ID]=[_THISROW].[ YourTableNameID]
               )
             )

 

You can add the message you want to the link and send it to the telegram group via bot. A bot can be added to different groups. With a single bot, you can notify more than one group in different ways in your application.

6 1 11.9K
1 REPLY 1

Ami
Bronze 5
Bronze 5

 Very cool

I was looking around for this and also for a way to get the responses back to google sheets so i can start a topic via appsheet and see the team's responses in the app as well

Top Labels in this Space