How do I send message to Telegram group?

I want to retrieve the subject header of all unread emails from a Gmail account and send a message with the subject header to a Telegram group. Do I need to install any Telegram package? After creating a Telegram group, what activity can I use to send the message to the group?

HI @ekewaka Welcome to the community. I don’t have first hand experience using telegram api. But as far as i understand you have follow the below steps:

Sending Message to a Telegram Group:

  1. Install the Required Package: You need to install the UiPath.Web.Activities package to work with HTTP requests.
  2. Configure Telegram API Integration: To send messages to a Telegram group, you need to create a bot on Telegram and obtain the bot token.
  3. Use HTTP Request to Send Message: Use the HTTP Request activity to send a message to the Telegram group. Set the activity’s properties as follows:
  • Method: POST
  • Endpoint: https://api.telegram.org/bot<your-bot-token>/sendMessage
  • Headers: Add “Content-Type” with value “application/x-www-form-urlencoded”
  • Body: Add the necessary parameters, such as “chat_id” (the ID of the Telegram group) and “text” (the message content).

Replace <your-bot-token> with your actual bot token and <group-chat-id> with the ID of your Telegram group chat.

I have also seen this one project in Marketplace

Please go through the below link as well, might be helpful

Hope it helps

2 Likes

Hi @ekewaka ,
You can install package activity for telegram

image

or you can use telegram web with activity

regards,
LNV

I don’t receive any Telegram message after doing the below steps:

  1. Install the UiPath.Web.Activities package to work with HTTP requests.
  2. Create a bot on Telegram and obtain the bot token.
  3. Use HTTP Request to Send Message: Use the HTTP Request activity to send a message to the Telegram group. Set the activity’s properties as follows:
  • Method: POST
  • Endpoint: https://api.telegram.org/bot<your-bot-token>/sendMessage
  • Headers: Add “Content-Type” with value “application/x-www-form-urlencoded”
  • Body: Add the necessary parameters, such as “chat_id” (the ID of the Telegram group) and “text” (the message content).
    Replace <your-bot-token> with your actual bot token and <group-chat-id> with the ID of your Telegram group chat.

image


image

there is also no errors. Did I do anything wrong?
image

You can follow the steps in the following image