Telegram

  • Step 1: Building the Bot Flow

  • Create the Initial Flow:
    • Open the bot builder interface. You will see the builder canvas where you can add and connect different components.
    • Add a Start component from the component list on the left. This serves as the entry point for your bot.
    • Connect the Start component to a Name component. The Name component will prompt the user to input their name. You can find this component under the user input section on the left panel.
    • Configure the Name component with an appropriate prompt message for asking the user's name.
  • End the Flow:
    • After the user provides their name, connect the Name component to an End the Flow component to signify the conclusion of the current conversation.
    • Make sure all components are properly connected with arrows that indicate the flow of the conversation.

  • Step 2: Configuring and Testing the Bot

  • Configure Bot Settings:
    • After building your bot flow, navigate to the settings section by clicking the "Setting" button at the top right corner of the builder interface.
    • On the settings page, you'll find various configuration options such as email updates, shortcuts and fuzzy match, webhook services, work schedule and assignment messages, and inactivity messages.
    • Adjust these settings according to your needs. For example, enable webhook services if you want your bot to interact with external systems or set up inactivity messages to handle cases where users do not respond for a specific period.
  • Test Your Bot:
    • Once your bot is configured, use the "Test Bot" button available on the settings page to run a test of your bot. This allows you to interact with your bot as a user and verify that the flow and settings are working as expected.
    • Make any necessary adjustments based on the test results to ensure a smooth user experience.

  • Step 3: Connect with your Telegram Account

  • Navigate to Channels and Add New Channel:
    • Go to your application's dashboard.
    • Select the "Channels" section.
    • Click on the "Telegram" channel.
    • Click on "Add New Channel".
    • You will see a form similar to the one in the screenshot below. Fill out the respective details.

  • Fill Out the Channel Details:
    • Channel Name: Provide a name for your bot.
    • Telegram Id: Enter your Telegram ID.
    • Telegram Bot Username: Enter your Telegram bot's username.
    • Bot: Select "telegram" from the dropdown.
    • Telegram Token: You need a token from your Telegram bot. Follow the steps below to generate this token.
    • Session Timeout: Select the desired session timeout, or leave it as "Default".
    • Publish Status: Set the status to "Publish".

  • Generate Telegram Token:
    • Open your Telegram application.
    • Search for "BotFather" and start a chat with it.
    • Type the command /newbot and press enter.
    • Follow the prompts to create a new bot:
      • Provide a name for your bot when asked.
      • Choose a username for your bot that ends with _bot.
    • Once your bot is created, BotFather will provide a token. Copy this token.
  • Enter the Telegram Token:
    • Return to the "Add New Channel" form.
    • Paste the token you copied from BotFather into the "Telegram Token" field.
  • Save Changes:
    • Click on the "Save Changes" button to complete the setup of your Telegram bot.