4.0 KiB
4.0 KiB
Telegram AI Assistant - Setup Complete! 🎉
✅ What's Been Created
All 5 workflows have been successfully imported into n8n:
- Telegram Assistant - Receiver - Webhook listener for Telegram messages
- Telegram Assistant - Router - Command routing and dispatch
- Telegram Assistant - Deck Integration - Nextcloud Deck task management
- Telegram Assistant - Email Search - IMAP email search
- Telegram Assistant - AI Chat - OpenAI-powered chat
📍 Next Steps
1. Activate Workflows in n8n
Open https://flow.egonetix.de/ and activate each workflow:
- Click on each workflow
- Toggle the "Active" switch at the top
- Verify webhook endpoints are listening
2. Configure Telegram Webhook
You need to get your Telegram bot token and set the webhook URL:
# Replace <YOUR_BOT_TOKEN> with your actual bot token
curl -X POST "https://api.telegram.org/bot<YOUR_BOT_TOKEN>/setWebhook" \
-H "Content-Type: application/json" \
-d '{"url":"https://flow.egonetix.de/webhook/8f3f59db-aaa5-4762-9416-94be04131fd2"}'
To get your bot token:
- Open Telegram and search for @BotFather
- Send
/mybots - Select your bot
- Click "API Token"
3. Test Your Bot
Send these commands to your Telegram bot:
/start - Welcome message
/help - Show all commands
/deck add Review project proposal by Friday
/email search invoice
/ask What's the weather like today?
🔧 Credentials Used
The workflows use these existing n8n credentials:
- Telegram API:
Csk5cg4HtaSqP5jJ - OpenAI API:
openai_api_key - IMAP:
BntHPR3YbFD5jAIM
If any credentials are missing, add them in n8n Settings → Credentials.
📋 Available Commands
Deck Commands
/deck add <task>- Add task to Nextcloud Deck- Example:
/deck add Review Q4 reports by tomorrow - AI extracts: title, description, due date (supports German dates)
- Example:
Email Commands
/email search <query>- Search your inbox- Example:
/email search invoice November
- Example:
/email recent- Show 5 most recent emails
AI Commands
/ask <question>- Ask AI anything- Example:
/ask Explain quantum computing
- Example:
Other
/start- Welcome message/help- Show this help
🐛 Troubleshooting
Webhook Not Working
# Check webhook status
curl "https://api.telegram.org/bot<TOKEN>/getWebhookInfo"
# Verify n8n workflow is active
curl https://flow.egonetix.de/webhook/8f3f59db-aaa5-4762-9416-94be04131fd2
Workflows Not Executing
- Check n8n logs:
docker logs n8n - Verify all workflows are "Active" in n8n UI
- Check webhook endpoints are green/listening
Deck Card Creation Fails
# Test bash script manually
docker exec n8n /home/node/create_card_from_ai.sh "Test Task" "Description" ""
OpenAI API Errors
- Verify API key in n8n credentials
- Check OpenAI quota/billing
📁 Project Structure
/home/icke/assistant/
├── README.md # Main documentation
├── SETUP_COMPLETE.md # This file
├── import_workflows.sh # Import script (already run)
└── workflows/
├── telegram-receiver.json # ✅ Imported
├── telegram-router.json # ✅ Imported
├── telegram-deck.json # ✅ Imported
├── telegram-email.json # ✅ Imported
└── telegram-ai.json # ✅ Imported
🔐 Security Reminders
⚠️ Important:
- Change n8n password from
changeme - Telegram bot token is sensitive - keep it secret
- Consider adding user whitelisting (only your Telegram ID)
- Enable rate limiting if bot becomes public
🚀 Future Enhancements
Ideas for expansion:
- Deck task listing and completion
- Calendar integration
- Voice message transcription
- File uploads to Nextcloud
- Scheduled reminders
- Multi-turn conversations with context
📖 Full Documentation
See README.md for complete technical details, architecture overview, and development guide.
Status: ✅ All workflows imported and ready to activate
Date: 2025-12-02
Location: /home/icke/assistant/