A Telegram bot that extracts article content from URLs and saves it as markdown notes in your Obsidian vault.
- Send a link to any article via Telegram
- The bot fetches the page and extracts the main content using trafilatura
- The article is saved as a
.mdfile with YAML frontmatter (source URL, date) in your Obsidian vault - The bot replies with a confirmation
- Python 3.9+
- A Telegram bot token (get one from @BotFather)
git clone <repo-url>
cd ObsidianLinkBot
python -m venv venv
source venv/bin/activate
pip install -e .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.
obsidianlinkbotOr:
python -m obsidianlinkbot.mainSend /start to the bot for a welcome message, then paste any article URL.
pip install pytest
pytest tests/