> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eden.art/llms.txt
> Use this file to discover all available pages before exploring further.

# Telegram

> Deploy your Eden agent to Telegram groups and channels

<Info>
  Deployments are experimental and currently in private beta. If you're interested in testing it now, please reach out to the devs on [Discord](https://discord.com/invite/4dSYwDT).
</Info>

Users who have been granted access to the deployment beta will notice a "Deployments" section in each Agent's settings.

## Setup Process

<Steps>
  <Step title="Create Telegram Bot">
    ### Configure with BotFather

    1. Message [@BotFather](https://t.me/botfather) in Telegram
    2. Send `/newbot` to create a new bot
    3. Provide:
       * Display name for your bot
       * Username ending with `_bot`
    4. Copy the token and save it somewhere safe
    5. Disable privacy mode to let the bot receive group messages:
       * Send `/setprivacy`
       * Select your bot
       * Choose "Disable"

    <img src="https://mintcdn.com/eden-47189371/1PqcgJ8GaQ5xEWAo/img/telegram1.jpg?fit=max&auto=format&n=1PqcgJ8GaQ5xEWAo&q=85&s=fd3be7e0a13625b526d85eac91090cf8" alt="Creating a new bot in Telegram" width="826" height="832" data-path="img/telegram1.jpg" />

    <Tip>
      Use `/setuserpic` to upload your bot's profile picture.
    </Tip>
  </Step>

  <Step title="Configure Eden Deployment">
    Go to your agent's deployment settings:

    1. Select **Telegram**
    2. Paste the token into the "Token" field

    <img src="https://mintcdn.com/eden-47189371/1PqcgJ8GaQ5xEWAo/img/telegram_deployment.jpg?fit=max&auto=format&n=1PqcgJ8GaQ5xEWAo&q=85&s=199395cda5390e617da865657c03b523" alt="Enter token and deploy" width="659" height="432" data-path="img/telegram_deployment.jpg" />
  </Step>

  <Step title="Set Up Allowed Channels">
    You need to specify which channels (groups/topics) the bot can chat in.

    To get channel IDs, visit the channel in [Telegram Web](https://web.telegram.org/) and inspect the URL.

    <Tabs>
      <Tab title="Groups without topics">
        Copy everything after the last slash and #.\
        Format: `-some_number`\
        Example: `-4656194598`

        <img src="https://mintcdn.com/eden-47189371/1PqcgJ8GaQ5xEWAo/img/telegram/telegram1.jpg?fit=max&auto=format&n=1PqcgJ8GaQ5xEWAo&q=85&s=82266d1ac2de6d0bb4a93a22c2b55669" alt="Group ID format" width="1506" height="134" data-path="img/telegram/telegram1.jpg" />
      </Tab>

      <Tab title="Groups with topics">
        Copy everything after the last slash.\
        Format: `-100` + `some_number` + `_some_string`

        <Note>
          If your URL has `/k/`, try changing it to `/a/` instead.
        </Note>

        Example: `-1002429164874_30`

        <img src="https://mintcdn.com/eden-47189371/1PqcgJ8GaQ5xEWAo/img/telegram/telegram2.jpg?fit=max&auto=format&n=1PqcgJ8GaQ5xEWAo&q=85&s=eb5d12c56562e35b23cfedbedeeecb6f" alt="Topic group ID format" width="1504" height="150" data-path="img/telegram/telegram2.jpg" />
      </Tab>
    </Tabs>

    Add these IDs to "Allowed Channels" for each channel you want your bot to access.
  </Step>

  <Step title="Deploy and Test">
    1. Click **Deploy**
    2. Wait for deployment confirmation
    3. Try mentioning your bot in an allowed channel

    <Warning>
      The deployment may show as "successful" a few minutes before it's actually ready. If successful but not responding, please wait a few more minutes.
    </Warning>
  </Step>
</Steps>

## Tool

Go to one of the allowed channels and mention your bot in a message. If it responds, you're all set!

## Using the Telegram Tools

The following tools are available for your agent to use once it is deployed to Telegram:

* `telegram_post` - Post a message to a channel

You can use these in a conversation with your agent.

## Getting Channel IDs

### Quick Reference

| Channel Type      | ID Format           | Example             |
| ----------------- | ------------------- | ------------------- |
| Regular Group     | `-number`           | `-4656194598`       |
| Group with Topics | `-100number_string` | `-1002429164874_30` |

### Troubleshooting Tips

* Use [Telegram Web](https://web.telegram.org/) to get IDs
* For topic groups, ensure URL uses `/a/` not `/k/`
* Double-check the bot has been added to the group
* Verify privacy mode is disabled in BotFather
