Telegram

Introduction

Telegram is an instant messaging app that is simple, fast, secure, and synced across all devices. Through Telegram, brands can easily engage with their customers with rich messaging.

MoEngage <> Telegram

MoEngage and Telegram integration allows you to leverage advanced segmentation, predictive capabilities, personalization, and triggering features to message your users in Telegram using the Telegram Bot through the Telegram APIs.

Integration

library_add_check

Prerequisites

  • Telegram bot: To use this integration, you must have a Telegram bot. When sending Telegram messages, your messages are associated with your Telegram bot official, resulting in users seeing your bot details.
  • Channel Access Token: This allows you to send messages to users who have added your Telegram.
  • Telegram Chat IDs: You must have a Telegram Chat ID to send messages to users on Telegram. The IDs are different from the user's Username.
    After a user adds your Telegram official account, you can access the user’s Telegram ID through Telegram's Users API.

 

info

Information

You can send personalized campaigns only to users with a user identifier (Telegram Chat ID).

Telegram allows you to send promotional and non-promotional messages to users, provided your brand has secured their consent. To send your users, one of the following conditions must be fulfilled

  • Users who have added your Telegram bot
  • Users who haven’t added their Telegram bot but have sent a message to your Telegram bot (excluding users who have blocked your Telegram bot)

Step 1: Collect Your Users' Telegram Chat IDs

To send messages in Telegram, you must collect your users’ Telegram Chat IDs to consistently identify and interact with them. Telegram Chat IDs are not the same as the user’s Telegram usernames. Telegram Chat IDs are generated by Telegram and can be used when interacting with Telegram's APIs.

For more information on getting Telegram Chat IDs for Users, Channels, and Groups, refer here.

Step 2: Save the User's Telegram Chat ID on MoEngage

After obtaining a list of Telegram Chat IDs, you must add them to MoEngage as a telegram_chat_id, a custom-tracked user attribute or property. You can do one of the following:

Step 3: Integrate Telegram with MoEngage

To integrate Telegram with MoEngage, perform the following steps:

  1. On the left navigation menu in the MoEngage dashboard, click App marketplace. The App Marketplace page is displayed.
  2. Search for Telegram.
  3. Click the Telegram tile. The Telegram page is displayed.
  4. Go to the Integrate tab, and click + Add connection.
  5. Enter the following details:
    Field  Description Example
    Connection name Name of the Telegram connection. My Telegram Bot
    Telegram Bot Token Your Telegram Bot token. When a bot is created, it is provided with a unique authentication token. For more information on obtaining and generating tokens, refer to Telegram Bot. 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11

  6. Click Connect. Your Telegram connection is now integrated.

You can now use Telegram to start creating campaigns. 

Step 4: Create a Campaign on MoEngage to Send a Telegram Message

To create a campaign on MoEngage:

  1. On the left navigation menu in the MoEngage dashboard, click Engage, and then click  Campaigns.
  2. On the All campaigns page, click + Create campaign.
  3. On the Create campaign dialog box, under Connected Apps, click Telegram and then click the most suitable delivery type.
  4. Under Select audience, click Filter users by.
  5. On the User property tab, select the segment of users for whom telegram_chat_id exists (you can combine it with other segment criteria).
  6. In step 2 of the campaign, select the pre-configured connectors and specify the content you want to send out. Enter the following details:
    Field Description
    Connector Select a pre-configured connector you want to use.
    Connections Select the connection you added to the MoEngage App marketplace.
    Telegram Chat ID Enter the Telegram Chat ID. It is a unique identifier assigned to each user on the Telegram messaging platform. You can also use Personalization here. If you want to send a message to a channel or a group, refer to Send a Telegram message to the Channel or Group
    Message Enter the message content you want to send. You can also use Personalization here. For more information on Telegram formatting options, refer to Formatting options.
    Formatting Style

    Choose your formatting style based on your message content.
    Choose the preferred format for how Telegram renders messages to your users.

  7. Your campaign is now ready to be tested and sent. Using the Test functionality, you can also test your connector configuration.Screen_Shot_2022-02-22_at_11.12.42_AM.pngIf your test user successfully receives the message, your setup is ready.
  8. Publish the campaign.

Send a Telegram Message to the Channel or Group

Perform the following steps to send campaigns to your Telegram channel or group:

  1. Create a new user in MoEngage to message a channel or a group. Ensure the Telegram Chat ID  here is your channel ID or group ID.
  2. Select the user by creating a segment for it. Ensure only one User is included in the segment. When multiple users are selected for the campaign, the message gets sent to the channel or group many times.
  3. In Step 2 of Create Campaign, enter the Telegram Chat ID of your channel or group. You can also use personalization here. 

Campaign Analytics

MoEngage campaigns provide powerful analytics that allow you to analyze your campaign performances. Each channel in MoEngage provides in-depth metrics that help you quantify your campaign goals. For more information on the MoEngage Analytics functionalities, refer to Campaign Analytics.

By default, we provide the following metrics for Telegram campaigns:

  1. Attempted: After removing the users who breached the frequency capping (FC), Attempted is calculated as the number of users who qualified for the Telegram campaigns and to whom we attempted to send messages.
  2. Failed: Number of users for whom Telegram did not send any message or the users for whom we failed to find any value against the user or event attributes used in the campaign.
  3. Successfully sent: The campaign is marked as successful when Telegram APIs accept the request to send the message to users/groups/rooms (with a 200 status code). For more information on Viber Message API responses, refer to their help documentation.


Previous

Next

Was this article helpful?
1 out of 1 found this helpful

How can we improve this article?