Capture fleeting thoughts on mobile via Telegram, automatically synced to your Obsidian vault.
- Quick Capture – Text thoughts to your Telegram bot like messaging a friend
- Cloud Queuing – Messages stored securely until your PC syncs them
- Auto-Sync – Pulls thoughts automatically when your computer starts
- Organized Output – Thoughts grouped by date with timestamps
- Private & Secure – Bot only responds to your Telegram account
- Free Hosting – Runs on Cloudflare's generous free tier
┌──────────────┐ ┌───────────────────┐ ┌─────────────────┐
│ You on │────▶│ Cloudflare │────▶│ Cloudflare KV │
│ Telegram │ │ Worker │ │ (Storage) │
└──────────────┘ └───────────────────┘ └────────┬────────┘
│
▼
┌──────────────┐ ┌───────────────────┐ ┌─────────────────┐
│ Obsidian │◀────│ Local Sync │◀────│ When PC is on │
│ Vault │ │ Script │ │ │
└──────────────┘ └───────────────────┘ └─────────────────┘
- You send a thought to your Telegram bot while on the go
- Cloudflare Worker receives it, timestamps it, stores it in KV
- Local sync script runs when your PC starts, pulls new thoughts
- Quick Thoughts.md in your vault gets updated with your captured ideas
- Cloudflare account (free)
- Telegram account
- Python 3.8+ installed on your PC
- An Obsidian vault
- Open Telegram and search for @BotFather
- Send
/newbotand follow the prompts - Save the bot token (looks like
123456789:ABCdefGHI...)
- Search for @userinfobot in Telegram
- Send it any message
- Save the user ID it returns
- Log in to Cloudflare Dashboard
- Go to Storage and Databases → KV
- Click Create namespace
- Name it
obsidian-thoughts - Copy the Namespace ID
- Go to Workers & Pages → Create → Create Worker
- Name it
obsidian-quick-thoughts - Click Deploy
- Click Edit code
- Replace the code with the contents of
cloudflare-worker/worker.js - Important: Update these lines at the top with your values:
const TELEGRAM_BOT_TOKEN = 'YOUR_BOT_TOKEN_HERE'; const ALLOWED_USER_ID = YOUR_USER_ID_HERE;
- Click Save and Deploy
- Go to your worker → Settings → Variables and Secrets
- Find KV Namespace Bindings → Add
- Variable name:
THOUGHTS_KV - Select your
obsidian-thoughtsnamespace - Save
- Visit:
https://obsidian-quick-thoughts.YOUR_SUBDOMAIN.workers.dev/setup-webhook - Save the
syncSecretfrom the response – you'll need it!
- Open your bot in Telegram
- Send
/start - You should see: "✅ Connected!"
- Send a test thought
- You should see: "💭 Captured!"
-
Install the requests library:
pip install requests
-
Download
local-sync/sync_thoughts.py -
Edit the configuration at the top:
WORKER_URL = "https://obsidian-quick-thoughts.YOUR_SUBDOMAIN.workers.dev" SYNC_SECRET = "your-sync-secret-from-step-3" VAULT_PATH = Path(r"C:\path\to\your\vault\Daily Notes")
-
Test it:
python sync_thoughts.py
- Save
local-sync/run_sync.batalongside your Python script - Press
Win + R, typeshell:startup, press Enter - Create a shortcut to
run_sync.batin this folder
Now your thoughts sync automatically whenever you log in!
telegram-obsidian-sync/
├── cloudflare-worker/
│ └── worker.js # Cloudflare Worker code
├── local-sync/
│ ├── sync_thoughts.py # Python sync script
│ └── run_sync.bat # Windows startup script
├── README.md
├── LICENSE
└── .gitignore
| Command | Description |
|---|---|
/start |
Initialize the bot |
/status |
Check pending thoughts count |
| Any text | Captured as a thought |
Your Quick Thoughts.md will look like:
## 2026-01-22
- 09:15 – idea about client presentation
- 14:32 – remember to check that cycling route
- 18:45 – book recommendation from podcast
## 2026-01-21
- 12:30 – thought from yesterday- User-locked: Bot only responds to your Telegram user ID
- Token-protected: Sync endpoint requires secret bearer token
- Your data: Stored in your own Cloudflare account
- Auto-cleanup: Thoughts deleted from cloud after successful sync
- Verify your bot token in the worker code
- Re-run the webhook setup: visit
/setup-webhook - Check Cloudflare Worker logs for errors
- Verify
WORKER_URLandSYNC_SECRETin the Python script - Ensure KV binding is correctly configured
- Test manually:
python sync_thoughts.py
- Check
VAULT_PATHpoints to the correct folder - Verify file permissions on the vault folder
Contributions are welcome! Feel free to:
- Report bugs
- Suggest features
- Submit pull requests
This project is licensed under the MIT License - see the LICENSE file for details.
- Obsidian – The incredible knowledge management app
- Cloudflare Workers – Free serverless platform
- Telegram Bot API – Simple and powerful
Made with love for the Obsidian community to nerd out on