Obsidian Notes AI Bot Integration
Sync your Obsidian notes with OpenClaw or OpenClaw. Query your knowledge base, create notes, and search your vault via Discord or Telegram.
Overview
Connect your Obsidian vault to your AI chatbot and unlock powerful knowledge management. Ask questions about your notes, create new entries on the go, and search your entire knowledge base through natural conversation.
Use Cases
- Quick Capture: Message your bot to create notes while away from your computer
- Knowledge Query: "What did I write about project X?"
- Search: "Find all notes mentioning client ABC"
- Daily Notes: "Add to today's daily note: had meeting with John"
- Cross-Reference: "What notes link to 'Machine Learning'?"
Architecture
User Message
↓
[VPS - OpenClaw/OpenClaw]
↓
[Obsidian Vault via Sync]
↓
Notes Created/Queried
Setup Methods
Method 1: Git Sync (Recommended)
Sync your Obsidian vault to your VPS via Git:
On your local machine:
cd /path/to/obsidian/vault
git init
git remote add origin git@github.com:yourusername/obsidian-vault.git
git add -A && git commit -m "Initial commit"
git push -u origin main
On your VPS:
cd /opt/openclaw
git clone git@github.com:yourusername/obsidian-vault.git vault
Auto-sync with cron:
# Sync every 5 minutes
*/5 * * * * cd /opt/openclaw/vault && git pull && git add -A && git commit -m "Auto sync" && git push
Method 2: Obsidian Sync API
If using Obsidian Sync, you can access notes via their API (requires subscription).
Method 3: File Sync Services
Use Syncthing or rclone to sync vault folder to VPS.
# Syncthing setup
apt install syncthing
syncthing serve --home=/opt/syncthing
Bot Configuration
Environment Variables
# Obsidian Integration
OBSIDIAN_ENABLED=true
OBSIDIAN_VAULT_PATH=/opt/openclaw/vault
OBSIDIAN_DEFAULT_FOLDER=Inbox
OBSIDIAN_DAILY_NOTES_FOLDER=Daily Notes
OBSIDIAN_DAILY_FORMAT=YYYY-MM-DD
System Prompt
You have access to an Obsidian knowledge base. You can:
- Search notes by content or title
- Create new notes in the Inbox folder
- Append to existing notes
- Query the daily note
When searching, provide relevant excerpts. When creating notes, use proper Markdown formatting and add relevant tags.
Example Interactions
Create a Note
User: "Create a note about the meeting with ABC Corp" Bot: "I've created a new note 'Meeting - ABC Corp - 2025-01-27' in your Inbox with the following:
# Meeting - ABC Corp
Date: 2025-01-27
Attendees:
## Notes
## Action Items
- [ ]
#meeting #abc-corp
Would you like me to add any details?"
Search Notes
User: "What do my notes say about Kubernetes?" Bot: "I found 5 notes mentioning Kubernetes:
- DevOps Setup Guide - Contains your K8s cluster configuration
- Project Alpha Notes - Mentions migrating to Kubernetes in Q2
- Learning Log - Your Kubernetes certification study notes
- Interview Prep - K8s questions and answers
- 2024 Goals - Listed 'Learn Kubernetes' as objective
Would you like me to show details from any of these?"
Daily Note
User: "Add to today's note: finished the API documentation" Bot: "Added to your daily note (2025-01-27):
- 14:32 - finished the API documentation
Your daily note now has 4 entries."
Security Considerations
Private Vault Protection
Your notes may contain sensitive information:
# Exclude sensitive folders from bot access
OBSIDIAN_EXCLUDED_FOLDERS=Personal,Finance,Health
OBSIDIAN_EXCLUDED_TAGS=#private,#sensitive
Encryption
Encrypt your vault at rest:
# Use encrypted folder
sudo apt install ecryptfs-utils
mount -t ecryptfs /opt/vault-encrypted /opt/openclaw/vault
Access Control
Only allow specific users to access notes:
# Whitelist users who can access Obsidian
OBSIDIAN_ALLOWED_USERS=123456789,987654321
Advanced Features
Semantic Search
Add vector embeddings for intelligent search:
# Enable AI-powered search
OBSIDIAN_SEMANTIC_SEARCH=true
EMBEDDING_MODEL=text-embedding-3-small
This allows queries like "notes about improving productivity" even if "productivity" isn't mentioned directly.
Template Support
Use templates for new notes:
OBSIDIAN_TEMPLATES_FOLDER=Templates
OBSIDIAN_DEFAULT_TEMPLATE=Basic Note
Link Suggestions
The bot can suggest relevant notes to link:
User: "Create a note about my new React project" Bot: "Created 'React Project - New App'. I noticed you have related notes:
- [[React Best Practices]]
- [[Frontend Architecture]]
- [[Project Template]]
Should I add links to any of these?"
Folder Structure Recommendation
Vault/
├── Inbox/ # Bot creates notes here
├── Daily Notes/ # Daily journal
├── Projects/ # Project-specific notes
├── Reference/ # Knowledge base
├── Personal/ # Excluded from bot
└── Templates/ # Note templates
Sync Conflict Handling
When using Git sync, handle conflicts:
# In sync script
cd /opt/openclaw/vault
git pull --rebase || git stash && git pull && git stash pop
Performance Tips
Index Your Vault
For large vaults, create a search index:
OBSIDIAN_INDEX_ENABLED=true
OBSIDIAN_INDEX_REFRESH=3600 # Rebuild index every hour
Cache Frequently Accessed Notes
OBSIDIAN_CACHE_SIZE=100 # Cache last 100 accessed notes
Troubleshooting
Notes not syncing
# Check sync status
cd /opt/openclaw/vault
git status
git log --oneline -5
Bot can't find notes
- Verify vault path is correct
- Check file permissions
- Ensure sync is running
Duplicate notes created
Implement note title checking:
OBSIDIAN_CHECK_DUPLICATES=true
OBSIDIAN_DUPLICATE_ACTION=append # or 'rename'
Related Guides
Need Help?
Integrating Obsidian requires careful setup. Our premium service includes custom integrations like Obsidian vault connection.
Need a VPS for Your Bot?
We recommend Hostinger KVM 2 VPS - reliable, fast, and perfect for AI chatbots. Get started with our recommended setup.
Get Hostinger VPSNeed Help With Setup?
Got your VPS? Let us handle the technical work. Professional setup and maintenance for OpenClaw (formerly Clawd.bot).