Sending Telegram Messages with FairBot

Submitted by admin on Thu, 09/25/2025 - 15:20

Introduction

FairBot is a professional trading application for Betfair that enables users to automate strategies and respond to market events in real time. To help users stay instantly informed, FairBot now supports integration with Telegram, a free messaging platform that is considered relatively secure and allows automated bots to send messages.

Previously, FairBot included the Send Email Message feature. However, due to the lack of support for modern authentication methods, it does not work with major email providers such as Gmail, Hotmail, and Yahoo. To provide a more reliable and flexible solution, the Send Telegram Message feature has been introduced.

With this integration, FairBot can:

  • Send alerts directly to you.

  • Notify a group of users at once.

In this article, you will learn how to create a Telegram bot, connect it to a user or group, integrate it with FairBot, and build a simple automation strategy that delivers real-time notifications.

 

Prerequisites

Before setting up Telegram integration, make sure you have:

  • FairBot version 4.5 or newer (trial or paid).

  • A Telegram account with access via desktop or mobile app.

 

Creating a Telegram Bot

To send messages from FairBot, you need a dedicated Telegram bot. This is created through BotFather, the official Telegram bot for managing other bots.

Follow these steps:

  1. Open BotFather

    • In the Telegram app, search for BotFather (a verified account with a blue checkmark).

    • Start a chat and press Start.

      BotFather Start

  2. Create a New Bot

    • Type the command "/newbot" to start the bot creation process.

      BotFather New Bot

    • Choose a Bot Name

      BotFather will first ask you to enter a name for your bot. This is the display name users will see in chats and search results. Pick a name that is clear and descriptive, such as "FairBot Notifier" or "Bet Alerts Bot".

    • Choose a Username

      After entering the bot name, BotFather will prompt you for a username. This must be unique across all Telegram bots and must end with "bot" (e.g., `FairBotNotifier_bot`). Usernames cannot contain spaces and must only use letters, numbers, and underscores.

  3. Get the API Token

    • Once the bot is created, BotFather provides an API token (a long string of numbers and letters).

    • Copy and save this token securely — you’ll need it later in FairBot.

      BotFather Bot Token

  4. Optional Customization

    • You can use BotFather commands to set a profile picture, description, or about text for your bot. These steps aren’t required, but can help make the bot look more polished.

► Important: Keep your API token private. Anyone with access to it can control your bot.

At this stage, your Telegram bot is active and ready to be connected to FairBot.

 

Connecting the Bot to a User

Before FairBot can send messages to a user, the user must start a conversation with the bot. Telegram requires this step to ensure the bot is allowed to send messages.

Follow these steps:

  1. Find Your Bot

    • Open Telegram and search for your bot using its username (the one ending in “bot” you set up in BotFather).

      Telegram Bot Search

  2. Start the Chat

    • Open the chat with your bot and press Start.

      Telegram Bot Start

    • Send any message (for example, “Hello”). This initial message is necessary; otherwise, the bot cannot send messages to that user

      Telegram Bot Hello

Once the user has started a chat with the bot, it is ready to receive messages via FairBot automation.

 

Connecting the Bot to a Group

FairBot can also send messages to a Telegram group, enabling multiple users to receive alerts simultaneously. To set this up, you need to add the bot to the group and configure permissions.

Follow these steps:

  1. Create or Open a Group

    • You can use an existing Telegram group or create a new one.

    • Ensure the group includes all users who should receive notifications.

  2. Add the Bot to the Group

    • Open the group settings, select Add Members, and search for your bot by its username.

    • Add the bot to the group.

  3. Adjust Permissions

    • Make sure the bot has permission to send messages in the group. Without this, FairBot will not be able to post notifications.

Once added and granted permissions, the bot is ready to send messages to the group when integrated with FairBot.

 

Integrating the Bot with FairBot

After creating your Telegram bot and connecting it to users or groups, the next step is to link it to FairBot. This allows FairBot to send notifications directly via your bot.

Follow these steps:

  1. Open FairBot Options

    • Go to the ToolsOptions window in FairBot.

    • Navigate to 3rd Party IntegrationsTelegram.

  2. Enter the Bot Token

    • Paste the API token from BotFather into the Telegram Bot Token field.

  3. Test the Connection

    • Click the “Test Connection…” button to ensure FairBot can communicate with your bot. If the test is successful, the bot is ready to receive messages triggered by your automation strategies.

    FairBot Telegram Options

With the bot integrated, you are now ready to create strategies that send notifications to a user or group.

 

Creating a Simple Strategy to Send Telegram Messages

Once your Telegram bot is integrated with FairBot, you can create an automation strategy that sends notifications to a user or group. Below, we create a strategy that sends a notification when a market turns in-play.

Follow these steps:

  1. Open the Strategy Editor

    • In FairBot, open the Strategy Editor and create a new strategy. Give it a name, for example: My Telegram Notifier Strategy.

  2. Add a New Rule

    • Click Add Rule to define the event that will trigger the Telegram message.

  3. Configure General Settings

    • Set the settings as shown in the screenshot below.

    Strategy Rule General

  4. Set up the Action Tab Options

    • In the Rule Editor, switch to the Action tab.

    • From the list of available actions, select Send Telegram Message. This tells FairBot to send a message when the rule is triggered.

    • Click the "<-- Auto Detect the Chat_ID..." button. FairBot will scan for users or groups that have interacted with your bot. If only one user or group is found, FairBot will automatically fill in the Chat_ID field. If multiple options are found, a pop-up window will appear showing the available Chat_IDs, allowing you to select the desired user or group. Once selected, the Chat_ID field will be filled in for you.

    • If the Chat_ID is not detected, make sure you have started a conversation with your Telegram bot, or that your bot has been added to the group and has permission to send messages. Only users or groups that have interacted with your bot recently will appear for selection.

    • In the Message field, enter the text you want to send. For example: "{$MARKET_NAME}" turned in-play at {$CURRENT_TIME}.. You can use variables like `{$MARKET_NAME}` and `{$CURRENT_TIME}` to include dynamic information in your message.

    Strategy Rule Action

  5. Configure Conditions

    • On the Conditions tab, add the following conditions as shown in the screenshot below:

    Strategy Rule Conditions

  6. Close and Save the Strategy

    • Close the Strategy Editor and save your changes.

    • The strategy is now ready for testing.

 

Testing the Strategy

After creating and saving your strategy, it’s important to test it to ensure Telegram messages are delivered correctly.

Follow these steps:

  1. Select a Market

    • Open a market where your strategy should apply.

  2. Assign the Strategy

    • Open the market view (Grid or Ladder) and go to the Automation tab on the right-hand side.

    • Select your strategy from the Strategy drop-down list.

    • Once selected, the strategy is active and will run automatically on that market.

    • Wait for the market to turn in-play.

  3. Check Telegram Messages

    • Verify that messages are delivered to the intended user or group.

    • Confirm that the content matches your message template (e.g., “Market [Market Name]” turned in-play at [Current Time]).

  4. Adjust if Necessary

    • If messages are not sent or are incorrect, review your rule conditions, Chat_ID, and bot settings in FairBot.

    • Make any necessary adjustments and retest.

Once the strategy successfully sends messages during testing, it is ready for regular use on live markets.

 

Conclusion

The new facility to send Telegram messages in FairBot transforms how users receive notifications. With this feature, strategies can deliver instant, customised alerts to individuals or groups whenever key market events occur. This means you can react quickly, collaborate more easily, and stay informed without constantly monitoring markets/strategies. This feature makes FairBot strategies smarter and more responsive to your needs.