LogoLogo
  • Getting Started
    • Overview
    • How-to Guides & Tutorials
      • Video Tutorials
        • Building an Autonomous AI Agent for Twitter/X
        • Bulding Your Own Whale Tracking Agent
        • Building a Degen Agent that Apes in low-caps on Solana
      • How to Build Your First AI Agent
      • How to Choose the Right AI Model for Your Agent
      • How to Add and Configure Plugins
      • How to Set Up and Trigger Workflows
      • How to Launch and Tokenize Your AI Agent
      • How to Edit Your Published Agent
      • How to View Agent Wallet Activity
      • How to get a free Twitter/X API key
      • Official vs Unofficial X plugins. What's the difference?
      • How to Create a Telegram Bot & Get your Chat ID
      • How to Build a Copy-Trading AI Agent
      • Loomlay Troubleshooting Guide
  • LOOMLAY AI AGENTS
    • Introduction
    • Deploying agent live
    • Models
    • Plugins
    • Workflows
    • Workflow Triggers
      • Custom
      • Run on Repeat
      • New Message: Telegram
    • Agent Wallet
  • Terminal
    • Overview & Installation
  • Integration with workflows
  • Configuration & styling
  • Advanced features
  • Tokens
    • LAY Token
    • Agent Tokens
  • Pricing
    • Agent Developer
Powered by GitBook
On this page
  1. Getting Started
  2. How-to Guides & Tutorials

How to Create a Telegram Bot & Get your Chat ID

PreviousOfficial vs Unofficial X plugins. What's the difference?NextHow to Build a Copy-Trading AI Agent

Last updated 4 months ago

Creating a Telegram bot and extracting chat IDs are crucial steps for seamlessly integrating Telegram into your workflows. Whether you're using it to send crypto-related alerts or monitor telegram groups, this guide will walk you through the process of setting up your bot and retrieving the chat IDs needed to connect it to your workflows. To create the telegram bot, we're going to be using the which is Telegram's official bot that streamlines the creation and management of the bots on the platform.

  1. Start a Chat with BotFather and Create Your Bot:

    • Open Telegram, search for , and click the Start button to begin a conversation.

    • Send the command /newbot to BotFather. When prompted, provide a name for your bot (this will be the display name) and choose a username ending with "bot" (e.g., CryptoAlertBot).

    • Copy Your Bot’s API Token: After setting the username, BotFather will generate an API token for your bot. This token is essential for integrating your bot with Loomlay.

  1. Start a chat with your Newly Create bot so you can then extract your Chat ID which you can reference in your workflows to instruct the bot to message you.

  1. Now Open a browser and go to:

    • https://api.telegram.org/bot<YourBotToken>/getUpdates (Replace <YourBotToken> with your bot's token.)

    • Check the JSON response for the "chat" object and Find the "id" field—this is your chat ID. Save it for later!

Note: Telegram Private message chat IDs are numeric (e.g., 123456789), while group chat IDs always start with a dash (e.g., -123123123). Make sure to use the correct type of chat ID for your workflows!

  1. Now that you've set up your Telegram bot and obtained your Bot Token and your Chat ID, you are ready to integrate it into your Loomlay Agent workflow. Start by Adding the Telegram Plugin, insert your Bot API token and hit Save, then simply reference your Chat ID in your Agent workflow instructions.

BotFather
@BotFather