Telegram AI

by realm74
5
4
3
2
1
Score: 35/100
New Plugin

Description

This plugin has not been manually reviewed by Obsidian staff. AI-powered Telegram sync with smart categorization, media grouping, and local document processing.

Reviews

No reviews yet.

Stats

stars
downloads
0
forks
0
days
NaN
days
NaN
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
0
commits

Latest Version

Invalid date

Changelog

README file from

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.