Skip to content

πŸ€– A Telegram bot that transforms your messages into beautifully formatted Obsidian notes using Google Gemini AI. Automatically processes text and media, adds tags, and creates markdown files ready for your Obsidian vault.

Notifications You must be signed in to change notification settings

Sppqq/obsidianAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Obsidian Telegram Bot

πŸ‡·πŸ‡Ί Русская вСрсия

A powerful Telegram bot for managing notes and media files with automatic processing using Google's Gemini AI. The bot helps organize and format your notes in Markdown, making them perfect for Obsidian.

🌟 Features

  • πŸ€– AI-powered note processing using Google Gemini
  • πŸ“ Automatic Markdown formatting
  • 🏷️ Custom tag management system
  • πŸ“Έ Support for various media files (photos, audio, video, documents)
  • ☁️ Dropbox integration
  • πŸ”„ Proxy support for stable connection
  • πŸ‘₯ Multi-user support

πŸ› οΈ Prerequisites

  • Python 3.8+
  • Telegram Bot Token
  • Google Gemini API Key
  • Dropbox API credentials (optional)
  • Proxy (optional)

βš™οΈ Installation

  1. Clone the repository:
git clone https://github.com/Sppqq/obsidianAI.git
cd obsidianAI
  1. Install required dependencies:
pip install -r requirements.txt

πŸ“‹ Configuration

  1. The bot will automatically create a config.json file on first run. Configure it with your credentials:
{
    "user1": {
        "chat_id": YOUR_CHAT_ID,
        "bot_token": "YOUR_BOT_TOKEN",
        "gemini_api": "YOUR_GEMINI_API",
        "gemini_model": "gemini-2.0-flash-exp",
        "tags": ["#code", "#study", "#files", "#ai", "#other"],
        "db_app_key": "your-dropbox-key",
        "db_app_secret": "your-dropbox-secret",
        "db_redirect_uri": "http://localhost:8080",
        "proxy": {
            "http": "http://vyWVVn:[email protected]:9491",
            "https": "http://vyWVVn:[email protected]:9491"
        }
    }
}

πŸ”‘ Getting API Keys

  1. Telegram Bot Token:

    • Message @BotFather on Telegram
    • Create new bot with /newbot
    • Copy the provided token
  2. Google Gemini API:

  3. Dropbox API (optional):

πŸ”’ Proxy Configuration

The example proxy configuration is already included in the config file. Replace it with your own proxy if needed:

"proxy": {
    "http": "http://vyWVVn:[email protected]:9491",
    "https": "http://vyWVVn:[email protected]:9491"
}

πŸš€ Usage

  1. Start the bot:
python main.py
  1. Send /start to your bot on Telegram

  2. Use the following commands:

    • /start - Initialize the bot
    • /tags - Manage your tags
  3. Send any text or media to the bot:

    • The bot will process it using Gemini AI
    • Format it in Markdown
    • Add appropriate tags
    • Save it as a .md file

πŸ“ Note Format

The bot automatically formats notes with:

  • Clear, concise titles
  • Markdown formatting
  • Embedded media
  • Custom tags
  • Proper text formatting with bold emphasis
  • Emoji enhancements
  • Working links

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

πŸ€– A Telegram bot that transforms your messages into beautifully formatted Obsidian notes using Google Gemini AI. Automatically processes text and media, adds tags, and creates markdown files ready for your Obsidian vault.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages