Build a Telegram calendar assistant with n8n and Gemini (text and voice notes)
Description and use
A Telegram bot built with n8n and Gemini lets users add, query, and modify Google Calendar events and Tasks via text or voice, eliminating manual app interactions.
Problem
Adding events to a phone calendar requires many taps; speaking a voice note can add an event in seconds.
Outcome
The assistant allows users to add, query, and modify calendar events or tasks via simple text or voice messages in Telegram, eliminating the need for manual app interactions.
Workflow
- 1. Telegram Trigger receives message
- 2. Set node stores allowed user IDs, timezone, default event length
- 3. IF node checks if sender is allowed
- 4. Switch node routes to voice or text branch
- 5. Voice branch downloads OGG file and Gemini transcribes audio
- 6. Text branch passes text directly
- 7. Set node outputs unified request field
- 8. Gemini AI Agent processes request with system message including current time and rules
- 9. Agent calls tools (Get/Create calendar events, Get/Complete tasks) using $fromAI()
- 10. Code node formats reply for Telegram
- 11. Telegram node sends reply
Evidence
Adding something to a calendar on a phone is about eight taps: open the app, tap plus, type the title, pick a date, pick an start time, pick an end time, save. Saying "lunch with Priya Friday at 1" into a voice note takes three seconds.
A Gemini-powered AI Agent reads and writes your Google Calendar and Google Tasks, transcribes voice notes itself (no separate speech-to-text service), and replies in plain language.
The system message injects the current time in your timezone on every run: ... Use ISO 8601 date-times with the correct UTC offset in every tool call.
- Record date: 2026-11-02T11:28:47.686Z