# Let your AI agent post to Telegram

Source: https://staging.postgale.com/integrations/telegram

Yes, an AI agent can post to a Telegram channel or group through Postgale. Make Postgale’s bot an admin of the chat, post a one-time code there to connect it, and the agent can publish text, photos, videos, documents and albums of up to 10 items, edit or delete what it posted and read the member count, through the official Telegram Bot API.

## Can an AI agent post to Telegram?

Postgale is the secure layer for AI agents on social media. This page covers Telegram: what an agent can publish, what you need, the Telegram rules Postgale applies, and how to connect a channel or group.

Telegram lets bots post to the channels and groups that made them an admin. Postgale runs one bot for every workspace, so there is no bot to create or token to keep: the agent sends one plain request (the text, the media, when to post, which chat) and Postgale uploads the files, sends the message or album and reports the link back.

MCP (Model Context Protocol) is the open standard that lets AI assistants such as Claude and Cursor use outside tools. An MCP server is what they connect to. Postgale hosts one and a REST API, so ChatGPT, Claude, Cursor, VS Code, n8n or your own agent can post to Telegram as a tool.

## What do you need?

- A Telegram channel or group where you are an admin who can add other admins.
- A Postgale workspace, and a sign-in or an API key for the agent.
- Optional media on a public HTTPS URL (upload it with `upload_media`): photos up to 10 MB, videos and documents up to 50 MB.
- An AI tool that can call Postgale: [ChatGPT](https://staging.postgale.com/guides/chatgpt), [Claude](https://staging.postgale.com/guides/claude), [Cursor](https://staging.postgale.com/guides/cursor), [n8n](https://staging.postgale.com/guides/n8n), VS Code, or your own code.

## What can the agent do on Telegram?

| Task | What Postgale does |
| --- | --- |
| Publish | Text up to 4096 characters, one photo, video or document, or an album of 2 to 10 items with a caption; MarkdownV2 or HTML formatting; silent delivery; scheduling. |
| Edit | Change the text of a message or the caption of a media post or album. |
| Delete | Remove a message, or every message of an album. |
| Metrics | The chat’s member count as an account metric. Telegram gives bots no per-post views. |

## Which Telegram rules does Postgale enforce?

- Text is limited to 4096 characters and captions to 1024, counted after formatting markup; a longer post is refused before it reaches Telegram.
- Albums have 2 to 10 items, and documents cannot share an album with photos or videos.
- Files are uploaded by Postgale within Telegram’s bot limits: 10 MB per photo, 50 MB per video or document.
- When Telegram asks to slow down, Postgale waits the time Telegram gives before retrying.
- If the bot is removed or loses the right to post, the account is marked as needing reconnection and your webhook hears about it.

## How do I connect Telegram to an AI agent with Postgale?

1. Create a Postgale workspace and open Dashboard → Accounts → Telegram. You get a one-time code that is valid for 15 minutes.
2. In Telegram, add Postgale’s bot to your channel or group as an admin with the right to post messages.
3. Post `/connect` followed by the code in the chat. The channel or group appears in Postgale within seconds.
4. Connect your AI tool: add `https://postgale.com/mcp` in [ChatGPT](https://staging.postgale.com/guides/chatgpt), [Claude](https://staging.postgale.com/guides/claude) or [Cursor](https://staging.postgale.com/guides/cursor) and sign in to Postgale, or create a key under Dashboard → API keys for [n8n](https://staging.postgale.com/guides/n8n) or your own code.

An agent can also start the connection itself: the `connect_account` tool (or `POST /api/v1/connect/telegram`) returns the code and the steps for the person who runs the chat. The agent never gets a token.

## What does a Telegram post from an agent look like?

> Ask your agent: “Every Friday at 5 pm, post the week’s changelog to our Telegram channel with the release screenshots as an album, silently.”

POST /api/v1/posts (Telegram):
```json
{
  "content": "<b>This week</b>: faster sync, dark mode and 12 fixes.",
  "platforms": [
    {
      "accountId": "acc_tg",
      "platformSpecificData": {
        "mediaUrls": [
          "https://media.example.com/sync.png",
          "https://media.example.com/dark.png"
        ],
        "parseMode": "HTML",
        "disableNotification": true
      }
    }
  ],
  "scheduledFor": "2026-11-06T17:00:00Z"
}
```

Nothing has to go out unreviewed. Approval can be required per workspace, per connected account, per API key or per signed-in app; while it applies, posts wait as pending approval in the dashboard, and replies, direct messages and edits to live posts are queued for a person to approve, edit or reject there before anything is sent. Every write the agent makes is kept in the audit log.

## What can’t an agent do on Telegram through Postgale?

- Post to personal chats or to chats where the bot is not an admin.
- Read views or reactions per post. The Bot API does not give them to bots.
- Delete messages older than 48 hours. Telegram does not allow it.

## Questions

### Can Claude post to a Telegram channel?

Yes. Add Postgale as a connector in Claude, connect the channel in Postgale with the one-time code and ask Claude to post. See the Claude guide.

### Do I need to create my own Telegram bot?

No. Postgale’s bot posts for every workspace; you only make it an admin of your channel or group.

### Can the agent post albums to Telegram?

Yes, 2 to 10 photos and videos (or documents) in one album, with the caption on the first item.

## Related

- [Telegram developer guide](https://staging.postgale.com/docs/telegram)
- [Discord](https://staging.postgale.com/integrations/discord)
- [Connect Claude](https://staging.postgale.com/guides/claude)
- [REST API reference](https://staging.postgale.com/docs/api)
