Telegram AI
pendingby reaLm74
AI-powered Telegram sync with smart categorization, media grouping, and local document processing.
Telegram AI Sync
An advanced plugin that syncs Telegram messages to your vault with AI-powered processing (OpenAI), smart categorization, and automated content organization.
โจ Key Features
- ๐ค AI Intelligence: Supports OpenAI (GPT-4 & Whisper). Automatically analyzes text, images, and seamlessly transcribes voice messages, audio, and video files.
- ๐ Local Processing: Extracts text from documents (PDF, DOCX, TXT, Code files) locally to protect privacy and save API costs, with AI processing as a fallback.
- ๐ธ Media Albums: Smartly handles Telegram media groups/albums, keeping context together in a single note.
- ๐ Smart Logic: URL-only messages skip AI to save tokens; distinct prompts can be applied based on the content type.
- ๐ก๏ธ Robust Error Handling: Automatically detects and displays user-friendly alerts for API issues, such as exhausted billing quotas or invalid/revoked keys, preventing silent failures.
- ๐ Dynamic Templates: Use powerful variables like
{{ai:title}},{{category}}, and{{date:YYYY-MM}}for file naming.
๐ Quick Start
- Install: Download
main.js,manifest.json, andstyles.cssfrom Releases to.obsidian/plugins/telegram-ai/. - Obsidian: Settings โ Community Plugins โ Enable "Telegram AI Sync".
- Telegram Bot: Create a bot via @BotFather, copy the Token.
- Configure:
- Enter Bot Token in plugin settings.
- Add your Telegram User ID to "Allowed Chats".
- Select your AI Provider and enter the API Key.
๐ Configuration & Usage
Template Variables
Customize how notes are created in the settings:
{{date:YYYY-MM-DD}}: Current date.{{ai:title}}: AI-generated title based on content.{{content}}: The processed message body.{{category}}: AI-detected category (e.g., Work, Ideas).
AI Prompts
Using the built-in wide-modal prompt editor, you can define specific behavior and toggle processing for different content types:
- General Formatting: Applied to all processed content as a final formatting step.
- Text: Instructions for processing plain text messages.
- Audio & Video: A unified prompt for handling transcripts generated by the Whisper API from voice messages, audio files, and video tracks.
- Photos: "Analyze this image and extract text/context..." (Requires Vision API).
- Documents: "Summarize this document..." (Handles parsed text from PDFs, DOCX, etc.).
๐๏ธ Settings Overview
Telegram Connection
- Bot Token: Your Telegram bot token.
- Allowed Chats: Whitelist of authorized users.
- Connection Status: Real-time connection monitoring.
AI Configuration
- Provider Selection: OpenAI.
- Model Settings: Temperature, max tokens, timeout.
- Prompt Management: Content-specific, unified media, and general prompts with a dedicated full-width editing interface.
- Processing Toggles: Enable/disable AI parsing for each content type (Text, Photos, Audio/Video, Documents).
Organization
- Categories: Define note categories with keywords.
- Templates: Customize file paths and naming.
- Distribution Rules: Advanced message routing.
- Local Processing: Enable direct document text extraction for PDF and DOCX files.
๐ค Acknowledgments
Special thanks to the open-source community.
- Foundation: This plugin was inspired by and built upon the excellent work of obsidian-telegram-sync by soberhacker.
- Libraries: Built with Obsidian API,
node-telegram-bot-api,pdf-parse, andmammoth.
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.