Description
Overview
This automation workflow facilitates an AI-powered personal assistant that processes voice and text inputs from Telegram users. This event-driven analysis pipeline integrates conversational context, calendar events, emails, and database queries to deliver precise responses based on user requests.
Designed for users seeking intelligent information retrieval and interaction via Telegram, the workflow triggers on incoming Telegram messages and responds with synthesized insights using AI models and external data sources.
Key Benefits
- Processes both voice and text inputs seamlessly within a no-code integration framework.
- Maintains session-specific conversational context via memory buffer for coherent interactions.
- Integrates real-time data from Google Calendar, Gmail, and Baserow databases for comprehensive responses.
- Filters and summarizes unread emails, highlighting key metadata and content succinctly.
- Delivers responses directly to users in Telegram chat with Markdown formatting for clarity.
Product Overview
This automation workflow initiates with a Telegram trigger node that listens for incoming messages, both voice and text. Text messages are extracted directly, while voice messages invoke a conditional branch that fetches the audio file and transcribes it to text using OpenAI’s speech-to-text model. The workflow incorporates a window buffer memory node keyed by Telegram user ID to maintain conversational state across multiple interactions.
The core AI node, configured with the GPT-4o-mini model, processes the consolidated text input and applies system-level instructions to contextualize responses with respect to current dates and user data. It connects to multiple external data sources: Google Calendar to retrieve event summaries filtered by date, Gmail to fetch unread inbox emails excluding promotional content, and Baserow databases for task and contact information. These integrations utilize OAuth2 credentials to ensure secure access.
Responses are formatted in Markdown and dispatched synchronously back to the Telegram user via the Telegram node. The workflow does not persist user data beyond session memory and relies on external API availability for calendar, email, and database queries. Error handling is set to continue on delivery node failures, minimizing disruption in user interactions.
Features and Outcomes
Core Automation
This orchestration pipeline ingests Telegram messages, distinguishes text from voice inputs, and applies transcription when required. It uses conditional logic nodes to branch processing and a memory buffer to preserve session context, enabling stateful, multi-turn interactions.
- Single-pass evaluation of incoming messages with deterministic routing based on input type.
- Session-based memory management keyed by user ID for personalized conversational history.
- Integrated AI agent leveraging a GPT-4o-mini model for natural language understanding and generation.
Integrations and Intake
The no-code integration connects to Google Calendar, Gmail, and Baserow databases via OAuth2 authentication. It queries calendar events and unread emails dynamically based on user request dates while accessing task and contact records in Baserow to enrich responses.
- Google Calendar node fetches events filtered by dynamic date inputs derived from user queries.
- Gmail node retrieves unread inbox emails, excluding promotional messages, using label and read-status filters.
- Baserow tool nodes access task and contact tables to provide contextual data on demand.
Outputs and Consumption
The workflow produces Markdown-formatted text responses delivered directly to the Telegram chat in synchronous fashion. Output includes summarized email details, filtered calendar events, and data-driven answers about tasks and contacts.
- Response messages contain structured prose synthesizing AI interpretation and external data.
- Delivered synchronously via Telegram node to the originating user’s chat ID.
- Output fields include summarized sender, date, subject for emails, and relevant event details.
Workflow — End-to-End Execution
Step 1: Trigger
The workflow begins with the Telegram trigger node that activates upon receiving any new message, whether text or voice, from a user. This node listens continuously for message updates to initiate the automation pipeline.
Step 2: Processing
The incoming message is parsed to extract text content. If the message contains no text, the workflow branches to retrieve the voice file and transcribes it into text using OpenAI’s speech-to-text service. Text messages bypass transcription and proceed directly.
Step 3: Analysis
The processed text is passed to an AI assistant node configured with GPT-4o-mini, which references conversation history stored in a window buffer memory node. The assistant uses heuristic filters to query Google Calendar for relevant events, Gmail for unread emails, and Baserow databases for tasks and contacts, applying dynamic date filters and exclusion criteria as specified.
Step 4: Delivery
After generating a response, the assistant sends the output as a Markdown-formatted message back to the originating Telegram user. This synchronous delivery ensures timely and contextual replies in the chat interface.
Use Cases
Scenario 1
A user requests a summary of their unread emails via Telegram. The workflow retrieves unread inbox emails after a specified date, filters out promotional content, and returns sender, date, subject, and brief summaries in a single response cycle, enabling efficient email triage without manual inbox review.
Scenario 2
A user submits a voice message asking about upcoming calendar events for the day. The workflow transcribes the voice input, queries Google Calendar for events on the current date, and returns a concise list of relevant appointments, facilitating quick event awareness through conversational interaction.
Scenario 3
A user inquires about tasks and contact information stored in Baserow. The workflow accesses designated tables to retrieve and present task details or contact emails and phone numbers, delivering accurate data directly within the Telegram chat without manual database access.
Comparison — Manual Process vs. Automation Workflow
| Attribute | Manual/Alternative | This Workflow |
|---|---|---|
| Steps required | Multiple separate steps: checking email, calendar, and databases manually. | Single integrated automation pipeline triggered by Telegram messages. |
| Consistency | Variable, dependent on user accuracy and manual filtering. | Deterministic filtering and summarization using predefined criteria. |
| Scalability | Limited by manual effort and attention span. | Scales with concurrent user sessions using session-based memory buffers. |
| Maintenance | Requires ongoing manual updates and process adherence. | Centralized workflow with OAuth2 credentials and defined node configurations. |
Technical Specifications
| Environment | n8n automation platform with Telegram, Google Calendar, Gmail, and Baserow integrations |
|---|---|
| Tools / APIs | Telegram API, Google Calendar API, Gmail API, Baserow API, OpenAI GPT-4o-mini model, OpenAI Speech-to-Text |
| Execution Model | Event-driven, synchronous request-response per Telegram message |
| Input Formats | Telegram message JSON (text or voice audio file ID) |
| Output Formats | Markdown-formatted text messages via Telegram |
| Data Handling | Session memory buffer for conversational context; no persistent storage |
| Known Constraints | Dependent on external API availability and OAuth2 credential validity |
| Credentials | OAuth2 for Google Calendar and Gmail; API keys for Telegram and OpenAI; API token for Baserow |
Implementation Requirements
- Valid OAuth2 credentials configured for Google Calendar and Gmail nodes.
- Telegram bot API credentials properly set for message triggers and delivery.
- OpenAI API key with access to GPT-4o-mini and speech-to-text models.
Configuration & Validation
- Verify Telegram trigger node receives and correctly parses incoming messages (voice and text).
- Confirm voice message transcription accuracy via OpenAI speech-to-text node.
- Test AI assistant node response correctness integrating calendar, email, and Baserow data queries.
Data Provenance
- Trigger node: Telegram trigger listening for message updates.
- Memory management: Window Buffer Memory node keyed by Telegram user ID.
- AI processing: “Angie, AI Assistant” node using OpenAI Chat Model and external data nodes (Google Calendar, Gmail, Baserow).
FAQ
How is the personal AI assistant automation workflow triggered?
The workflow activates upon receiving any new Telegram message, either text or voice, through the Telegram trigger node monitoring message updates.
Which tools or models does the orchestration pipeline use?
The orchestration pipeline incorporates the OpenAI GPT-4o-mini model for language understanding, OpenAI speech-to-text for voice transcription, and integrates Google Calendar, Gmail, and Baserow APIs for data enrichment.
What does the response look like for client consumption?
Responses are Markdown-formatted text messages sent synchronously to the user’s Telegram chat, containing summaries and answers derived from AI analysis and external data sources.
Is any data persisted by the workflow?
No persistent storage is used; session context is maintained temporarily in a window buffer memory keyed by user ID for conversational continuity.
How are errors handled in this integration flow?
Error handling is configured to continue execution on delivery node failures, while other nodes rely on platform default retry and failure behaviors.
Conclusion
This automation workflow provides a robust image-to-insight orchestration pipeline that enables Telegram users to interact with a conversational AI assistant. It supports both voice and text inputs, maintains session-based memory, and integrates calendar, email, and database information to deliver contextually accurate responses. The workflow operates synchronously with external APIs and depends on OAuth2 credential validity and API availability. It offers a deterministic, transparent process for intelligent data retrieval and conversational assistance within a tightly integrated no-code environment.








Reviews
There are no reviews yet.