-
Notifications
You must be signed in to change notification settings - Fork 3.3k
feat(telegram): added additional telegram tools & docs #1625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Summary
This PR expands the Telegram integration by adding five new tools (send photo, video, audio, animation, and delete message) alongside comprehensive documentation.
Key Changes
- Added operation dropdown to Telegram block with conditional fields for each tool type
- Implemented new tools:
telegram_send_photo,telegram_send_video,telegram_send_audio,telegram_send_animation,telegram_delete_message - Refactored
telegram_messagetool with improved response structure - Updated type definitions with union type
TelegramResponsefor all response types - Added detailed documentation for all tools with input/output specifications
Critical Issues Found
- Import path errors in index.ts - imports reference non-existent file names (
audio,delete,photo,videoinstead ofsend_audio,delete_message,send_photo,send_video), causing module resolution failures - Type mismatch for messageId - defined as
numberin types.ts but used asstringthroughout delete_message tool and block config
Style Issues
- Multiple files use
Record<string, any>type assertion violating project type safety guidelines
Confidence Score: 0/5
- This PR has critical runtime errors that will prevent the telegram tools from loading
- Score reflects two critical bugs: (1) import path errors in index.ts will cause module resolution failures preventing all telegram tools from loading, and (2) messageId type mismatch between types.ts (number) and implementation (string) will cause type errors. These must be fixed before merge.
- apps/sim/tools/telegram/index.ts (critical import errors), apps/sim/tools/telegram/types.ts (messageId type mismatch)
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| apps/sim/tools/telegram/index.ts | 0/5 | critical import path errors will cause runtime failures when loading telegram tools |
| apps/sim/tools/telegram/types.ts | 1/5 | messageId type mismatch (number vs string) will cause type errors across telegram tools |
| apps/sim/tools/telegram/delete_message.ts | 3/5 | new delete message tool implementation, type inconsistency with messageId parameter |
| apps/sim/tools/telegram/send_photo.ts | 4/5 | new photo sending tool, uses Record<string, any> instead of proper types |
| apps/sim/tools/telegram/send_video.ts | 4/5 | new video sending tool, uses Record<string, any> instead of proper types |
| apps/sim/tools/telegram/send_audio.ts | 4/5 | new audio sending tool, uses Record<string, any> instead of proper types |
| apps/sim/tools/telegram/send_animation.ts | 4/5 | new animation sending tool, uses Record<string, any> instead of proper types |
Sequence Diagram
sequenceDiagram
participant User
participant Block as Telegram Block
participant Registry as Tool Registry
participant Tool as Telegram Tool
participant API as Telegram Bot API
User->>Block: Select operation (message/photo/video/audio/animation/delete)
Block->>Block: Validate parameters based on operation
Block->>Registry: Request tool via config.tool(params)
Registry->>Tool: Route to specific tool (telegram_message, telegram_send_photo, etc.)
Tool->>Tool: Build request body with botToken, chatId, content
Tool->>API: POST to Telegram API endpoint
API-->>Tool: Response with message data or deletion status
Tool->>Tool: Transform response (success, message, data)
Tool-->>Block: Return formatted output
Block-->>User: Display result with message_id, chat info, timestamps
12 files reviewed, 6 comments
2e4c19b to
5b92fb0
Compare
This was referenced Oct 14, 2025
Sg312
pushed a commit
that referenced
this pull request
Oct 15, 2025
* feat(telegram): added delete message,send photo-video-audio-animation tools * fix: updated Telegram tool types and removed debug logs * reverted telegram message tool to older name * added docs for telegram * updated telegram docs --------- Co-authored-by: SimplyRohit <rohitjaatjaat073@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Type of Change
Testing
Manually
Checklist