Cases/Telegram bot for meter and shift accounting
Automation · Telegram + n8n + AI

Telegram bot for meter and shift accounting

Daily accounting of meter readings, shifts, expenses, and reports right inside Telegram: users write to the bot in plain text, AI recognizes the data, and n8n logs everything into Google Sheets.

The challenge

We needed to remove the manual chaos of record-keeping: inconsistent message formats, date errors, duplicate entries, and difficulty totaling results per shift or period. The client needed a simple Telegram interface, with no separate app.

About the project
Format
Telegram bot + Google Sheets
Data source
meter readings
Automation
n8n + AI
Result
automatic logging
What we did

How the accounting system was built

01

Built a Telegram bot on n8n.

02

Added an AI parser that understands the user's message and turns it into structured data.

03

Connected Google Sheets as the accounting database.

04

Set up start-of-shift and end-of-shift scenarios.

05

Set up access filtering: the bot only accepts data from studio staff and admins.

06

Added access verification so outside users cannot enter or change data.

07

Implemented updating existing records if the date already exists in the sheet.

08

Set up different shift types in Google Sheets: shift 1, 2, and 3.

09

Added a total electricity consumption count per shift.

10

Implemented splitting electricity consumption across each studio employee.

11

Added reports, period totals, prompts, and tracking of additional expenses.

How it works

How the bot works

The path of a message from Telegram to a finished report.

01

Message

The user writes a message in Telegram: readings, date, shift type, or a report command.

02

User check

The bot checks whether the user is studio staff or an admin.

03

Message type

The bot determines the message type: shift start, shift end, report command, expenses, or another request.

04

AI parsing

The AI parser extracts the needed fields and forms a clear confirmation.

05

Confirmation

The user confirms or asks to re-enter the data.

06

Sheet write

n8n writes or updates a row in Google Sheets.

07

Shift split

In the sheet, data is split by shift 1, 2, or 3.

08

Consumption calc

Google Sheets calculates total electricity consumption per shift and splits it across studio employees.

09

Result

The bot returns the result: successful record, shift summary, report, or a prompt.

Telegram bot for meter and shift accounting workflow diagram
TelegramCommands /start and /report: the bot shows available actions and asks for report data.
Business result
  • Less manual spreadsheet work.
  • Fewer errors in readings and dates.
  • Data is collected directly in the right structure.
  • Access to entering data is limited to studio staff and admins.
  • Google Sheets shows shifts 1, 2, and 3, total consumption per shift, and the electricity split across employees.
  • Users don't need to open Google Sheets.
  • The owner sees summaries and reports right in Telegram.
Technologies
Telegram Bot APIn8nOpenAIGoogle SheetsAI structured parserconfirmation flows via callback buttons.
Short case summary

A Telegram bot for meter and shift accounting: the user writes data in chat, AI recognizes the content, n8n verifies and logs everything into Google Sheets, and the bot returns summaries and reports.

Client review

Meter readings used to be collected and checked manually in chats. Now the flow is clear: the bot reminds people, receives data, and sends it straight to the sheet.

St
Studio manager
Client