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
Automate Telegram with n8n and OpenAI

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

Learn how to Build this Workflow with AI:

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


Tools & Services Used


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
Automate Telegram with n8n and OpenAI

Visit through Desktop to Interact with the Workflow.

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 Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.