A Telegram bot for managing financial transactions and income. Goblin focuses solely on the financial aspects of the bucket system - adding transactions and income entries.
- πΈ Add Transactions: Record expenses with categories, payment methods, and notes
- π° Add Income: Track income sources and amounts
- π View Recent: See latest transactions and income entries
- π Categories: Browse available spending categories and subcategories
- β Help: Built-in help and guidance
Goblin integrates with the Vulkan API to manage financial data:
- Transactions: Stored via
POST /vault/spend - Income: Stored via
POST /vault/income - Categories: Fetched from
GET /vault/categories - Recent Data: Retrieved from
GET /vault/dataandGET /vault/income
- Python 3.13+
- Telegram Bot Token
- Vulkan API Key
GOBLINBOT_TOKEN=your_telegram_bot_token
WELL_API_KEY=your_vulkan_api_key# Install dependencies
pip install -r requirements.txt
# Run the bot
python goblin.py# Build image
docker build -f Dockerfile.prod -t goblin-bot .
# Run container
docker run -d \
--name goblin-bot \
-e GOBLINBOT_TOKEN=your_telegram_bot_token \
-e WELL_API_KEY=your_vulkan_api_key \
goblin-bot/start- Show main menu/help- Display help information/cancel- Cancel current operation
-
πΈ Add Transaction:
- Enter transaction name
- Enter amount (e.g., 25.50)
- Select category from available options
- Select subcategory (if applicable)
- Choose payment method (Credit/Debit)
- Add optional notes
- Confirm and submit
-
π° Add Income:
- Enter income source name
- Enter amount
- Confirm and submit
-
π View Recent:
- Shows last 5 transactions
- Shows last 3 income entries
-
π Categories:
- Browse all available spending categories
- View subcategories for each category
- Name: 1-100 characters required
- Amount: Positive numbers, max 999,999.99, 2 decimal places
- Payment Method: Only "Credit" or "Debit"
- Date: Auto-populated with today's date (YYYY-MM-DD format)
- Categories: Must exist in the system
The bot provides clear error messages for:
- Invalid amounts (negative, too large, wrong format)
- Missing required fields
- Network/API errors
- Invalid categories
Goblin is designed to work alongside other services in the bucket ecosystem:
- Bucketbot: Handles tasks, notes, and bookmarks
- Goblin: Handles financial transactions and income
- Vulkan: Provides the API backend for all operations
Authentication: Both bucketbot and goblin use the same WELL_API_KEY to authenticate with the Vulkan API endpoints (/well/* and /vault/*). Goblin uses its own GOBLINBOT_TOKEN for Telegram bot authentication.
goblin/
βββ goblin.py # Main bot implementation
βββ requirements.txt # Python dependencies
βββ Dockerfile.prod # Production Docker image
βββ README.md # This file
βββ .gitignore # Git ignore patterns
The bot uses:
python-telegram-botfor Telegram integrationrequestsfor API communication- Conversation handlers for user flow management
- Inline keyboards for category selection
- API key authentication via
X-API-Keyheader - Input validation on all user data
- No sensitive data stored in logs
- Environment-based configuration
- Uses multi-stage Docker build for minimal production image
- Runs on Python 3.13 Alpine for efficiency
- Shared infrastructure with other bucket services
- Health checks and monitoring integration ready
For issues or questions:
- Check the
/helpcommand in the bot - Verify environment variables are set correctly
- Ensure Vulkan API is accessible with provided key
- Check network connectivity to vulkan.sumeetsaini.com