Alex53 downloadsSend messages to your own Telegram bot to file them into notes, and ask it what tasks are due.
An Obsidian plugin that connects a personal Telegram bot to your vault.
It works in two directions:
The plugin is built for one person, one bot and one vault. It needs a Telegram account and a
bot of your own, and nothing else: no server, no account with me or any third-party service,
and the only host it ever talks to is api.telegram.org.
isDesktopOnly, and the plugin holds a long polling
connection open while it listens.The plugin is not in the community list yet, so install it by hand:
main.js, manifest.json and styles.css from a release.<vault>/.obsidian/plugins/telegram-bot-integration-by-msxd/.Everything lives in Settings → Telegram Vault Bot.
Rules are checked top to bottom and the first match wins. Whatever no rule claims goes to the default rule at the bottom, which cannot be removed.
Every rule decides on its own where and how a message is written:
| Field | What it does |
|---|---|
| Filter | Which messages the rule claims |
| Path | Where the note goes. Ending in .md names the note itself, anything else is a folder |
| Media path | Folder for photos, files and voice notes |
| Note name | Used when the path points at a folder |
| Heading | Written above the message body |
| Separate messages | Puts a horizontal rule before a message added to a note that already has content |
| Filter | Matches |
|---|---|
{{all}} |
every message |
{{content~text}} |
the message contains text |
{{hashtag~tag}} |
the message carries #tag |
Paths, note names and headings take the same variables:
| Variable | Value |
|---|---|
{{content:30}} |
first 30 characters of the message |
{{chat}}, {{chatId}} |
chat name and id |
{{topic}}, {{topicId}} |
forum topic name and id |
{{messageId}} |
message id |
{{user}}, {{userId}} |
sender username (or id when there is none) and id |
{{messageDate:YYYY-MM-DD}} |
date in the given format |
{{messageTime:HH:mm}} |
time in the given format |
{{hashtag:[0]}} |
first hashtag, without the # |
Date formats are moment.js formats. The rule editor shows a live preview of the path against a sample message, so there is no need to guess.
A path that already exists is appended to rather than overwritten, which is what makes
Journal/{{messageDate:YYYY-MM}}.md collect a month of messages in one note. Attachments are
downloaded into the media folder and embedded in the note; a file Telegram refuses to hand over
is skipped with a notice, and the text of the message is still saved.
Commands work in an allowed chat while receiving is on. A message that is not a command the plugin knows stays a message and is filed as a note, so nothing is swallowed by a typo.
| Command | Answers with |
|---|---|
/tasks |
tasks due today |
/tasks 3 |
tasks due today and the next two days |
/tasks 3 work |
the same, limited to the topic work |
/tasks2, /tasks5, /tasks7 |
today plus 2, 5 or 7 days |
/topics |
the topic codes and where they point |
The number in a command name is days ahead of today, so /tasks2 is the same three days as
/tasks 3. Any number works when typed by hand: /tasks4 covers today plus four days.
A topic is a code word for one place in the vault. Add one under Commands: a code, and a path to either a folder (every note inside it is searched) or a single note. Without a topic a command searches the whole vault.
A topic can also answer to commands of its own. Switch commands on in its row and the bot
takes /work, /work2, /work5 and /work7 the same way it takes /tasks. This needs a code
Telegram accepts as a command name — lowercase letters, digits and _ — and the names tasks,
topics and tasks<number> belong to the plugin itself.
Press Update commands after adding or removing topics: the list Telegram holds is replaced whole, so it only changes when it is sent again.
Tasks are read in the Tasks plugin's emoji format:
- [ ] Call the doctor 📅 2026-09-20
x, X or -.Notes are found through Obsidian's own metadata cache, so a search reads only the notes that actually hold checkboxes, and it never writes anything.
<vault>/.obsidian/plugins/<id>/data.json.
Obsidian offers no encrypted storage, so treat the vault as a secret. The token is never
written to a notice, a log or the console.api.telegram.org, and only to receive your messages,
download what you attached and send what you asked for. There is no telemetry, and nothing
leaves the vault unless a command asked for it.npm install
npm run dev # esbuild in watch mode, writes main.js with an inline sourcemap
npm run build # type check, then a production build
npm run lint # eslint, including the Obsidian plugin rules
The repository is meant to sit inside a vault at <vault>/.obsidian/plugins/<id>/, so a build
lands where Obsidian will load it. After a build, reload the plugin from Settings → Community
plugins to see the change.
MIT: use it, change it, ship it, as long as the copyright notice travels with it.
It grew out of the Obsidian sample plugin, which is released under 0BSD and asks for nothing in return.