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

# Telegram Integration: Build Bots and Automate Chats

> Connect Telegram to Atmet using a bot token to send automated messages, files, polls, and manage accessible chats from your workflows.

The Telegram integration lets you embed Atmet-powered automation directly into Telegram chats, groups, and channels through the Telegram Bot API. Telegram uses a **bot token** — a unique credential you generate with @BotFather in under a minute. Once connected, your bot can send messages, photos, documents, polls, and location data to any Telegram conversation it has access to, and your workflows can look up chat information or retrieve recent updates. This makes Telegram an excellent channel for real-time notifications, alerts, and community management flows.

## Prerequisites

Before connecting Telegram, make sure you have:

* A Telegram account
* A Telegram bot created through [@BotFather](https://t.me/BotFather) (free, takes about one minute)
* The **bot token** provided by @BotFather after bot creation
* The chat ID or username of the chat(s) you want your bot to interact with

***

## Creating a Telegram bot with @BotFather

If you haven't created a bot yet, follow these steps inside Telegram before connecting to Atmet.

<Steps>
  <Step title="Open @BotFather">
    Search for **@BotFather** in Telegram and start a conversation. This is Telegram's official bot management service.
  </Step>

  <Step title="Create a new bot">
    Send the command `/newbot`. BotFather will ask you to choose a display name and a username (the username must end in `bot`, e.g., `my_atmet_notifier_bot`).
  </Step>

  <Step title="Copy your bot token">
    After creation, BotFather sends you a message containing your **HTTP API token** — a string that looks like `1234567890:ABCDefGhIJKlmNoPQRsTUVwxyZ`. Copy this token and keep it secure.
  </Step>

  <Step title="Add the bot to a chat (if needed)">
    If you want your bot to send messages to a group or channel, add it as a member or administrator of that chat in Telegram before using it in a workflow.
  </Step>
</Steps>

<Warning>
  Treat your bot token like a password. Anyone who has it can send messages as your bot. If a token is ever exposed, revoke it immediately by sending `/revoke` to @BotFather and generating a new one.
</Warning>

***

## Connecting Telegram to Atmet

<Steps>
  <Step title="Open Integrations">
    In the Atmet sidebar, navigate to **Integrations** and find **Telegram** in the list.
  </Step>

  <Step title="Enter your bot token">
    Paste the bot token you copied from @BotFather into the **API Token** field and click **Connect**.
  </Step>

  <Step title="Confirm the connection">
    Atmet validates the token against the Telegram API. A green **Connected** badge confirms success and your bot is ready to use in workflows.
  </Step>
</Steps>

<Note>
  You can connect multiple Telegram bots to the same Atmet workspace by adding additional connections — one per bot token. This is useful if you run separate bots for different products or teams.
</Note>

***

## Triggers

Telegram does not expose a polling trigger through the Bot API in this integration. To start a workflow from a Telegram message, use an incoming webhook step or schedule your workflow and use the **Get updates** action to fetch recent bot activity.

***

## Actions

<Accordion title="Sending messages and media">
  | Action              | What it does                                                                                        |
  | ------------------- | --------------------------------------------------------------------------------------------------- |
  | **Send message**    | Sends a text message to a specified chat, group, or channel. Supports Markdown and HTML formatting. |
  | **Send photo**      | Sends a photo to a chat. Accepts a file URL or upload.                                              |
  | **Send document**   | Sends a file (PDF, ZIP, etc.) to a chat.                                                            |
  | **Send location**   | Sends a geographic location pin to a chat.                                                          |
  | **Send poll**       | Creates and sends a poll to a group or channel.                                                     |
  | **Forward message** | Forwards an existing message from one chat to another.                                              |
  | **Edit message**    | Edits the text of a previously sent bot message.                                                    |
  | **Delete message**  | Deletes a message from a chat (bot must have delete permissions).                                   |
</Accordion>

<Accordion title="Getting chat information">
  | Action                      | What it does                                                                |
  | --------------------------- | --------------------------------------------------------------------------- |
  | **Get chat**                | Returns metadata about a chat — title, type, description, and member count. |
  | **Get chat administrators** | Returns the list of administrators in a group or channel.                   |
  | **Get chat member**         | Returns the status and details of a specific member in a chat.              |
  | **Get chat members count**  | Returns the total number of members in a chat.                              |
  | **Get chat history**        | Fetches recent messages from a chat.                                        |
</Accordion>

<Accordion title="Bot and update management">
  | Action                      | What it does                                                                                                                                                               |
  | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | **Get updates**             | Fetches recent updates (messages, reactions, member changes) received by the bot. Supports `offset` and `limit` to page through results and avoid re-processing old items. |
  | **Get me**                  | Returns the bot's own profile information (username, name, ID).                                                                                                            |
  | **Set my commands**         | Registers the list of commands shown to users when they type `/` in a chat with the bot.                                                                                   |
  | **Answer callback query**   | Sends a response to an inline keyboard button press.                                                                                                                       |
  | **Create chat invite link** | Generates an invite link for a group or channel.                                                                                                                           |
</Accordion>

***

## Workflow ideas

<CardGroup cols={2}>
  <Card title="Operational alerts" icon="bell">
    Trigger on a schedule or an external webhook event, then send a Telegram message to your team channel whenever a critical metric threshold is breached — server errors, failed payments, or low inventory.
  </Card>

  <Card title="Scheduled digest" icon="newspaper">
    Every morning, query a database or RSS feed for new content, then send a formatted digest message to a Telegram channel — keeping your community up to date automatically.
  </Card>

  <Card title="Document delivery" icon="file-arrow-down">
    When a report is generated in a workflow, use **Send document** to deliver the PDF directly to a Telegram chat or channel — no email attachment needed.
  </Card>

  <Card title="Support ticket router" icon="ticket">
    Poll for new bot messages with **Get updates** on a schedule. Classify the user's intent with AI, then either answer common questions automatically or escalate to a human by creating a Notion ticket and notifying your support team.
  </Card>
</CardGroup>

***

## Limitations and notes

<Info>
  Telegram bots **cannot** initiate a conversation with a user who has never messaged the bot first. A user must send at least one message to the bot (or join a group where the bot is present) before the bot can send them direct messages.
</Info>

<Note>
  Telegram's Bot API rate limits outbound messages to approximately **30 messages per second** across all chats, and **1 message per second** to the same individual chat. For bulk notification workflows, build in small delays between messages to avoid hitting these limits.
</Note>

<Warning>
  The Telegram Bot API only allows bots to read messages in groups if the group's privacy mode has been disabled via @BotFather (`/setprivacy → Disable`), or if the bot has been granted admin rights in that group.
</Warning>
