Skip to main content

Telegram Bubble

Telegram Bot API integration for messaging and bot management

Quick Start

import { TelegramBubble } from '@bubblelab/bubble-core';
import { CredentialType } from '@bubblelab/shared-schemas';
const result = await new TelegramBubble({
operation: 'send_message',
credentials: {
[CredentialType.TELEGRAM_BOT_TOKEN]: process.env.TELEGRAM_BOT_TOKEN as string,
},
}).action();

Operation Details

send_message

operation 'send_message' required
Send a text message to a Telegram chat
chat_id unknown required
Unique identifier for the target chat or username (e.g., @channelusername)
text string required
Text of the message to be sent
parse_mode 'HTML' | 'Markdown' | 'MarkdownV2'
Text formatting mode (HTML, Markdown, or MarkdownV2)
entities unknown[]
List of special entities in the message text
disable_web_page_preview boolean
Disable link previews for links in this message
disable_notification boolean
Sends the message silently
protect_content boolean
Protects the content from forwarding and saving
reply_to_message_id number
If the message is a reply, ID of the original message
allow_sending_without_reply boolean
Allow sending message even if the replied message is not found
reply_markup unknown
Inline keyboard or reply keyboard markup
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

send_photo

operation 'send_photo' required
Send a photo to a Telegram chat
chat_id unknown required
Unique identifier for the target chat or username
photo unknown required
Photo to send (file_id, HTTP URL, or file path)
caption string
Photo caption
parse_mode 'HTML' | 'Markdown' | 'MarkdownV2'
Text formatting mode (HTML, Markdown, or MarkdownV2)
caption_entities unknown[]
List of special entities in the caption
has_spoiler boolean
Mark photo as spoiler
disable_notification boolean
Sends the message silently
protect_content boolean
Protects the content from forwarding and saving
reply_to_message_id number
If the message is a reply, ID of the original message
allow_sending_without_reply boolean
Allow sending message even if the replied message is not found
reply_markup unknown
Inline keyboard or reply keyboard markup
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

send_document

operation 'send_document' required
Send a document to a Telegram chat
chat_id unknown required
Unique identifier for the target chat or username
document unknown required
File to send (file_id, HTTP URL, or file path)
thumbnail unknown
Thumbnail of the file
caption string
Document caption
parse_mode 'HTML' | 'Markdown' | 'MarkdownV2'
Text formatting mode (HTML, Markdown, or MarkdownV2)
caption_entities unknown[]
List of special entities in the caption
disable_content_type_detection boolean
Disable automatic file type detection
disable_notification boolean
Sends the message silently
protect_content boolean
Protects the content from forwarding and saving
reply_to_message_id number
If the message is a reply, ID of the original message
allow_sending_without_reply boolean
Allow sending message even if the replied message is not found
reply_markup unknown
Inline keyboard or reply keyboard markup
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

edit_message

operation 'edit_message' required
Edit a previously sent message
chat_id unknown
Unique identifier for the target chat or username
message_id number
Identifier of the message to edit
inline_message_id string
Identifier of the inline message to edit
text string required
New text of the message
parse_mode 'HTML' | 'Markdown' | 'MarkdownV2'
Text formatting mode (HTML, Markdown, or MarkdownV2)
entities unknown[]
List of special entities in the message text
disable_web_page_preview boolean
Disable link previews for links in this message
reply_markup object
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

delete_message

operation 'delete_message' required
Delete a message
chat_id unknown required
Unique identifier for the target chat or username
message_id number required
Identifier of the message to delete
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

get_me

operation 'get_me' required
Get bot information
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

get_chat

operation 'get_chat' required
Get information about a chat
chat_id unknown required
Unique identifier for the target chat or username
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

get_updates

operation 'get_updates' required
Receive incoming updates using long polling
offset number
Identifier of the first update to be returned
limit number
Limits the number of updates to be retrieved (1-100)
timeout number
Timeout in seconds for long polling
allowed_updates string[]
List of update types to receive
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

send_chat_action

operation 'send_chat_action' required
Tell the user that something is happening on the bot's side (typing, uploading photo, etc.)
chat_id unknown required
Unique identifier for the target chat or username
action 'typing' | 'upload_photo' | 'record_video' | 'upload_video' | 'record_voice' | 'upload_voice' | 'upload_document' | 'find_location' | 'record_video_note' | 'upload_video_note' | 'choose_sticker' required
Type of action to broadcast
message_thread_id number
Unique identifier for the target message thread (for forum topics)
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

set_message_reaction

operation 'set_message_reaction' required
Add a reaction to a message
chat_id unknown required
Unique identifier for the target chat or username
message_id number required
Identifier of the message to react to
reaction unknown[]
Array of reactions to set (empty array to remove reactions)
is_big boolean
Pass True to set the reaction with a bigger animation
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

set_webhook

operation 'set_webhook' required
Specify a URL to receive incoming updates via webhook
url unknown required
HTTPS URL to send updates to. Use an empty string to remove webhook integration
ip_address string
The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS
max_connections number
Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery (1-100). Defaults to 40
allowed_updates string[]
A list of update types you want your bot to receive (e.g., ["message", "callback_query"])
drop_pending_updates boolean
Pass True to drop all pending updates
secret_token string
A secret token to be sent in the X-Telegram-Bot-Api-Secret-Token header (1-256 characters, A-Z, a-z, 0-9, _, -)
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

delete_webhook

operation 'delete_webhook' required
Remove webhook integration to switch back to getUpdates
drop_pending_updates boolean
Pass True to drop all pending updates
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

get_webhook_info

operation 'get_webhook_info' required
Get current webhook status and information
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)