Expense tracking from chat: voice, receipt photo and text

You send an expense to Telegram by voice, a receipt photo or text — the AI reads it and logs a row in таблица, cutting off repeats.

  • Voice, receipt photo or text
  • The AI pulls out amount and category
  • It all lands in таблица
  • Budget and daily report by command
Google Sheets

How it works

To move data from Telegram to Google Sheets automatically, use a ready-made scenario — no manual exports.

  1. Starts when: Telegram Trigger
  2. Then: CONFIG - User Settings
  3. Check: Switch (Command Router)
  4. If yes: Code (Parse Budget Amount)
  5. Check: IF (Budget ok?)
  6. If yes: Google Sheets → Append or update row in sheet
  7. Then: Telegram → Budget Updated
  8. If no: Telegram → Budget Error
  9. If no: Google Sheets: Get Rows (Dedup lookup)
  10. Check: IF (Is Duplicate?)
  11. If no: Code (Restore Telegram Payload)
  12. Check: Switch (Voice/Photo/Text)
  13. If yes: Set (Voice Context)
  14. Then: Telegram → Get Voice File
  15. Then: Google Gemini (Analyze Audio)
  16. Then: Code (Normalize Gemini Audio Output)
  17. Then: Code (Parse Gemini JSON)
  18. Check: IF (Has expenses?)
  19. If yes: Code (Split expenses to items)
  20. Then: Google Sheets → Append row(s)
  21. Then: Code (Schedule Report Token)
  22. Then: ReportTokens
  23. Then: Wait
  24. Then: Data table → Get row(s)
  25. Then: Code - Check Latest Token
  26. Check: If
  27. If yes: Data table → Delete row(s)
  28. Then: GS - Get Daily Report Range
  29. Then: Code - Build Daily Report
  30. Then: TG - Send Daily Report
  31. If yes: Telegram → Send Final Message
  32. If no: Telegram → Send Error Message and wait for response
  33. If no: Set (Photo Context)
  34. Then: Code (Pick Best Photo)
  35. Then: Telegram → Get Image File
  36. Then: Google Gemini (Analyze Image)
  37. Then: Code (Normalize Gemini Image Output)
  38. If no: Set (Text Context)
  39. Then: Google Gemini Chat (Text → JSON)
  40. Then: Code (Normalize Gemini Text Output)

You can launch this Telegram + Google Sheets integration in Scriptera: describe the task in plain words — the scenario is built, launched and monitored for you.