Overview
Telegram Bot API covers messages, chats, media, inline keyboards, updates. The Automize Telegram connector covers the Bot API.
- Regions: Global (Telegram restricted in some countries).
- Plans: Free.
Setting up the connection
Auth type: API Key.
- Telegram → message @BotFather → /newbot → receive bot token.
- In Automize → Settings → Connectors → Telegram. Paste token.
Find your credentials at https://t.me/BotFather.
Rate limits
~30 msg/sec to different chats; 1 msg/sec per chat.
Data model
Bot primitives:
Bot ─── Chats (users + groups + channels) ─── Messages
├─ Inline Keyboards
└─ Media (photos, docs, audio)Available operations
20 operations available. Click any row to jump to its detail.
| Operation | Category | What it does |
|---|---|---|
| Ban Member | General | Ban a user from a chat |
| Delete message | General | Delete a Telegram message. |
| Edit message | General | Edit a Telegram message. |
| Forward Message | General | Forward a message to another chat |
| Get chat | General | Get Telegram chat information. |
| Get chat members count | General | Get the number of members in a Telegram chat. |
| Get File | General | Get file download path by file_id |
| Get me | General | Get the Telegram bot user info. |
| Get updates | General | Get Telegram bot updates. |
| Pin message | General | Pin a message in a Telegram chat. |
| Send audio | General | Send an audio message via Telegram. |
| Send contact | General | Send a contact card via Telegram. |
| Send document | General | Send a document via Telegram. |
| Send location | General | Send a location via Telegram. |
| Send message | General | Send a text message via Telegram. |
| Send photo | General | Send a photo via Telegram. |
| Send video | General | Send a video message via Telegram. |
| Send voice | General | Send a voice message via Telegram. |
| Set webhook | General | Set a Telegram bot webhook URL. |
| Unban Member | General | Unban a user from a chat |
Operations
Ban Member
Ban a user from a chat
| Parameter | Required | Type | Description |
|---|---|---|---|
Chat Id chat_id | Yes | text | |
User Id user_id | No | text |
Delete message
Delete a Telegram message.
| Parameter | Required | Type | Description |
|---|---|---|---|
Chat Id chat_id | Yes | text | |
Message Id message_id | Yes | text |
Edit message
Edit a Telegram message.
| Parameter | Required | Type | Description |
|---|---|---|---|
Chat Id chat_id | Yes | text | |
Message Id message_id | Yes | text | |
Text text | Yes | text |
Forward Message
Forward a message to another chat
| Parameter | Required | Type | Description |
|---|---|---|---|
Chat Id chat_id | Yes | text | |
From Chat Id from_chat_id | No | text | |
Message Id message_id | No | text |
Get chat
Get Telegram chat information.
No input parameters.
Get chat members count
Get the number of members in a Telegram chat.
No input parameters.
Get File
Get file download path by file_id
No input parameters.
Get me
Get the Telegram bot user info.
No input parameters.
Get updates
Get Telegram bot updates.
No input parameters.
Tips
- Long-polling for new messages. Or use webhook.
Pin message
Pin a message in a Telegram chat.
| Parameter | Required | Type | Description |
|---|---|---|---|
Chat Id chat_id | Yes | text | |
Message Id message_id | No | text |
Send audio
Send an audio message via Telegram.
| Parameter | Required | Type | Description |
|---|---|---|---|
Chat Id chat_id | Yes | text | |
Audio audio | No | text | |
Caption caption | No | text |
Send contact
Send a contact card via Telegram.
| Parameter | Required | Type | Description |
|---|---|---|---|
Chat Id chat_id | Yes | text | |
Phone Number phone_number | No | text | |
First Name first_name | Yes | text | |
Last Name last_name | No | text |
Send document
Send a document via Telegram.
| Parameter | Required | Type | Description |
|---|---|---|---|
Chat Id chat_id | Yes | text | |
Document document | Yes | text | |
Caption caption | Yes | text |
Send location
Send a location via Telegram.
| Parameter | Required | Type | Description |
|---|---|---|---|
Chat Id chat_id | Yes | text | |
Latitude latitude | No | number | |
Longitude longitude | No | number |
Send message
Send a text message via Telegram.
| Parameter | Required | Type | Description |
|---|---|---|---|
Chat Id chat_id | Yes | text | |
Text text | Yes | text | |
Parse Mode parse_mode | Yes | text | |
Reply Markup reply_markup | Yes | text |
Tips
- chat_id + text. parse_mode (Markdown/HTML) for formatting.
- reply_markup for inline keyboards.
Send photo
Send a photo via Telegram.
| Parameter | Required | Type | Description |
|---|---|---|---|
Chat Id chat_id | Yes | text | |
Photo photo | Yes | text | |
Caption caption | Yes | text |
Tips
- chat_id + photo (URL or file).
Send video
Send a video message via Telegram.
| Parameter | Required | Type | Description |
|---|---|---|---|
Chat Id chat_id | Yes | text | |
Video video | No | text | |
Caption caption | No | text |
Send voice
Send a voice message via Telegram.
| Parameter | Required | Type | Description |
|---|---|---|---|
Chat Id chat_id | Yes | text | |
Voice voice | No | text | |
Caption caption | No | text |
Set webhook
Set a Telegram bot webhook URL.
| Parameter | Required | Type | Description |
|---|---|---|---|
Url url | Yes | text |
Tips
- Push-mode delivery to your endpoint. Preferred over polling.
Unban Member
Unban a user from a chat
| Parameter | Required | Type | Description |
|---|---|---|---|
Chat Id chat_id | Yes | text | |
User Id user_id | No | text |
FAQ
- Bot vs User account API?
- Bot API: official, free, what this connector uses. User API (MTProto): account-impersonation, breaks ToS for most uses.