{"slug":"telegram-automation","title":"telegram-automation","summary":"Automate Telegram tasks via Rube MCP (Composio): send messages, manage chats, share photos/documents, and handle bot commands. Always search tools first for current schemas.","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-09-14T20:53:48.537765Z","repo":{"url":"https://github.com/davepoon/buildwithclaude","stars":3494,"forks":514,"license":"MIT","updatedAt":"2026-09-17T11:58:48Z"},"bodyHtml":"<hr>\n<h2>name: telegram-automation\ndescription: \"Automate Telegram tasks via Rube MCP (Composio): send messages, manage chats, share photos/documents, and handle bot commands. Always search tools first for current schemas.\"\nrequires:\nmcp: [rube]\ncategory: communication</h2>\n<h1>Telegram Automation via Rube MCP</h1>\n<p>Automate Telegram operations through Composio's Telegram toolkit via Rube MCP.</p>\n<p><strong>Toolkit docs</strong>: <a href=\"https://composio.dev/toolkits/telegram\">composio.dev/toolkits/telegram</a></p>\n<h2>Prerequisites</h2>\n<ul>\n<li>Rube MCP must be connected (RUBE_SEARCH_TOOLS available)</li>\n<li>Active Telegram connection via <code>RUBE_MANAGE_CONNECTIONS</code> with toolkit <code>telegram</code></li>\n<li>Always call <code>RUBE_SEARCH_TOOLS</code> first to get current tool schemas</li>\n<li>Telegram Bot Token required (created via @BotFather)</li>\n</ul>\n<h2>Setup</h2>\n<p><strong>Get Rube MCP</strong>: Add <code>https://rube.app/mcp</code> as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.</p>\n<ol>\n<li>Verify Rube MCP is available by confirming <code>RUBE_SEARCH_TOOLS</code> responds</li>\n<li>Call <code>RUBE_MANAGE_CONNECTIONS</code> with toolkit <code>telegram</code></li>\n<li>If connection is not ACTIVE, follow the returned auth link to configure the Telegram bot</li>\n<li>Confirm connection status shows ACTIVE before running any workflows</li>\n</ol>\n<h2>Core Workflows</h2>\n<h3>1. Send Messages</h3>\n<p><strong>When to use</strong>: User wants to send text messages to a Telegram chat</p>\n<p><strong>Tool sequence</strong>:</p>\n<ol>\n<li><code>TELEGRAM_GET_ME</code> - Verify bot identity and connection [Prerequisite]</li>\n<li><code>TELEGRAM_GET_CHAT</code> - Get chat details and verify access [Optional]</li>\n<li><code>TELEGRAM_SEND_MESSAGE</code> - Send a text message [Required]</li>\n</ol>\n<p><strong>Key parameters</strong>:</p>\n<ul>\n<li><code>chat_id</code>: Numeric chat ID or channel username (e.g., '@channelname')</li>\n<li><code>text</code>: Message text content</li>\n<li><code>parse_mode</code>: 'HTML' or 'MarkdownV2' for formatting</li>\n<li><code>disable_notification</code>: Send silently without notification sound</li>\n<li><code>reply_to_message_id</code>: Message ID to reply to</li>\n</ul>\n<p><strong>Pitfalls</strong>:</p>\n<ul>\n<li>Bot must be a member of the chat/group to send messages</li>\n<li>MarkdownV2 requires escaping special characters: <code>_*[]()~&gt;#+-=|{}.!</code></li>\n<li>HTML mode supports limited tags: <code>&lt;b&gt;</code>, <code>&lt;i&gt;</code>, <code>&lt;code&gt;</code>, <code>&lt;pre&gt;</code>, <code>&lt;a&gt;</code></li>\n<li>Messages have a 4096 character limit; split longer content</li>\n</ul>\n<h3>2. Send Photos and Documents</h3>\n<p><strong>When to use</strong>: User wants to share images or files in a Telegram chat</p>\n<p><strong>Tool sequence</strong>:</p>\n<ol>\n<li><code>TELEGRAM_SEND_PHOTO</code> - Send an image [Optional]</li>\n<li><code>TELEGRAM_SEND_DOCUMENT</code> - Send a file/document [Optional]</li>\n</ol>\n<p><strong>Key parameters</strong>:</p>\n<ul>\n<li><code>chat_id</code>: Target chat ID</li>\n<li><code>photo</code>: Photo URL or file_id (for SEND_PHOTO)</li>\n<li><code>document</code>: Document URL or file_id (for SEND_DOCUMENT)</li>\n<li><code>caption</code>: Optional caption for the media</li>\n</ul>\n<p><strong>Pitfalls</strong>:</p>\n<ul>\n<li>Photo captions have a 1024 character limit</li>\n<li>Document captions also have a 1024 character limit</li>\n<li>Files up to 50MB can be sent via bot API</li>\n<li>Photos are compressed by Telegram; use SEND_DOCUMENT for uncompressed images</li>\n</ul>\n<h3>3. Manage Chats</h3>\n<p><strong>When to use</strong>: User wants to get chat information or manage chat settings</p>\n<p><strong>Tool sequence</strong>:</p>\n<ol>\n<li><code>TELEGRAM_GET_CHAT</code> - Get detailed chat information [Required]</li>\n<li><code>TELEGRAM_GET_CHAT_ADMINISTRATORS</code> - List chat admins [Optional]</li>\n<li><code>TELEGRAM_GET_CHAT_MEMBERS_COUNT</code> - Get member count [Optional]</li>\n<li><code>TELEGRAM_EXPORT_CHAT_INVITE_LINK</code> - Generate invite link [Optional]</li>\n</ol>\n<p><strong>Key parameters</strong>:</p>\n<ul>\n<li><code>chat_id</code>: Target chat ID or username</li>\n</ul>\n<p><strong>Pitfalls</strong>:</p>\n<ul>\n<li>Bot must be an administrator to export invite links</li>\n<li>GET_CHAT returns different fields for private chats vs groups vs channels</li>\n<li>Member count may be approximate for very large groups</li>\n<li>Admin list does not include regular members</li>\n</ul>\n<h3>4. Edit and Delete Messages</h3>\n<p><strong>When to use</strong>: User wants to modify or remove previously sent messages</p>\n<p><strong>Tool sequence</strong>:</p>\n<ol>\n<li><code>TELEGRAM_EDIT_MESSAGE</code> - Edit a sent message [Optional]</li>\n<li><code>TELEGRAM_DELETE_MESSAGE</code> - Delete a message [Optional]</li>\n</ol>\n<p><strong>Key parameters</strong>:</p>\n<ul>\n<li><code>chat_id</code>: Chat where the message is located</li>\n<li><code>message_id</code>: ID of the message to edit or delete</li>\n<li><code>text</code>: New text content (for edit)</li>\n</ul>\n<p><strong>Pitfalls</strong>:</p>\n<ul>\n<li>Bots can only edit their own messages</li>\n<li>Messages can only be deleted within 48 hours of sending</li>\n<li>In groups, bots with delete permissions can delete any message</li>\n<li>Editing a message removes its 'edited' timestamp history</li>\n</ul>\n<h3>5. Forward Messages and Get Updates</h3>\n<p><strong>When to use</strong>: User wants to forward messages or retrieve recent updates</p>\n<p><strong>Tool sequence</strong>:</p>\n<ol>\n<li><code>TELEGRAM_FORWARD_MESSAGE</code> - Forward a message to another chat [Optional]</li>\n<li><code>TELEGRAM_GET_UPDATES</code> - Get recent bot updates/messages [Optional]</li>\n<li><code>TELEGRAM_GET_CHAT_HISTORY</code> - Get chat message history [Optional]</li>\n</ol>\n<p><strong>Key parameters</strong>:</p>\n<ul>\n<li><code>from_chat_id</code>: Source chat for forwarding</li>\n<li><code>chat_id</code>: Destination chat for forwarding</li>\n<li><code>message_id</code>: Message to forward</li>\n<li><code>offset</code>: Update offset for GET_UPDATES</li>\n<li><code>limit</code>: Number of updates to retrieve</li>\n</ul>\n<p><strong>Pitfalls</strong>:</p>\n<ul>\n<li>Forwarded messages show the original sender attribution</li>\n<li>GET_UPDATES returns a limited window of recent updates</li>\n<li>Chat history access may be limited by bot permissions and chat type</li>\n<li>Use offset to avoid processing the same update twice</li>\n</ul>\n<h3>6. Manage Bot Commands</h3>\n<p><strong>When to use</strong>: User wants to set or update bot command menu</p>\n<p><strong>Tool sequence</strong>:</p>\n<ol>\n<li><code>TELEGRAM_SET_MY_COMMANDS</code> - Set the bot's command list [Required]</li>\n<li><code>TELEGRAM_ANSWER_CALLBACK_QUERY</code> - Respond to inline button presses [Optional]</li>\n</ol>\n<p><strong>Key parameters</strong>:</p>\n<ul>\n<li><code>commands</code>: Array of command objects with <code>command</code> and <code>description</code></li>\n<li><code>callback_query_id</code>: ID of the callback query to answer</li>\n</ul>\n<p><strong>Pitfalls</strong>:</p>\n<ul>\n<li>Commands must start with '/' and be lowercase</li>\n<li>Command descriptions have a 256 character limit</li>\n<li>Callback queries must be answered within 10 seconds or they expire</li>\n<li>Setting commands replaces the entire command list</li>\n</ul>\n<h2>Common Patterns</h2>\n<h3>Chat ID Resolution</h3>\n<p><strong>From username</strong>:</p>\n<pre><code>1. Use '@username' format as chat_id (for public channels/groups)\n2. For private chats, numeric chat_id is required\n3. Call GET_CHAT with username to retrieve numeric ID\n</code></pre>\n<p><strong>From GET_UPDATES</strong>:</p>\n<pre><code>1. Call TELEGRAM_GET_UPDATES\n2. Extract chat.id from message objects\n3. Use numeric chat_id in subsequent calls\n</code></pre>\n<h3>Message Formatting</h3>\n<ul>\n<li>Use <code>parse_mode: 'HTML'</code> for <code>&lt;b&gt;bold&lt;/b&gt;</code>, <code>&lt;i&gt;italic&lt;/i&gt;</code>, <code>&lt;code&gt;code&lt;/code&gt;</code></li>\n<li>Use <code>parse_mode: 'MarkdownV2'</code> for <code>*bold*</code>, <code>_italic_</code>, <code>`code`</code></li>\n<li>Escape special chars in MarkdownV2: <code>_ * [ ] ( ) ~ &gt; # + - = | { } . !</code></li>\n<li>Omit parse_mode for plain text without formatting</li>\n</ul>\n<h2>Known Pitfalls</h2>\n<p><strong>Bot Permissions</strong>:</p>\n<ul>\n<li>Bots must be added to groups/channels to interact</li>\n<li>Admin permissions needed for: deleting messages, exporting invite links, managing members</li>\n<li>Bots cannot initiate conversations; users must start them first</li>\n</ul>\n<p><strong>Rate Limits</strong>:</p>\n<ul>\n<li>30 messages per second to the same group</li>\n<li>20 messages per minute to the same user in groups</li>\n<li>Bulk operations should implement delays between calls</li>\n<li>API returns 429 Too Many Requests when limits are hit</li>\n</ul>\n<p><strong>Chat Types</strong>:</p>\n<ul>\n<li>Private chat: One-on-one with the bot</li>\n<li>Group: Multi-user chat (bot must be added)</li>\n<li>Supergroup: Enhanced group with admin features</li>\n<li>Channel: Broadcast-only (bot must be admin to post)</li>\n</ul>\n<p><strong>Message Limits</strong>:</p>\n<ul>\n<li>Text messages: 4096 characters max</li>\n<li>Captions: 1024 characters max</li>\n<li>File uploads: 50MB max via bot API</li>\n<li>Inline keyboard buttons: 8 per row</li>\n</ul>\n<h2>Quick Reference</h2>\n<table>\n<thead>\n<tr>\n<th>Task</th>\n<th>Tool Slug</th>\n<th>Key Params</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Verify bot</td>\n<td>TELEGRAM_GET_ME</td>\n<td>(none)</td>\n</tr>\n<tr>\n<td>Send message</td>\n<td>TELEGRAM_SEND_MESSAGE</td>\n<td>chat_id, text, parse_mode</td>\n</tr>\n<tr>\n<td>Send photo</td>\n<td>TELEGRAM_SEND_PHOTO</td>\n<td>chat_id, photo, caption</td>\n</tr>\n<tr>\n<td>Send document</td>\n<td>TELEGRAM_SEND_DOCUMENT</td>\n<td>chat_id, document, caption</td>\n</tr>\n<tr>\n<td>Edit message</td>\n<td>TELEGRAM_EDIT_MESSAGE</td>\n<td>chat_id, message_id, text</td>\n</tr>\n<tr>\n<td>Delete message</td>\n<td>TELEGRAM_DELETE_MESSAGE</td>\n<td>chat_id, message_id</td>\n</tr>\n<tr>\n<td>Forward message</td>\n<td>TELEGRAM_FORWARD_MESSAGE</td>\n<td>chat_id, from_chat_id, message_id</td>\n</tr>\n<tr>\n<td>Get chat info</td>\n<td>TELEGRAM_GET_CHAT</td>\n<td>chat_id</td>\n</tr>\n<tr>\n<td>Get chat admins</td>\n<td>TELEGRAM_GET_CHAT_ADMINISTRATORS</td>\n<td>chat_id</td>\n</tr>\n<tr>\n<td>Get member count</td>\n<td>TELEGRAM_GET_CHAT_MEMBERS_COUNT</td>\n<td>chat_id</td>\n</tr>\n<tr>\n<td>Export invite link</td>\n<td>TELEGRAM_EXPORT_CHAT_INVITE_LINK</td>\n<td>chat_id</td>\n</tr>\n<tr>\n<td>Get updates</td>\n<td>TELEGRAM_GET_UPDATES</td>\n<td>offset, limit</td>\n</tr>\n<tr>\n<td>Get chat history</td>\n<td>TELEGRAM_GET_CHAT_HISTORY</td>\n<td>chat_id</td>\n</tr>\n<tr>\n<td>Set bot commands</td>\n<td>TELEGRAM_SET_MY_COMMANDS</td>\n<td>commands</td>\n</tr>\n<tr>\n<td>Answer callback</td>\n<td>TELEGRAM_ANSWER_CALLBACK_QUERY</td>\n<td>callback_query_id</td>\n</tr>\n</tbody>\n</table>\n<hr>\n<p><em>Powered by <a href=\"https://composio.dev\">Composio</a></em></p>\n","files":[{"path":"SKILL.md","sizeBytes":8265,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-09-14T20:55:41.933962Z","sha256":"725369F9979BE950CA60303940C8F65DC25C70A8454EEB3E116F3845ED378D07","sizeBytes":3305},"review":null,"source":{"repositoryUrl":"https://github.com/davepoon/buildwithclaude","path":"plugins/all-skills/skills/telegram-automation","license":"MIT","commit":"2e757dae349898c0b761bd8926acdacb35f21954","subtreeSha":"6E910D62777E75A3934A58A5A772BA06D104C02DBEFCCF8BC0F2E6A6A1368C6D","lastSyncedAt":"2026-09-19T13:50:10.625828Z"},"reviewedAt":"2026-09-14T21:01:14.862637Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/davepoon/buildwithclaude/tree/main/plugins/all-skills/skills/telegram-automation"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install davepoon-buildwithclaude@llmmart"},{"target":"git","command":"git clone https://github.com/davepoon/buildwithclaude.git"}]}