ChatSummaryBot

A Telegram bot that posts a daily Gemini summary of a group chat, including photos and voice.

  • java
  • spring-boot
  • telegram
  • gemini
  • mongodb
Status
live
Main language
Java
Last commit
October 30, 2026
ChatSummaryBot preview

ChatSummaryBot is a public Telegram bot that records a group’s messages and posts one summary a day, at 21:00 by default. Each point ends with a link to the message it came from.

What it does

  • Sends photos to Gemini as images, and voice messages and video notes as audio.
  • Writes the summary in the language of the conversation, with the chat’s configured language as a fallback.
  • Links each summary to the previous one and edits the previous one to link forward.
  • Gives admins /summary for an on-demand digest, plus /setlanguage, /enable and /disable.
  • Includes 30 free summaries per chat; after that a summary shows its first 100 characters until someone pays 30 Telegram Stars for 30 more.

Messages are deleted once summarized, and removing the bot from a group deletes everything stored for it.

Sharing one Gemini quota

All chats share one Gemini free-tier quota, so most of the design limits how much each summary costs. Photos are downscaled to 1024 px on the long side, and ffmpeg strips the video track from video notes. The bot tries four Gemini models in order, moving on after a rate-limit or “model unavailable” error, and waits 2 minutes between chats.

A summary that comes back empty because the model ran out of output tokens fails immediately, since retrying the same transcript gives the same result. A chat whose summary fails 3 times in a row skips that day, so one broken chat cannot use up the quota for the rest.

It is one Spring Boot process on Java 25 with MongoDB. Its code later became the base for Eva & Mary.

← all projects