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

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 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.


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.

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