Telegram

Version: 2.0.0

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

Connect Telegram with LogicHub

  1. Navigate to Automations > Integrations.
  2. Search for Telegram.
  3. Click Details, then the + icon. Enter the required information in the following fields.
    • Label: Enter a connection name.
    • Reference Values: Define variables here to templatize integration connections and actions. For example, you can use https://www.{{hostname}}.com where, hostname is a variable defined in this input. For more information on how to add data, see 'Add Data' Input Type for Integrations.
    • Verify SSL: Select option to verify connecting server's SSL certificate (Default is Verify SSL Certificate).
    • Remote Agent: Run this integration using the LogicHub Remote Agent.
    • Bot Key: Enter Bot key for the Telegram instance. See details How do bots work.
  4. After you've entered all the details, click Connect.

📘

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.

Actions for Telegram

Send Message

This action will send the text messages.

Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

Input NameDescriptionRequired
Chat IDJinja-templated string containing the chat ID.
Example: {{chat_id}}.
Required
Messages to SendJinja-templated string containing text message to be sent.
Example: {{msg}}.
Required

📘

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

A JSON object containing multiple rows of result:

{
   "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
}

Release Notes

  • v2.0.0 - Updated architecture to support IO via filesystem

© Devo Technology Inc. All Rights Reserved.