From 4caa69dad8ca1bb852cd2ebbf3c826ac68b0612a Mon Sep 17 00:00:00 2001 From: Krzysztof Czerwinski Date: Wed, 18 Feb 2026 21:13:14 +0900 Subject: [PATCH] Update block docs --- docs/integrations/README.md | 12 + docs/integrations/SUMMARY.md | 2 + .../block-integrations/telegram/blocks.md | 348 ++++++++++++++++++ .../block-integrations/telegram/triggers.md | 77 ++++ 4 files changed, 439 insertions(+) create mode 100644 docs/integrations/block-integrations/telegram/blocks.md create mode 100644 docs/integrations/block-integrations/telegram/triggers.md diff --git a/docs/integrations/README.md b/docs/integrations/README.md index 00d4b0c73a..d8f5429294 100644 --- a/docs/integrations/README.md +++ b/docs/integrations/README.md @@ -305,10 +305,12 @@ Below is a comprehensive list of all available blocks, categorized by their prim | [Create Reddit Post](block-integrations/misc.md#create-reddit-post) | Create a new post on a subreddit | | [Delete Reddit Comment](block-integrations/misc.md#delete-reddit-comment) | Delete a Reddit comment that you own | | [Delete Reddit Post](block-integrations/misc.md#delete-reddit-post) | Delete a Reddit post that you own | +| [Delete Telegram Message](block-integrations/telegram/blocks.md#delete-telegram-message) | Delete a message from a Telegram chat | | [Discord Channel Info](block-integrations/discord/bot_blocks.md#discord-channel-info) | Resolves Discord channel names to IDs and vice versa | | [Discord Get Current User](block-integrations/discord/oauth_blocks.md#discord-get-current-user) | Gets information about the currently authenticated Discord user using OAuth2 credentials | | [Discord User Info](block-integrations/discord/bot_blocks.md#discord-user-info) | Gets information about a Discord user by their ID | | [Edit Reddit Post](block-integrations/misc.md#edit-reddit-post) | Edit the body text of an existing Reddit post that you own | +| [Edit Telegram Message](block-integrations/telegram/blocks.md#edit-telegram-message) | Edit the text of an existing message sent by the bot | | [Get Linkedin Profile](block-integrations/enrichlayer/linkedin.md#get-linkedin-profile) | Fetch LinkedIn profile data using Enrichlayer | | [Get Linkedin Profile Picture](block-integrations/enrichlayer/linkedin.md#get-linkedin-profile-picture) | Get LinkedIn profile pictures using Enrichlayer | | [Get Reddit Comment](block-integrations/misc.md#get-reddit-comment) | Get details about a specific Reddit comment by its ID | @@ -321,6 +323,7 @@ Below is a comprehensive list of all available blocks, categorized by their prim | [Get Subreddit Flairs](block-integrations/misc.md#get-subreddit-flairs) | Get available link flair options for a subreddit | | [Get Subreddit Info](block-integrations/misc.md#get-subreddit-info) | Get information about a subreddit including subscriber count, description, and rules | | [Get Subreddit Rules](block-integrations/misc.md#get-subreddit-rules) | Get the rules for a subreddit to ensure compliance before posting | +| [Get Telegram File](block-integrations/telegram/blocks.md#get-telegram-file) | Download a file from Telegram using its file_id | | [Get User Posts](block-integrations/misc.md#get-user-posts) | Fetch posts by a specific Reddit user | | [Linkedin Person Lookup](block-integrations/enrichlayer/linkedin.md#linkedin-person-lookup) | Look up LinkedIn profiles by person information using Enrichlayer | | [Linkedin Role Lookup](block-integrations/enrichlayer/linkedin.md#linkedin-role-lookup) | Look up LinkedIn profiles by role in a company using Enrichlayer | @@ -343,12 +346,21 @@ Below is a comprehensive list of all available blocks, categorized by their prim | [Reddit Get My Posts](block-integrations/misc.md#reddit-get-my-posts) | Fetch posts created by the authenticated Reddit user (you) | | [Reply To Discord Message](block-integrations/discord/bot_blocks.md#reply-to-discord-message) | Replies to a specific Discord message | | [Reply To Reddit Comment](block-integrations/misc.md#reply-to-reddit-comment) | Reply to a specific Reddit comment | +| [Reply To Telegram Message](block-integrations/telegram/blocks.md#reply-to-telegram-message) | Reply to a specific message in a Telegram chat | | [Search Reddit](block-integrations/misc.md#search-reddit) | Search Reddit for posts matching a query | | [Send Discord DM](block-integrations/discord/bot_blocks.md#send-discord-dm) | Sends a direct message to a Discord user using their user ID | | [Send Discord Embed](block-integrations/discord/bot_blocks.md#send-discord-embed) | Sends a rich embed message to a Discord channel | | [Send Discord File](block-integrations/discord/bot_blocks.md#send-discord-file) | Sends a file attachment to a Discord channel | | [Send Discord Message](block-integrations/discord/bot_blocks.md#send-discord-message) | Sends a message to a Discord channel using a bot token | | [Send Reddit Message](block-integrations/misc.md#send-reddit-message) | Send a private message (DM) to a Reddit user | +| [Send Telegram Audio](block-integrations/telegram/blocks.md#send-telegram-audio) | Send an audio file to a Telegram chat | +| [Send Telegram Document](block-integrations/telegram/blocks.md#send-telegram-document) | Send a document (any file type) to a Telegram chat | +| [Send Telegram Message](block-integrations/telegram/blocks.md#send-telegram-message) | Send a text message to a Telegram chat | +| [Send Telegram Photo](block-integrations/telegram/blocks.md#send-telegram-photo) | Send a photo to a Telegram chat | +| [Send Telegram Video](block-integrations/telegram/blocks.md#send-telegram-video) | Send a video to a Telegram chat | +| [Send Telegram Voice](block-integrations/telegram/blocks.md#send-telegram-voice) | Send a voice message to a Telegram chat | +| [Telegram Message Reaction Trigger](block-integrations/telegram/triggers.md#telegram-message-reaction-trigger) | Triggers when a reaction to a message is changed | +| [Telegram Message Trigger](block-integrations/telegram/triggers.md#telegram-message-trigger) | Triggers when a message is received by your Telegram bot | | [Transcribe Youtube Video](block-integrations/misc.md#transcribe-youtube-video) | Transcribes a YouTube video using a proxy | | [Twitter Add List Member](block-integrations/twitter/list_members.md#twitter-add-list-member) | This block adds a specified user to a Twitter List owned by the authenticated user | | [Twitter Bookmark Tweet](block-integrations/twitter/bookmark.md#twitter-bookmark-tweet) | This block bookmarks a tweet on Twitter | diff --git a/docs/integrations/SUMMARY.md b/docs/integrations/SUMMARY.md index 3ad4bf2c6d..bd73deccb5 100644 --- a/docs/integrations/SUMMARY.md +++ b/docs/integrations/SUMMARY.md @@ -103,6 +103,8 @@ * [Stagehand Blocks](block-integrations/stagehand/blocks.md) * [System Library Operations](block-integrations/system/library_operations.md) * [System Store Operations](block-integrations/system/store_operations.md) +* [Telegram Blocks](block-integrations/telegram/blocks.md) +* [Telegram Triggers](block-integrations/telegram/triggers.md) * [Text](block-integrations/text.md) * [Todoist Comments](block-integrations/todoist/comments.md) * [Todoist Labels](block-integrations/todoist/labels.md) diff --git a/docs/integrations/block-integrations/telegram/blocks.md b/docs/integrations/block-integrations/telegram/blocks.md new file mode 100644 index 0000000000..2b91e93c8f --- /dev/null +++ b/docs/integrations/block-integrations/telegram/blocks.md @@ -0,0 +1,348 @@ +# Telegram Blocks + +_Add a description of this category of blocks._ + + +## Delete Telegram Message + +### What it is +Delete a message from a Telegram chat. Bots can delete their own messages and incoming messages in private chats at any time. + +### How it works + +_Add technical explanation here._ + + +### Inputs + +| Input | Description | Type | Required | +|-------|-------------|------|----------| +| chat_id | The chat ID containing the message | int | Yes | +| message_id | The ID of the message to delete | int | Yes | + +### Outputs + +| Output | Description | Type | +|--------|-------------|------| +| error | Error message if the operation failed | str | +| status | Status of the operation | str | + +### Possible use case + +_Add practical use case examples here._ + + +--- + +## Edit Telegram Message + +### What it is +Edit the text of an existing message sent by the bot. + +### How it works + +_Add technical explanation here._ + + +### Inputs + +| Input | Description | Type | Required | +|-------|-------------|------|----------| +| chat_id | The chat ID containing the message | int | Yes | +| message_id | The ID of the message to edit | int | Yes | +| text | New text for the message (max 4096 characters) | str | Yes | +| parse_mode | Message formatting mode | "none" \| "Markdown" \| "MarkdownV2" \| "HTML" | No | + +### Outputs + +| Output | Description | Type | +|--------|-------------|------| +| error | Error message if the operation failed | str | +| message_id | The ID of the edited message | int | +| status | Status of the operation | str | + +### Possible use case + +_Add practical use case examples here._ + + +--- + +## Get Telegram File + +### What it is +Download a file from Telegram using its file_id. Use this to process photos, voice messages, or documents received. + +### How it works + +_Add technical explanation here._ + + +### Inputs + +| Input | Description | Type | Required | +|-------|-------------|------|----------| +| file_id | The Telegram file_id to download. Get this from trigger outputs (photo_file_id, voice_file_id, etc.) | str | Yes | + +### Outputs + +| Output | Description | Type | +|--------|-------------|------| +| error | Error message if the operation failed | str | +| file | The downloaded file (workspace:// reference or data URI) | str (file) | +| status | Status of the operation | str | + +### Possible use case + +_Add practical use case examples here._ + + +--- + +## Reply To Telegram Message + +### What it is +Reply to a specific message in a Telegram chat. + +### How it works + +_Add technical explanation here._ + + +### Inputs + +| Input | Description | Type | Required | +|-------|-------------|------|----------| +| chat_id | The chat ID where the message is | int | Yes | +| reply_to_message_id | The message ID to reply to | int | Yes | +| text | The reply text | str | Yes | +| parse_mode | Message formatting mode | "none" \| "Markdown" \| "MarkdownV2" \| "HTML" | No | + +### Outputs + +| Output | Description | Type | +|--------|-------------|------| +| error | Error message if the operation failed | str | +| message_id | The ID of the reply message | int | +| status | Status of the operation | str | + +### Possible use case + +_Add practical use case examples here._ + + +--- + +## Send Telegram Audio + +### What it is +Send an audio file to a Telegram chat. The file is displayed in the music player. For voice messages, use the Send Voice block instead. + +### How it works + +_Add technical explanation here._ + + +### Inputs + +| Input | Description | Type | Required | +|-------|-------------|------|----------| +| chat_id | The chat ID to send the audio to | int | Yes | +| audio | Audio file to send (MP3 or M4A format). Can be URL, data URI, or workspace:// reference. | str (file) | Yes | +| caption | Caption for the audio file | str | No | +| title | Track title | str | No | +| performer | Track performer/artist | str | No | +| duration | Duration in seconds | int | No | +| reply_to_message_id | Message ID to reply to | int | No | + +### Outputs + +| Output | Description | Type | +|--------|-------------|------| +| error | Error message if the operation failed | str | +| message_id | The ID of the sent message | int | +| status | Status of the operation | str | + +### Possible use case + +_Add practical use case examples here._ + + +--- + +## Send Telegram Document + +### What it is +Send a document (any file type) to a Telegram chat. + +### How it works + +_Add technical explanation here._ + + +### Inputs + +| Input | Description | Type | Required | +|-------|-------------|------|----------| +| chat_id | The chat ID to send the document to | int | Yes | +| document | Document to send (any file type). Can be URL, data URI, or workspace:// reference. | str (file) | Yes | +| filename | Filename shown to the recipient. If empty, the original filename is used (may be a random ID for uploaded files). | str | No | +| caption | Caption for the document | str | No | +| parse_mode | Caption formatting mode | "none" \| "Markdown" \| "MarkdownV2" \| "HTML" | No | +| reply_to_message_id | Message ID to reply to | int | No | + +### Outputs + +| Output | Description | Type | +|--------|-------------|------| +| error | Error message if the operation failed | str | +| message_id | The ID of the sent message | int | +| status | Status of the operation | str | + +### Possible use case + +_Add practical use case examples here._ + + +--- + +## Send Telegram Message + +### What it is +Send a text message to a Telegram chat. + +### How it works + +_Add technical explanation here._ + + +### Inputs + +| Input | Description | Type | Required | +|-------|-------------|------|----------| +| chat_id | The chat ID to send the message to. Get this from the trigger block's chat_id output. | int | Yes | +| text | The text message to send (max 4096 characters) | str | Yes | +| parse_mode | Message formatting mode (Markdown, HTML, or none) | "none" \| "Markdown" \| "MarkdownV2" \| "HTML" | No | +| reply_to_message_id | Message ID to reply to | int | No | +| disable_notification | Send message silently (no notification sound) | bool | No | + +### Outputs + +| Output | Description | Type | +|--------|-------------|------| +| error | Error message if the operation failed | str | +| message_id | The ID of the sent message | int | +| status | Status of the operation | str | + +### Possible use case + +_Add practical use case examples here._ + + +--- + +## Send Telegram Photo + +### What it is +Send a photo to a Telegram chat. + +### How it works + +_Add technical explanation here._ + + +### Inputs + +| Input | Description | Type | Required | +|-------|-------------|------|----------| +| chat_id | The chat ID to send the photo to | int | Yes | +| photo | Photo to send (URL, data URI, or workspace:// reference). URLs are preferred as Telegram will fetch them directly. | str (file) | Yes | +| caption | Caption for the photo (max 1024 characters) | str | No | +| parse_mode | Caption formatting mode | "none" \| "Markdown" \| "MarkdownV2" \| "HTML" | No | +| reply_to_message_id | Message ID to reply to | int | No | + +### Outputs + +| Output | Description | Type | +|--------|-------------|------| +| error | Error message if the operation failed | str | +| message_id | The ID of the sent message | int | +| status | Status of the operation | str | + +### Possible use case + +_Add practical use case examples here._ + + +--- + +## Send Telegram Video + +### What it is +Send a video to a Telegram chat. + +### How it works + +_Add technical explanation here._ + + +### Inputs + +| Input | Description | Type | Required | +|-------|-------------|------|----------| +| chat_id | The chat ID to send the video to | int | Yes | +| video | Video to send (MP4 format). Can be URL, data URI, or workspace:// reference. | str (file) | Yes | +| caption | Caption for the video | str | No | +| parse_mode | Caption formatting mode | "none" \| "Markdown" \| "MarkdownV2" \| "HTML" | No | +| duration | Duration in seconds | int | No | +| reply_to_message_id | Message ID to reply to | int | No | + +### Outputs + +| Output | Description | Type | +|--------|-------------|------| +| error | Error message if the operation failed | str | +| message_id | The ID of the sent message | int | +| status | Status of the operation | str | + +### Possible use case + +_Add practical use case examples here._ + + +--- + +## Send Telegram Voice + +### What it is +Send a voice message to a Telegram chat. Voice must be OGG format with OPUS codec. + +### How it works + +_Add technical explanation here._ + + +### Inputs + +| Input | Description | Type | Required | +|-------|-------------|------|----------| +| chat_id | The chat ID to send the voice message to | int | Yes | +| voice | Voice message to send (OGG format with OPUS codec). Can be URL, data URI, or workspace:// reference. | str (file) | Yes | +| caption | Caption for the voice message | str | No | +| duration | Duration in seconds | int | No | +| reply_to_message_id | Message ID to reply to | int | No | + +### Outputs + +| Output | Description | Type | +|--------|-------------|------| +| error | Error message if the operation failed | str | +| message_id | The ID of the sent message | int | +| status | Status of the operation | str | + +### Possible use case + +_Add practical use case examples here._ + + +--- diff --git a/docs/integrations/block-integrations/telegram/triggers.md b/docs/integrations/block-integrations/telegram/triggers.md new file mode 100644 index 0000000000..805cc73e4c --- /dev/null +++ b/docs/integrations/block-integrations/telegram/triggers.md @@ -0,0 +1,77 @@ +# Telegram Triggers + +_Add a description of this category of blocks._ + + +## Telegram Message Reaction Trigger + +### What it is +Triggers when a reaction to a message is changed. Works in private chats automatically. In groups, the bot must be an administrator. + +### How it works + +_Add technical explanation here._ + + +### Outputs + +| Output | Description | Type | +|--------|-------------|------| +| error | Error message if the operation failed | str | +| payload | The complete webhook payload from Telegram | Dict[str, Any] | +| chat_id | The chat ID where the reaction occurred | int | +| message_id | The message ID that was reacted to | int | +| user_id | The user ID who changed the reaction | int | +| username | Username of the user (may be empty) | str | +| new_reactions | List of new reactions on the message | List[Any] | +| old_reactions | List of previous reactions on the message | List[Any] | + +### Possible use case + +_Add practical use case examples here._ + + +--- + +## Telegram Message Trigger + +### What it is +Triggers when a message is received by your Telegram bot. Supports text, photos, voice messages, and audio files. + +### How it works + +_Add technical explanation here._ + + +### Inputs + +| Input | Description | Type | Required | +|-------|-------------|------|----------| +| events | Types of messages to receive | Message Types | Yes | + +### Outputs + +| Output | Description | Type | +|--------|-------------|------| +| error | Error message if the operation failed | str | +| payload | The complete webhook payload from Telegram | Dict[str, Any] | +| chat_id | The chat ID where the message was received. Use this to send replies. | int | +| message_id | The unique message ID | int | +| user_id | The user ID who sent the message | int | +| username | Username of the sender (may be empty) | str | +| first_name | First name of the sender | str | +| event | The message type (text, photo, voice, audio, etc.) | str | +| text | Text content of the message (for text messages) | str | +| photo_file_id | File ID of the photo (for photo messages). Use GetTelegramFileBlock to download. | str | +| voice_file_id | File ID of the voice message (for voice messages). Use GetTelegramFileBlock to download. | str | +| audio_file_id | File ID of the audio file (for audio messages). Use GetTelegramFileBlock to download. | str | +| file_id | File ID for document/video messages. Use GetTelegramFileBlock to download. | str | +| file_name | Original filename (for document/audio messages) | str | +| caption | Caption for media messages | str | + +### Possible use case + +_Add practical use case examples here._ + + +---