Daniel Cárdenas

AI Automation Engineer: RAG · Edge ML · Firmware

I build practical AI systems: RAG pipelines, voice and document automation, Python APIs, and the embedded telemetry that makes edge ML useful in the real world.

XPLevel 1
0 XP150 to level up
Aug 2025AI Automation Developer2 min read

Telegram Inventory Bot with Gemini Voice Parsing

Telegram bot that turns Spanish voice messages into confirmed inventory, sales, reservation, payment, and debt records.

GeminiVoice AISQLite
PythonTelegramGeminiSQLiteVoice AIAutomation

Outcomes

  • Natural-language voice transactions parsed into structured JSON with Gemini
  • Inventory and customer debt updates persisted in SQLite
  • Confirmation flow lets users review and correct before saving

Problem

Small inventory workflows often happen in chat, voice notes, and quick informal messages. The hard part is not only extracting the transaction, but also confirming it, updating stock, tracking customer debt, and producing daily summaries without forcing people into a heavy ERP.

Approach

  • Built a Telegram bot in Python with commands for inventory, daily summaries, and customer status.
  • Used Gemini to parse natural Spanish voice messages into structured transaction data.
  • Supported sales, reservations, debt payments, equipment expenses, and miscellaneous expenses.
  • Added a confirmation step so users can review parsed values before the database changes.
  • Persisted transactions, inventory, and debt items in SQLite with parameterized queries and clear state transitions.
  • Added chat restrictions and environment-based configuration for bot tokens, allowed chats, and Gemini model selection.

Results

  • Voice messages become auditable structured transactions instead of untracked chat history.
  • Inventory is reduced automatically on sales and reservations.
  • Customer debt uses FIFO-style payment application and can be queried from Telegram.
  • Daily reports summarize transaction types, income, expenses, and balance in the Colombian timezone.