Telegram

Telegram is a free and open source, cross-platform, cloud-based instant messaging software. The service also provides end-to-end encrypted video calling.

Integration with LogicHub

Connecting with Telegram

To connect to Telegram following details are required:

📘

How to Get Bot Access Token

To get the Bot token, perform the following steps:

  1. Open Telegram and log in to your account.
  2. In the search field, look up for BotFather and press to open it.
  3. Press the Start button to initiate a conversation.
  4. Type /newbot in the message field and press send button.
  5. Choose a name in the first step and username in the next, a token will be generated that can be used to access the HTTP API that looks like this: 110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw
  6. Go back on the app, and search the name of your bot or click on the newly created link provided in the Bot message. This will open your Bot chat window.
  7. Press the Start button to start typing your message.

Send Message

This action will send the text messages.

Inputs to this Action

  • Connection: Choose a connection that you have created.
  • Jinja Template Chat ID: Jinja templated string containing the chat ID. e.g. {{chat_id}}.
  • Jinja Template Messages to Send: Jinja templated string containing text message to be sent. e.g. {{msg}}.

📘

How to Get Chat ID

To get chat ID, perform the following steps:

  1. Open Telegram and log in to your account.
  2. In the search field, look up for IDBot and press to open it.
  3. Press the Start button to initiate a conversation.
  4. Type /getid in the message field and press send button.
    You will receive a chat ID that looks like this: 160777333

Output of Action
An object containing the following fields:

{
   "ok":true,
   "result":{
      "message_id":34,
      "from":{
         "id":16685402536,
         "is_bot":true,
         "first_name":"ChecklhBot",
         "username":"Checklhub_bot"
      },
      "chat":{
         "id":1460777333,
         "first_name":"Alice",
         "last_name":"Morgan",
         "username":"Alicemorgan2",
         "type":"private"
      },
      "date":1624979150,
      "text":"Hello Telegram"
   },
   "error":null,
   "has_error":false
}

Did this page help you?