Skip to content

A Telegram bot that extracts article content from URLs and saves it as markdown notes in your Obsidian vault.

Notifications You must be signed in to change notification settings

Paulius0112/ObsidianLinkBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ObsidianLinkBot

A Telegram bot that extracts article content from URLs and saves it as markdown notes in your Obsidian vault.

How it works

  1. Send a link to any article via Telegram
  2. The bot fetches the page and extracts the main content using trafilatura
  3. The article is saved as a .md file with YAML frontmatter (source URL, date) in your Obsidian vault
  4. The bot replies with a confirmation

Setup

Prerequisites

  • Python 3.9+
  • A Telegram bot token (get one from @BotFather)

Installation

git clone <repo-url>
cd ObsidianLinkBot
python -m venv venv
source venv/bin/activate
pip install -e .

Configuration

Create a .env file in the project root:

TELEGRAM_TOKEN=your-bot-token-here

Create a config.toml file in the project root:

[telegram]
allowed_users = []  # add your Telegram user ID here, e.g. [123456789]

[obsidian]
vault_path = "/path/to/your/obsidian/vault/articles"
  • allowed_users — list of Telegram user IDs allowed to use the bot. Leave empty to allow everyone. Message @userinfobot to find your ID.
  • vault_path — absolute path to the folder where articles will be saved. The folder must exist.

Usage

obsidianlinkbot

Or:

python -m obsidianlinkbot.main

Send /start to the bot for a welcome message, then paste any article URL.

Development

Running tests

pip install pytest
pytest tests/

ObsidianLinkBot

About

A Telegram bot that extracts article content from URLs and saves it as markdown notes in your Obsidian vault.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published