Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 101 additions & 2 deletions apps/docs/content/docs/en/tools/telegram.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Telegram
description: Send messages through Telegram or trigger workflows from Telegram events
description: Interact with Telegram
---

import { BlockInfoCard } from "@/components/ui/block-info-card"
Expand Down Expand Up @@ -67,7 +67,7 @@ In Sim, the Telegram integration enables your agents to leverage these powerful

## Usage Instructions

Integrate Telegram into the workflow. Can send messages. Can be used in trigger mode to trigger a workflow when a message is sent to a chat.
Integrate Telegram into the workflow. Can send and delete messages. Can be used in trigger mode to trigger a workflow when a message is sent to a chat.



Expand Down Expand Up @@ -96,6 +96,105 @@ Send messages to Telegram channels or users through the Telegram Bot API. Enable
| `timestamp` | number | Unix timestamp when message was sent |
| `from` | object | Information about the bot that sent the message |

### `telegram_delete_message`

Delete messages in Telegram channels or chats through the Telegram Bot API. Requires the message ID of the message to delete.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `botToken` | string | Yes | Your Telegram Bot API Token |
| `chatId` | string | Yes | Target Telegram chat ID |
| `messageId` | string | Yes | Message ID to delete |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Success or error message |
| `data` | object | Delete operation result |

### `telegram_send_photo`

Send photos to Telegram channels or users through the Telegram Bot API.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `botToken` | string | Yes | Your Telegram Bot API Token |
| `chatId` | string | Yes | Target Telegram chat ID |
| `photo` | string | Yes | Photo to send. Pass a file_id or HTTP URL |
| `caption` | string | No | Photo caption \(optional\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Success or error message |
| `data` | object | Telegram message data including optional photo\(s\) |

### `telegram_send_video`

Send videos to Telegram channels or users through the Telegram Bot API.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `botToken` | string | Yes | Your Telegram Bot API Token |
| `chatId` | string | Yes | Target Telegram chat ID |
| `video` | string | Yes | Video to send. Pass a file_id or HTTP URL |
| `caption` | string | No | Video caption \(optional\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Success or error message |
| `data` | object | Telegram message data including optional media |

### `telegram_send_audio`

Send audio files to Telegram channels or users through the Telegram Bot API.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `botToken` | string | Yes | Your Telegram Bot API Token |
| `chatId` | string | Yes | Target Telegram chat ID |
| `audio` | string | Yes | Audio file to send. Pass a file_id or HTTP URL |
| `caption` | string | No | Audio caption \(optional\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Success or error message |
| `data` | object | Telegram message data including voice/audio information |

### `telegram_send_animation`

Send animations (GIFs) to Telegram channels or users through the Telegram Bot API.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `botToken` | string | Yes | Your Telegram Bot API Token |
| `chatId` | string | Yes | Target Telegram chat ID |
| `animation` | string | Yes | Animation to send. Pass a file_id or HTTP URL |
| `caption` | string | No | Animation caption \(optional\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Success or error message |
| `data` | object | Telegram message data including optional media |



## Notes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2054,7 +2054,7 @@ const UserInput = forwardRef<UserInputRef, UserInputProps>(
{/* Highlight overlay */}
<div
ref={overlayRef}
className='pointer-events-none absolute inset-0 z-[1] max-h-[120px] overflow-y-auto overflow-x-hidden pl-[2px] pr-14 py-1 [&::-webkit-scrollbar]:hidden'
className='pointer-events-none absolute inset-0 z-[1] max-h-[120px] overflow-y-auto overflow-x-hidden py-1 pr-14 pl-[2px] [&::-webkit-scrollbar]:hidden'
>
<pre className='whitespace-pre-wrap break-words font-sans text-foreground text-sm leading-[1.25rem]'>
{(() => {
Expand Down Expand Up @@ -2102,7 +2102,7 @@ const UserInput = forwardRef<UserInputRef, UserInputProps>(
placeholder={isDragging ? 'Drop files here...' : effectivePlaceholder}
disabled={disabled}
rows={1}
className='relative z-[2] mb-2 min-h-[32px] w-full resize-none overflow-y-auto overflow-x-hidden break-words border-0 bg-transparent pl-[2px] pr-14 py-1 font-sans text-sm text-transparent leading-[1.25rem] caret-foreground focus-visible:ring-0 focus-visible:ring-offset-0'
className='relative z-[2] mb-2 min-h-[32px] w-full resize-none overflow-y-auto overflow-x-hidden break-words border-0 bg-transparent py-1 pr-14 pl-[2px] font-sans text-sm text-transparent leading-[1.25rem] caret-foreground focus-visible:ring-0 focus-visible:ring-offset-0'
style={{ height: 'auto', wordBreak: 'break-word' }}
/>

Expand Down
Loading