Back to Catalog

Send a voice note on Telegram to generate a professional email with ChatGPT

Baptiste FortBaptiste Fort
1244 views
2/3/2026
Official Page

Telegram Voice Message → Automatic Email

baptistefortn8nautomationtelegramaudio.png

Imagine: What if you could turn a simple Telegram voice message into a professional email—without typing, copying, pasting, or even opening Gmail?

This workflow does it all for you: just record a voice note, and it will transcribe, format, and write a clean HTML email, then send it to the right person—all by itself.

Prerequisites

  • Create a Telegram bot (via BotFather) and get the token.
  • Have an OpenAI account (API key for Whisper and GPT-4).
  • Set up a Gmail account with OAuth2.
  • Import the JSON template into your automation platform.

🧩 Detailed Flow Architecture

1. Telegram Trigger

workflown8ntelegramvoicebaptistefort.png

Node: Telegram Trigger
This node listens to all Message events received by the specified bot (e.g., “BOT OFFICIEL BAPTISTE”).
Whenever a user sends a voice message, the trigger fires automatically.

> ⚠️ Only one Telegram trigger per bot is possible (API limitation).

Key parameter:

  • Trigger On: Message

2. Wait

Node: Wait
Used to buffer or smooth out calls to avoid collisions if you receive several voice messages in a row.

3. Retrieve the Audio File

workflowbaptistefortemailtelegramaudio.png

Node: Get a file

  • Type: Telegram (resource: file)
  • Parameter:
    • fileId = {{$json["message"]["voice"]["file_id"]}}
      This node fetches the voice file from Telegram received in step 1

4. Automatic Transcription (Whisper)

baptistefortn8ntranscriptiontelegramvoice.png

Node: Transcribe a recording

  • Resource: audio
  • Operation: transcribe
  • API Key: Your OpenAI account
    The audio file is sent to OpenAI Whisper: the output is clean, accurate text ready to be processed.

5. Optional Wait (Wait1)

Node: Wait1
Same purpose as step 2: useful if you want to buffer or add a delay to absorb processing time.

6. Structured Email Generation (GPT-4 + Output Parser)

Node: AI Agent
This is the core of the flow:

  • The transcribed text is sent to GPT-4 (or GPT-4.1-mini here, via OpenAI Chat Model)

  • Prompt used:

    You are an assistant specialized in writing professional emails.
    
    Based on the text below, you must: {{ $json.text }}
    
    1. Detect if there is a recipient's email address in the text (or something similar like "send to fort.baptiste.pro")
       - If it’s not a complete address, complete it by assuming it ends with `@gmail.com`.
    2. Understand the user's intent (resignation, refusal, application, excuse, request, etc.)
    3. Generate a relevant and concise email subject, faithful to the content
    4. Write a professional message, structured in HTML:
       - With a polite tone, adapted to the situation
       - Formatted with HTML tags (`<p>`, `<br>`, etc.)
       - No spelling mistakes in French
       - My first name is jeremy and if the text says he is not happy, specify the wish to resign
    

