The vision: one assistant to rule them all

What if you could have a single AI assistant that handles your entire digital life through Telegram? An n8n implementation uses a Master Agent that orchestrates 10+ specialized sub-agents, each expert in their domain.

The architecture

The system follows a hub-and-spoke model:

Master Agent: The central coordinator powered by Claude Haiku 4.5
Specialized Agents: Gmail, Google Calendar, Google Contacts, Spotify, Google Drive, Weather, Tasks, and more
Memory Layer: Postgres-based chat memory via Supabase for context retention
Voice Support: Full voice-to-text and text-to-voice capabilities

How it works

Input Processing: The Telegram trigger captures both text and voice messages
Voice Transcription: Voice notes are transcribed via OpenAI Whisper, then cleaned up by Claude
Agent Routing: The Master Agent analyzes the request and delegates to the appropriate sub-agent
Response Delivery: Results are sent back as text or synthesized speech

The sub-agents

Each sub-agent is a separate n8n workflow with its own specialized tools:

Gmail Agent: Send, read, label, reply to emails
Google Calendar Agent: Create, update, check events and availability
Google Contacts Agent: Find contact info, resolve aliases ("spouse", "cousin")
Spotify Agent: Control playback, search tracks, manage playlists
Google Drive Agent: Search and manage files
Weather Agent: Current conditions and 10-day forecasts
Data Analyst Agent: Query and analyze Google Sheets data
Google Tasks Agent: Manage to-do lists

Key design decisions

Session Management: Each conversation gets a unique session ID stored in n8n's Data Table. After 10 minutes of inactivity, a new session starts to keep context fresh.

Natural Language: The system prompt instructs the agent to respond conversationally, never exposing technical details or JSON traces.

Time Awareness: The current date/time is injected into every prompt, helping interpret relative dates ("tomorrow", "next week").

Graceful Failures: When an agent can't find information, it says so directly without suggesting alternatives.

The results

In daily use, the Master Agent can support tasks such as:

Check calendar while walking
Send voice-dictated emails
Control Spotify hands-free
Get weather updates before trips
Manage tasks on the go

All through a single Telegram conversation.

Want to build your own?

The beauty of n8n is that you can start simple and add agents incrementally. Begin with one or two integrations, nail the UX, then expand. The Master Agent pattern scales beautifully—just add new sub-agents as workflow tools.