Build AI-Powered Telegram Assistant with n8n & OpenAI

This n8n workflow automates handling Telegram messages by converting voice to text, fetching calendar events, emails, and tasks, then replying with AI-generated summaries. It saves time managing communication by integrating Gmail, Google Calendar, and Baserow databases with OpenAI’s GPT-4 mini model.
telegramTrigger
agent
Gmail
+10
Workflow Identifier: 1002
NODES in Use: telegramTrigger, set, if, telegram, telegram, getVoiceFile, openAi, agent, lmChatOpenAi, memoryBufferWindow, gmailTool, googleCalendarTool, baserowTool

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Workflow Solves

This workflow is for anyone using n8n who needs to get quick answers from emails, calendar, and tasks using Telegram.

You can send a voice or text message to your Telegram bot.

The workflow listens, understands your request, checks Google Calendar, Gmail, Baserow tasks and contacts, and sends back a clear answer.

It stops you wasting hours searching mail, tasks, calendar, or missing something. You get one fast summary, every time.


Who Should Use This Workflow

  • People who work with many emails and meetings daily.
  • Anyone using n8n, Google Calendar, Gmail, Telegram, and Baserow for tasks.
  • Beginners who want automation with easy steps, not coding.

Tools & Services Used

  • Telegram Bot API: Receives user messages.
  • OpenAI API: Transcribes voice and generates replies.
  • Google Calendar API: Brings upcoming events.
  • Gmail API: Collects unread emails after set date.
  • Baserow API: Gets tasks and contacts.
  • n8n Workflow Automation: Links all steps together.

Inputs → Processing Steps → Output

Inputs

  • Telegram voice message or text message
  • Google Calendar account
  • Gmail inbox
  • Baserow tasks and contacts database
  • OpenAI API Key

Processing Steps

  1. The Telegram Trigger node listens for messages.
  2. If the message is voice, the workflow uses OpenAI Speech to Text to change voice to text.
  3. If message is text, it keeps the text directly.
  4. The text is passed through a Set node to keep context.
  5. Get Email node checks Gmail for new emails after a date.
  6. Google Calendar node collects events from your calendar after the set date.
  7. Tasks and Contacts from Baserow are pulled using their node.
  8. The LangChain Agent node reads all this info, gets what is most important, and writes a reply.
  9. The Telegram node sends the reply to you via chat.

Output

  • One single Telegram reply message with the summary from your emails, calendar, and tasks.

Beginner step-by-step: How to build this in n8n

Step A: Get The Workflow

  1. Find the Download button for this workflow on the page.
  2. Click it and save the file to your computer.

Step B: Import In n8n

  1. Inside n8n editor, click the menu (upper right) and select ‘Import from File’.
  2. Choose the file you downloaded. The workflow will load.

Step C: Update Credentials

  1. Add your Telegram Bot API key to every Telegram Trigger or Telegram node.
  2. Add your OpenAI API Key where needed.
  3. Add OAuth2 for Google Calendar and Gmail. Follow n8n’s screen for credentials.
  4. Add your Baserow API Key for the Tasks and Contacts nodes.

Step D: Set Up IDs and Filters

  1. In the Google nodes, pick your email and calendar account.
  2. Update any database, table, or folder IDs in the Baserow nodes for tasks and contacts.

Step E: Test The Workflow

  1. Send a message to your Telegram bot (text or voice).
  2. Wait for the reply — if it works, it will summarize your email, calendar, tasks.
  3. If no reply, check each node for correct API Key or OAuth errors.

Step F: Activate Workflow

  1. If test works, switch workflow to ‘Active’ at top right.
  2. The workflow is now live.
  3. Remember, you must keep your n8n online. If you want privacy, you can self-host n8n easily.


Customization Ideas

  • Change Date Search: In both Google nodes, change the filter date for a bigger or smaller search window.
  • Edit AI Reply Style: In the LangChain Agent node, look for system message. Make the reply more short or more detailed by editing the prompt.
  • Add More Data: You can add Slack, CRM, or more sources. Make a new node and link it to the LangChain Agent node.
  • Multi-Language: Use translation in OpenAI before the reply node to reply in your language.

Common Edge Cases and Troubleshooting

  • No reply from Telegram bot.
    Check the Telegram Trigger node webhook URL. Make sure n8n is active and online, and the workflow open for incoming messages.
  • Emails do not appear in reply.
    Check the “receivedAfter” setting in Get Email node. Make sure Gmail permissions allow inbox access.
  • Wrong data in reply.
    Make sure your Google and Baserow nodes have correct IDs — not sample ones.
  • API quota or credential error.
    Update API Key, OAuth2 info, or check if limits are reached.

Summary / Final Result

  • Save up to 2 hours per day not checking emails or tasks one by one
  • ✓ Get a combined answer from email, calendar, and tasks in one Telegram message
  • ✓ No coding or technical skills needed
  • → Start quickly and edit later if your workflows change
  • → Add new tools anytime—just connect new nodes

Frequently Asked Questions

The AI assistant workflow summarizes unread Gmail emails, recent Google Calendar events, and tasks or contacts stored in Baserow for the user.
The Telegram bot sends voice messages through the workflow, which uses OpenAI’s speech-to-text feature to convert the audio to text before processing.
The user must add Telegram Bot API Key, OpenAI API Key, Google Calendar OAuth2, Gmail OAuth2, and Baserow API Key to set up the AI assistant in n8n.
The user tests the workflow by sending a message, verifies all API credentials, then activates the workflow in n8n to start using the AI assistant with Telegram.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free