How dhruvk1706/email-summarizer works
Email Assistant polls Gmail for recent inbox mail, summarizes new messages with Gemini, and delivers them through Telegram. Its second major workflow accepts authorized Telegram messages, runs a conversation agent that searches or retrieves Gmail and can produce draft-only previews, then returns the result. SQLite tracks delivery and summary-message associations; optional Postgres stores agent conversation memory. The graph follows the documented routes and sampled calls; the optional memory backend is documented and configured in the agent, but its runtime connection is not shown beyond that configuration.
Main entry points: server.py HTTP server · gmail.py Gmail access · state.py Delivery and message state · agent.py Conversation agent
Components 14
Polling and delivery
- HTTP server
server.py - Telegram Bot API
Gmail access
- Gmail access
gmail.py - Gmail mailbox
Conversation and AI
- Conversation agent
agent.py - Agent tools
tools.py - Gemini workflows
summarizer.py - Vertex AI Gemini
Persistence
- Delivery and message state
state.py - SQLite state store
- Conversation checkpoint
agent.py - Postgres
Other components
- Poll scheduler
- Telegram user
Connections 21
- Poll scheduler → HTTP server: requests poll
README.md - Telegram user → Telegram Bot API: sends messages
README.md - Telegram Bot API → HTTP server: posts webhook
README.md - HTTP server → Gmail access: fetches new mail
server.py - Gmail access → Gmail mailbox: reads inbox
gmail.py - Gmail access → Delivery and message state: checks delivery
gmail.py - Gmail access → Delivery and message state: marks baseline
gmail.py - HTTP server → Delivery and message state: checks and records
server.py - HTTP server → Gemini workflows: requests summary
server.py - Gemini workflows → Vertex AI Gemini: generates content
summarizer.py - HTTP server → Telegram Bot API: sends summaries
server.py - HTTP server → Conversation agent: dispatches chat
server.py - HTTP server → Delivery and message state: resolves reply email
server.py - Conversation agent → Agent tools: dispatches tools
agent.py - Conversation agent → Gemini workflows: gets chat model
agent.py - Agent tools → Gmail access: searches and fetches
tools.py - Agent tools → Gemini workflows: generates draft
tools.py - Conversation agent → Conversation checkpoint: configures checkpoints
agent.py - Conversation checkpoint → Postgres: stores memory
README.md - Delivery and message state → SQLite state store: reads and writes
state.py - HTTP server → Telegram Bot API: sends chat replies
server.py