⚠️ You must always return your answer in the following strict JSON format, with no extra text: ```

```json
{
  "email": "adresse@gmail.com",
  "subject": "Objet de l’email",
  "body": "<p>Contenu HTML de l’email</p>"
}
```

Everything is strictly validated and formatted with the Structured Output Parser node.

7. Automatic Email Sending (Gmail)

Node: Send a message

  • To: {{$json.output.email}}
  • Subject: {{$json.output.subject}}
  • HTML Body: {{$json.output.body}}
    This node takes the JSON structure returned by the AI and sends the email via Gmail, to the right recipient, with the correct subject and full HTML formatting.

If you want to automate manual tasks, visit our French Agence automatisation 0vni.

n8n Workflow: Telegram Voice Note to Professional Email with ChatGPT

This n8n workflow automates the process of converting a Telegram voice note into a professional email draft using OpenAI's ChatGPT, and then sends it via Gmail. It's designed to streamline communication by allowing users to dictate emails and have them professionally formatted and sent.

What it does

  1. Listens for Telegram Voice Notes: The workflow is triggered when a new voice message is received on a configured Telegram bot.
  2. Transcribes Voice Note: It uses OpenAI's Whisper model (via the OpenAI node) to transcribe the audio from the Telegram voice note into text.
  3. Generates Professional Email Draft: The transcribed text is then fed to an AI Agent (powered by an OpenAI Chat Model) with a structured output parser. This agent is instructed to generate a professional email draft based on the voice note's content.
  4. Sends Email via Gmail: The generated email draft is then sent as a new email using Gmail.
  5. Confirms via Telegram: A confirmation message is sent back to the user on Telegram, indicating that the email has been sent.
  6. Delay (Optional): An optional "Wait" node is included, which could be used for rate limiting or to introduce a delay before sending the confirmation.

Prerequisites/Requirements

  • n8n Instance: A running n8n instance.
  • Telegram Bot: A Telegram bot token and a configured bot that can receive voice messages.
  • OpenAI API Key: An OpenAI API key with access to the Whisper (for transcription) and GPT (for email generation) models.
  • Gmail Account: A configured Gmail credential for sending emails.

Setup/Usage

  1. Import the Workflow:
    • Copy the provided JSON code.
    • In your n8n instance, go to "Workflows" and click "New".
    • Click the "Import from JSON" button and paste the workflow JSON.
  2. Configure Credentials:
    • Telegram Trigger (Node 50): Set up your Telegram Bot API credential.
    • OpenAI (Node 1250): Set up your OpenAI API key credential.
    • OpenAI Chat Model (Node 1153): This node typically uses the same OpenAI credential as the OpenAI node. Ensure it's configured.
    • Gmail (Node 356): Set up your Gmail OAuth2 credential.
  3. Activate the Workflow: Once all credentials are set and nodes are configured, activate the workflow by toggling the "Active" switch in the top right corner of the workflow editor.
  4. Send a Voice Note: Send a voice note to your configured Telegram bot. The workflow will automatically process it, generate an email, and send it.

Related Templates

Generate Weather-Based Date Itineraries with Google Places, OpenRouter AI, and Slack

🧩 What this template does This workflow builds a 120-minute local date course around your starting point by querying Google Places for nearby spots, selecting the top candidates, fetching real-time weather data, letting an AI generate a matching emoji, and drafting a friendly itinerary summary with an LLM in both English and Japanese. It then posts the full bilingual plan with a walking route link and weather emoji to Slack. 👥 Who it’s for Makers and teams who want a plug-and-play bilingual local itinerary generator with weather awareness — no custom code required. ⚙️ How it works Trigger – Manual (or schedule/webhook). Discovery – Google Places nearby search within a configurable radius. Selection – Rank by rating and pick the top 3. Weather – Fetch current weather (via OpenWeatherMap). Emoji – Use an AI model to match the weather with an emoji 🌤️. Planning – An LLM writes the itinerary in Markdown (JP + EN). Route – Compose a Google Maps walking route URL. Share – Post the bilingual itinerary, route link, and weather emoji to Slack. 🧰 Requirements n8n (Cloud or self-hosted) Google Maps Platform (Places API) OpenWeatherMap API key Slack Bot (chat:write) LLM provider (e.g., OpenRouter or DeepL for translation) 🚀 Setup (quick) Open Set → Fields: Config and fill in coords/radius/time limit. Connect Credentials for Google, OpenWeatherMap, Slack, and your LLM. Test the workflow and confirm the bilingual plan + weather emoji appear in Slack. 🛠 Customize Adjust ranking filters (type, min rating). Modify translation settings (target language or tone). Change output layout (side-by-side vs separated). Tune emoji logic or travel mode. Add error handling, retries, or logging for production use.

nodaBy noda
52

Seo blog content automation with GPT-4o-mini and human approval in Google Docs

Overview This n8n workflow automates the entire content creation process for SEO blog posts, from topic submission and AI drafting to human approval, revision, and final storage in Google Docs. It ensures high-quality, SEO-optimized content is generated efficiently while keeping a human in the loop for quality control. Prerequisites To use this workflow, you need the following accounts and credentials: Google Sheets Account: To manage the content tracker. The sheet must contain columns for Topic, Reference URL, Title, Status, and Link to document. OpenAI API Key (for GPT-4o-mini): To power the initial content drafting and subsequent revisions. Gmail Account: To send the content for human approval and wait for feedback. Google Docs Account: To create and store the final approved blog posts. How It Works The workflow operates in four main stages: Topic Submission, AI Content Creation, Human Approval & Revision Loop, and Final Publishing. Stage 1: Topic Submission and Tracking This stage captures a new blog topic and adds it to the content tracker. On form submission (Form Trigger): The workflow is initiated when a user submits a Topic and an optional Reference link through the form. Append row in sheet (Google Sheets): The new topic and reference link are added as a new row in your content tracker sheet. Get Topic from Google Sheets: The workflow fetches the newly added row, including the system-generated row_number for tracking updates. Stage 2: AI Content Creation (Initial Draft) The workflow uses an expert AI agent to generate the first draft of the blog post. Copywriter AI Agent: Acting as an expert SEO content strategist, the agent receives the topic and reference URL. The agent improves the provided topic into an SEO-optimized title. It writes a complete, conversational, SEO-friendly blog post (800–1200 words) using proper Markdown headings and lists. OpenAI Chat Model (GPT-4o-mini): Powers the agent's generation. Structured Output Parser: Ensures the output is in a JSON format with separate title and content keys. Set Data: The AI-generated title and content are mapped to workflow variables (Topic Title, Content) for easy use in subsequent nodes. Stage 3: Human Approval and Revision Loop This is the critical quality control step where a human reviews the draft and decides on the next action. Send Content for Approval (Gmail): The generated title and content are sent via email to the approver (&lt;your email&gt;). This uses a custom form that allows the user to choose Yes (Approve), No (Request Revision), or Cancel. The form also includes a Content Feedback textarea. Approval Result (Switch): The workflow pauses until the approver submits the form, and then directs the flow based on their choice. If "Yes" (Approved): Proceeds to the final publishing stage. The Update Topic Status on Google Sheets node is executed, setting the Status to Approved and logging the new Title. If "No" (Revision Requested): Proceeds to the revision loop. Copywriter Revision Agent: This agent takes the original content, the topic title, and the user's Content Feedback. It is instructed to incorporate the feedback, preserving the existing structure and tone, and outputs a revised blog post. The flow loops back through the Set Data node and then returns to the Send Content for Approval node for a new review. If "Cancel": Stops the workflow, and the Update Topic Status on Google Sheets node is executed. Stage 4: Final Publishing Once approved, the content is stored in Google Docs and the tracker is updated. Create Blog file (Google Docs): A new Google Doc is created using the approved Topic Title. Add blog content in file (Google Docs): The final Content (in Markdown format) is inserted into the newly created document. Update sheet with blog post link (Google Sheets): The final tracker update logs the Link to document and the Published date. Customization Tip Recommend using AI humanazier and AI detector tools before approval to make the SEO score better.

Priyanka RanaBy Priyanka Rana
528

Intelligent purchase order generator with AI supplier selection

Transform procurement from manual chaos to intelligent automation - AI-powered supplier selection analyzes urgency, cost, and delivery requirements to recommend optimal vendors, then automatically generates professional POs, manages approval workflows, and tracks delivery while maintaining complete audit trails. What This Workflow Does Revolutionizes purchase order management with AI-driven supplier optimization and automated procurement workflows: Webhook-Triggered Generation - Automatically creates POs from inventory systems, manual requests, or threshold alerts Smart Data Validation - Verifies item details, quantities, pricing, and calculates totals with tax and shipping AI Supplier Selection - OpenAI agent analyzes order requirements and recommends optimal supplier based on multiple factors Intelligent Analysis - AI considers urgency level, total value, item categories, delivery requirements, and cost optimization Multi-Supplier Database - Maintains supplier profiles with contact details, payment terms, delivery times, and specializations Approval Workflow - Routes high-value orders (&gt;$5000) for management approval before supplier notification Professional PO Generation - Creates beautifully formatted purchase orders with company branding and complete details AI Insights Display - Shows supplier selection reasoning, cost optimization notes, and alternative supplier recommendations PDF Conversion - Transforms HTML into print-ready, professional-quality purchase order documents Automated Email Distribution - Sends POs directly to selected suppliers with all necessary attachments Google Drive Archival - Automatically saves POs to organized folders with searchable filenames Procurement System Logging - Records complete PO details, supplier info, and status in centralized system Delivery Tracking - Monitors order status from placement through delivery confirmation Slack Team Notifications - Real-time alerts to procurement team with PO details and AI recommendations Urgency Classification - Prioritizes orders based on urgency (urgent, normal) affecting supplier selection Cost Optimization - AI identifies opportunities for savings or faster delivery based on requirements Key Features AI-Powered Supplier Matching: Machine learning analyzes order characteristics and recommends best supplier from database based on delivery speed, cost, and specialization Intelligent Trade-Off Analysis: AI balances cost vs delivery time vs supplier capabilities to find optimal choice for specific order requirements Automatic PO Numbering: Generates unique sequential purchase order numbers with format PO-YYYYMM-for tracking and reference Approval Threshold Management: Configurable dollar thresholds trigger approval workflows for high-value purchases requiring management authorization Multi-Criteria Supplier Selection: Considers urgency level, order value, item categories, delivery requirements, and historical performance Supplier Specialization Matching: Routes technology orders to tech suppliers, construction materials to building suppliers, etc. Cost vs Speed Optimization: AI recommends premium suppliers for urgent orders and budget suppliers for standard delivery timelines Alternative Supplier Suggestions: Provides backup supplier recommendations in case primary choice is unavailable Real-Time Pricing Calculations: Automatically computes line items, subtotals, taxes, shipping, and grand totals Payment Terms Automation: Pulls supplier-specific payment terms (Net 30, Net 45, etc.) from supplier database Shipping Address Management: Maintains multiple delivery locations with automatic address population Special Instructions Field: Captures custom requirements, delivery notes, or handling instructions for suppliers Item Catalog Integration: Supports product codes, descriptions, quantities, and unit pricing for accurate ordering Audit Trail Generation: Complete activity log tracking PO creation, approvals, supplier notification, and delivery Status Tracking System: Monitors PO lifecycle from creation through delivery confirmation with real-time updates Multi-Department Support: Tracks requesting department for budget allocation and accountability Perfect For Retail Stores - Automated inventory reordering when stock reaches threshold levels Manufacturing Companies - Raw material procurement with delivery scheduling for production planning Restaurant Chains - Food and supplies ordering with vendor rotation and cost optimization IT Departments - Equipment purchasing with approval workflows for technology investments Construction Companies - Materials procurement with urgency-based supplier selection for project timelines Healthcare Facilities - Medical supplies ordering with compliance tracking and vendor management Educational Institutions - Procurement for facilities, supplies, and equipment across departments E-commerce Businesses - Inventory replenishment with AI-optimized supplier selection for margins Hospitality Industry - Supplies procurement for hotels and resorts with cost control Government Agencies - Compliant procurement workflows with approval chains and audit trails What You Will Need Required Integrations OpenAI API - AI agent for intelligent supplier selection and optimization (API key required) HTML to PDF API - PDF conversion service for professional PO documents (approximately 1-5 cents per PO) Gmail or SMTP - Email delivery for sending POs to suppliers and approval requests Google Drive - Cloud storage for PO archival and compliance documentation Optional Integrations Slack Webhook - Procurement team notifications with PO details and AI insights Procurement Software - ERP/procurement system API for automatic logging and tracking Inventory Management - Connect to inventory systems for automated reorder triggers Accounting Software - QuickBooks, Xero integration for expense tracking and reconciliation Supplier Portal - Direct integration with supplier order management systems Approval Software - Connect to approval management platforms for workflow automation Quick Start Import Template - Copy JSON workflow and import into your n8n instance Configure OpenAI - Add OpenAI API credentials for AI supplier selection agent Setup PDF Service - Add HTML to PDF API credentials in the HTML to PDF node Configure Gmail - Connect Gmail OAuth2 credentials and update sender email Connect Google Drive - Add Google Drive OAuth2 credentials and set folder ID for PO archival Customize Company Info - Edit company data with your company name, address, contact details Update Supplier Database - Modify supplier information in enrichment node with actual vendor details Set Approval Threshold - Adjust dollar amount requiring management approval ($5000 default) Configure Email Templates - Customize supplier email and approval request messages Add Slack Webhook - Configure Slack notification URL for procurement team alerts Test AI Agent - Submit sample order to verify AI supplier selection logic Test Complete Workflow - Run end-to-end test with real PO data to verify all integrations Customization Options Supplier Scoring Algorithm - Adjust AI weighting for cost vs delivery speed vs quality factors Multi-Location Support - Add multiple shipping addresses for different facilities or warehouses Budget Tracking - Integrate departmental budgets with automatic budget consumption tracking Volume Discounts - Configure automatic discount calculations based on order quantities Contract Compliance - Enforce existing vendor contracts and preferred supplier agreements Multi-Currency Support - Handle international suppliers with currency conversion and forex rates RFQ Generation - Extend workflow to generate requests for quotes for new items Delivery Scheduling - Integrate calendar for scheduled deliveries and receiving coordination Quality Tracking - Add supplier performance scoring based on delivery time and quality Return Management - Create return authorization workflows for defective items Recurring Orders - Automate standing orders with scheduled generation Inventory Forecasting - AI predicts reorder points based on historical consumption patterns Supplier Negotiation - Track pricing history and flag opportunities for renegotiation Compliance Documentation - Attach required certifications, insurance, or regulatory documents Multi-Approver Chains - Configure complex approval hierarchies for different dollar thresholds Expected Results 90% time savings - Reduce PO creation from 30 minutes to 3 minutes per order 50% faster supplier selection - AI recommends optimal vendor instantly vs manual research Elimination of stockouts - Automated reordering prevents inventory shortages 20-30% cost savings - AI optimization identifies better pricing and supplier options 100% approval compliance - No high-value orders bypass required approvals Zero lost POs - Complete digital trail with automatic archival Improved supplier relationships - Professional, consistent POs with clear requirements Faster order processing - Suppliers receive clear POs immediately enabling faster fulfillment Better delivery predictability - AI matches urgency to supplier capabilities reducing delays Reduced procurement overhead - Automation eliminates manual data entry and follow-up Pro Tips Train AI with Historical Data - Feed past successful orders to improve AI supplier recommendations Maintain Supplier Performance Scores - Track delivery times and quality to enhance AI selection accuracy Set Smart Thresholds - Adjust approval amounts based on department budgets and risk tolerance Use Urgency Levels Strategically - Reserve "urgent" classification for true emergencies to optimize costs Monitor AI Recommendations - Review AI reasoning regularly to validate supplier selection logic Integrate Inventory Triggers - Connect to inventory systems for automatic PO generation at reorder points Establish Preferred Vendors - Flag preferred suppliers in database for AI to prioritize when suitable Document Special Requirements - Use special instructions field consistently for better supplier compliance Track Cost Trends - Export PO data to analyze spending patterns and negotiation opportunities Review Alternative Suppliers - Keep AI's alternative recommendations for backup when primary unavailable Schedule Recurring Orders - Set up automated triggers for regular supply needs Centralize Receiving - Use consistent ship-to addresses to simplify delivery coordination Archive Systematically - Organize Drive folders by fiscal year, department, or supplier Test Approval Workflow - Verify approval routing works before deploying to production Communicate AI Benefits - Help procurement team understand AI recommendations build trust Business Impact Metrics Track these key metrics to measure workflow success: PO Generation Time - Average minutes from request to supplier notification (target: under 5 minutes) Supplier Selection Accuracy - Percentage of AI recommendations that meet delivery and cost expectations (target: 90%+) Approval Workflow Speed - Average hours for high-value PO approvals (target: under 4 hours) Stockout Prevention - Reduction in inventory shortages due to faster PO processing Cost Savings - Percentage reduction in procurement costs from AI optimization (typical: 15-25%) Order Accuracy - Reduction in PO errors requiring correction or cancellation Supplier On-Time Delivery - Improvement in delivery performance from better supplier matching Procurement Productivity - Number of POs processed per procurement staff member Budget Compliance - Percentage of POs staying within approved departmental budgets Audit Readiness - Time required to produce PO documentation for audits (target: under 5 minutes) Template Compatibility Compatible with n8n version 1.0 and above Requires OpenAI API access for AI agent functionality Works with n8n Cloud and Self-Hosted instances Requires HTML to PDF API service subscription No coding required for basic setup Fully customizable supplier database and selection criteria Integrates with major procurement and ERP systems via API Supports unlimited suppliers and product categories Scales to handle thousands of POs monthly --- Ready to transform your procurement process? Import this template and start generating intelligent purchase orders with AI-powered supplier selection, automated approval workflows, and complete procurement tracking - eliminating manual processes, preventing stockouts, and optimizing costs across your entire supply chain!

Jitesh DugarBy Jitesh Dugar
136