Telegram AI

pending

by reaLm74

AI-powered Telegram sync with smart categorization, media grouping, and local document processing.

Updated 22d agoAGPL-3.0Discovered via Obsidian Unofficial Plugins
View on GitHub

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

  1. Install: Download main.js, manifest.json, and styles.css from Releases to .obsidian/plugins/telegram-ai/.
  2. Obsidian: Settings โ†’ Community Plugins โ†’ Enable "Telegram AI Sync".
  3. Telegram Bot: Create a bot via @BotFather, copy the Token.
  4. 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, and mammoth.

Made for the Obsidian Community
Report Bug ยท Request Feature

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.