Automate Email Responses via Telegram Audio and OpenAI with n8n

This n8n workflow automates email reply drafting by analyzing incoming Gmail messages, sending email details to Telegram, and using Telegram voice replies transcribed by OpenAI Whisper. It solves the problem of tedious, delayed email responses by creating polished draft replies automatically.
gmailTrigger
telegram
lmChatOpenAi
+6
Workflow Identifier: 2137
NODES in Use: gmailTrigger, if, lmChatOpenAi, outputParserStructured, telegram, openAi, chainLlm, set, gmail
Automate email with n8n and Telegram

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

Learn how to Build this Workflow with AI:

What This Workflow Does

This workflow listens for new emails arriving in the Gmail inbox.

It uses AI to check if an email needs a reply or not.

If a reply is needed, it sends email info to a Telegram chat.

The user replies by sending a voice message in Telegram.

The voice audio gets transcribed to text using AI.

Another AI step rewrites the transcribed text into a professional email reply.

The reply is saved as a draft in the original Gmail thread.

The workflow sends a Telegram message with a link to that draft.

This saves time and lets the user respond to emails hands-free on the phone.


Who Should Use This Workflow

This workflow is for people who get many emails and want to reply faster.

It helps users who prefer speaking replies instead of typing.

It suits professionals who want to check and reply to important emails remotely.

It is also good for users who want smart AI help to write polished replies.


Tools and Services Used

  • Gmail: To watch incoming emails and create drafts.
  • Telegram Bot API: To send email alerts and receive voice replies.
  • OpenAI GPT-3.5/4 Chat Model: To decide if emails need replies and polish transcriptions.
  • OpenAI Whisper Model: To transcribe voice messages to text.
  • n8n Automation Platform: To connect and control all services and processes.

How the Workflow Works: Inputs, Process, Output

Inputs

  • New incoming Gmail emails labeled INBOX.
  • Voice reply messages sent in Telegram to the bot.

Process

  • Check if email is in inbox folder.
  • Use AI chat model to classify if email needs a reply (yes or no).
  • If reply needed, post email details to Telegram chat.
  • When a Telegram voice reply is received, check it is a proper voice message reply.
  • Download the voice audio file from Telegram.
  • Use Whisper AI model to transcribe audio into text.
  • Use AI chat model to rewrite transcription into a polished email reply.
  • Create a draft reply email in the original Gmail thread.
  • Send a Telegram message with the polished reply text and link to the draft email.

Output

  • A draft email reply saved in Gmail.
  • Telegram messages with email alerts and draft links.

Beginner Step-by-Step: How to Use This Workflow in n8n

Step 1: Import the Workflow

  1. Download the workflow file using the Download button on this page.
  2. Open n8n editor and use “Import from File” to load the workflow.

Step 2: Add API Keys and Credentials

  1. Add Gmail OAuth2 credentials with permissions to read emails and create drafts.
  2. Add Telegram Bot API credentials to send and receive bot messages.
  3. Add OpenAI API key with access to chat and audio transcription models.

Step 3: Set IDs and Parameters

  1. Update the Telegram chat ID in the Set node to your personal chat or group ID.
  2. Check that Gmail settings watch the INBOX folder.

Step 4: Test the Workflow

  1. Send an email to your Gmail inbox.
  2. Check that the email alert appears in Telegram.
  3. Reply to the Telegram message with a voice note.
  4. Verify that a draft reply email is created in Gmail.

Step 5: Activate for Production

  1. Switch the workflow toggle to ON in n8n.
  2. Leave n8n running so the workflow listens continuously.

If self hosting n8n is preferred for privacy or control, see self-host n8n.


Customizations Ideas

  • Change Telegram chat ID to send alerts elsewhere.
  • Modify AI prompt to adjust how emails are judged for reply.
  • Limit how much email text shows in Telegram alerts for clarity.
  • Switch Gmail node from draft creation to automatic sending if desired.
  • Update prompt for writing replies to change tone or message style.

Handling Errors and Edge Cases

If the AI does not return valid JSON, add or check the Structured Output Parser node after the GPT node.

If Telegram replies are not detected as voice messages or replies, adjust the node conditions and verify messages are correct voice replies.

Test all API keys and permissions before extended use to avoid quota or permission errors.


Summary

✓ Saves time by filtering emails that need replies.

✓ Lets users reply to emails by sending voice messages on Telegram.

✓ Uses AI to write polished, professional-looking email drafts.

✓ Links email alerts and replies all inside Telegram for convenience.

→ Provides a simple way to manage email responses hands-free and on the go.


Automate email with n8n and Telegram

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

This workflow uses Gmail for email, Telegram Bot API for messaging, OpenAI GPT for AI tasks, OpenAI Whisper for audio transcription, and n8n for automation.
Download the workflow file, import it into n8n using ‘Import from File’, add API credentials, update chat IDs, test, and then activate the workflow.
It uses OpenAI GPT to analyze the email’s content and classify if a reply is needed based on a yes/no JSON response.
The workflow detects if the reply is not a voice message and sends a Telegram message asking to reply with a voice note for processing.
Author
Written By
Vikash Kumar
Building AI agents, n8n workflows and end-to-end automation for 30+ Brands across India, the US, Europe, Dubai & Australia. 7+ years of Experience saving founders real hours every week - no code required.

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.