Run an AI chat assistant on Telegram that keeps session context and logs every chat to Google Sheets. Support teams can start fresh chats, resume older threads, and request quick summaries without leaving Telegram. It fits help desks, community managers, and sales reps who need fast answers and clean records.
Incoming Telegram messages start the flow. A router checks for commands like new, current, resume, summary, and question, then sends each path to the right logic. Session state lives in a Google Sheets tab, where old sessions get marked to expire and a new current session is set per user. When a user asks a question, the message and recent memory go to an OpenAI chat model through LLM and summarization steps. The reply goes back to Telegram, and a database sheet captures date, prompt, response, and session for tracking and analytics.
You only need a Telegram bot, an OpenAI API key, and a copy of the Google Sheet to run it. Most teams see faster replies, fewer context switches, and complete chat logs without extra typing. It suits tier one support, pre sales chat, and community Q and A where context and history matter.