Quick overview
This workflow turns a Telegram bot into a personal assistant that accepts text or voice notes, transcribes audio with OpenAI, uses a memory-enabled AI agent for replies and calculations, and creates Google Calendar reminder events from natural-language requests.
How it works
- Triggers whenever a new Telegram message is received by your bot.
- Routes the message based on type, sending text directly to the assistant, voice notes to transcription, and other message types to a fallback reply.
- For voice notes, downloads the audio from Telegram and transcribes it to text using OpenAI.
- Sends the user’s text (typed or transcribed) to an OpenAI chat model powered agent that remembers the last 15 messages per chat and can use a calculator tool.
- When the user asks for a reminder or event, the agent creates a Google Calendar event with AI-generated title and start/end times.
- Sends the agent’s final response back to the originating Telegram chat.
Setup
- Create a Telegram bot with @BotFather, add a Telegram credential in n8n, and enable updates for the Telegram Trigger.
- Add an OpenAI credential with access to the chat model and audio transcription used in the workflow.
- Add a Google Calendar OAuth credential and ensure the target calendar (default: primary) is accessible for event creation.
- Update the “Your Settings (EDIT ME)” values (assistant name, owner name, and timezone) to match your preferences.