Transcribe voice messages from Telegram using OpenAI Whisper-1
This n8n workflow processes incoming Telegram messages, differentiating between text and voice messages.
How it works:
- Message Trigger: The workflow initiates when a new message is received via the Telegram "Message Trigger" node.
- Switch Node: This node acts as a router. It examines the incoming message:
- If the message is
text, it directs the flow along the "text" branch. - If the message contains
voice, it directs the flow along the "voice" branch.
- If the message is
- Get Audio File: For audio messages, this node downloads the audio file from Telegram.
- Transcribe Audio: The downloaded audio file is then sent to an "OpenAI Transcribe Recording" node, which uses OpenAI's
whisper-1speech-to-text model to convert the audio into a text transcript. - Send Transcription Message: Regardless of whether the original message was text or transcribed audio, the final text content is then passed to a "Send transcription message" node.
Setup Requirements:
- Telegram Bot Token: You will need a Telegram bot token configured in the "Message Trigger" node to receive messages.
- OpenAI API Key: An OpenAI API key is required for the "Transcribe audio" node to perform speech transcription.
Additional Notes:
This workflow provides a foundational step for building more complex AI-driven applications. The transcribed text or original text message can be easily piped into an AI agent (e.g., a large language model) for analysis, response generation, or interaction with other tools, extending the bot's capabilities beyond simple message reception and transcription.
👉 Need Help?
Feel free to contact us at 1 Node. Get instant access to a library of free resources we created.
Transcribe Voice Messages from Telegram using OpenAI Whisper
This n8n workflow automates the transcription of voice messages received in Telegram chats using OpenAI's Whisper model. It's designed to make voice messages accessible as text, which can be useful for quick review, searchability, or for users who prefer reading over listening.
What it does
This workflow performs the following key steps:
- Listens for Telegram Messages: It acts as a webhook, waiting for incoming messages in a configured Telegram chat or bot.
- Filters for Voice Messages: It checks if the received message is a voice message.
- Transcribes Audio with OpenAI Whisper: If a voice message is detected, it sends the audio file to the OpenAI Whisper API for transcription.
- Sends Transcription Back to Telegram: The transcribed text is then sent back to the original Telegram chat as a regular text message.
Prerequisites/Requirements
To use this workflow, you will need:
- n8n Instance: A running instance of n8n.
- Telegram Bot: A Telegram bot token and a chat ID where the bot is a member. You can create a new bot via BotFather on Telegram.
- OpenAI API Key: An API key from OpenAI with access to the Whisper model.
Setup/Usage
- Import the workflow: Download the provided JSON and import it into your n8n instance.
- Configure Telegram Trigger:
- Open the "Telegram Trigger" node.
- Select or create a new Telegram API credential. You will need your Telegram Bot Token.
- Ensure the "Update Type" is set to
message.
- Configure Telegram (Output) Node:
- Open the "Telegram" node.
- Select the same Telegram API credential used in the trigger.
- Set the "Chat ID" to the ID of the chat where you want the bot to send transcriptions. This can be a specific user's ID or a group chat ID.
- The "Text" field should contain the expression
{{ $json.transcription }}to send the transcribed text.
- Configure OpenAI Node:
- Open the "OpenAI" node.
- Select or create a new OpenAI API credential. You will need your OpenAI API Key.
- Ensure the "Operation" is set to
Transcribe Audio. - The "Audio File" field should be set to an expression that points to the voice message file URL from Telegram, for example:
{{ $json.message.voice.file_id }}. You might need to use a Telegram node to get the actual file URL from thefile_id.
- Activate the Workflow: Once all credentials and settings are configured, activate the workflow.
Now, whenever a voice message is sent to your configured Telegram bot or chat, n8n will automatically transcribe it and send the text back to the chat.
Related Templates
Automated YouTube video uploads with 12h interval scheduling in JST
This workflow automates a batch upload of multiple videos to YouTube, spacing each upload 12 hours apart in Japan Standard Time (UTC+9) and automatically adding them to a playlist. ⚙️ Workflow Logic Manual Trigger — Starts the workflow manually. List Video Files — Uses a shell command to find all .mp4 files under the specified directory (/opt/downloads/单词卡/A1-A2). Sort and Generate Items — Sorts videos by day number (dayXX) extracted from filenames and assigns a sequential order value. Calculate Publish Schedule (+12h Interval) — Computes the next rounded JST hour plus a configurable buffer (default 30 min). Staggers each video’s scheduled time by order × 12 hours. Converts JST back to UTC for YouTube’s publishAt field. Split in Batches (1 per video) — Iterates over each video item. Read Video File — Loads the corresponding video from disk. Upload to YouTube (Scheduled) — Uploads the video privately with the computed publishAtUtc. Add to Playlist — Adds the newly uploaded video to the target playlist. 🕒 Highlights Timezone-safe: Pure UTC ↔ JST conversion avoids double-offset errors. Sequential scheduling: Ensures each upload is 12 hours apart to prevent clustering. Customizable: Change SPANHOURS, BUFFERMIN, or directory paths easily. Retry-ready: Each upload and playlist step has retry logic to handle transient errors. 💡 Typical Use Cases Multi-part educational video series (e.g., A1–A2 English learning). Regular content release cadence without manual scheduling. Automated YouTube publishing pipelines for pre-produced content. --- Author: Zane Category: Automation / YouTube / Scheduler Timezone: JST (UTC+09:00)
Monitor bank transactions with multi-channel alerts for accounting teams
Enhance financial oversight with this automated n8n workflow. Triggered every 5 minutes, it fetches real-time bank transactions via an API, enriches and transforms the data, and applies smart logic to detect critical, high, and medium priority alerts based on error conditions, amounts, or risk scores. It sends multi-channel notifications via email and Slack, logs all data to Google Sheets, and generates summary statistics for comprehensive tracking. 💰🚨 Key Features Real-time monitoring every 5 minutes for instant alerts. Smart prioritization (Critical, High, Medium) based on risk and errors. Multi-channel notifications via email and Slack. Detailed logging and summary reports in Google Sheets. How It Works Schedule Trigger: Runs every 5 minutes. Fetch Transactions: HTTP request retrieves real-time transaction data. API Error?: If condition for error logic is met, sends error alert. Enrich & Transform Data: Advanced risk calculation enhances data. Critical Alert?: If condition (50% or risk > 8) is met, raises alert. High Priority?: If condition (5% or risk > 7) is met, raises alert. Medium Priority?: If condition is met, raises alert. Log Priority to Sheet: Google Sheets appends critical, high, or medium priority data. Send Critical Email: HTML email to execute sheets append. Send High Priority Email: Email to finance team. Send High Priority Slack: Slack notification to finance team. Send Medium Priority Email: Email to finance team. Merge All Alerts: Combines all alerts for comprehensive tracking. Generate Summary Stats: Code block for analytics. Log Summary to Sheet: Summary statistics storage. Setup Instructions Import the workflow into n8n and configure the bank API credentials in "Fetch Transactions." Set up Google Sheets OAuth2 and replace the sheet ID for logging nodes. Configure Gmail API Key and Slack Bot Token for alerts. Test the workflow with sample transaction data exceeding risk or amount thresholds. Adjust priority conditions (e.g., 50%, 5%, risk > 8) based on your risk policy. Prerequisites Bank API access with real-time transaction data (e.g., https://api.bank.com) Google Sheets OAuth2 credentials Gmail API Key for email alerts Slack Bot Token (with chat:write permissions) Structured transaction data format Google Sheet Structure: Create a sheet with columns: Transaction ID Amount Date Risk Score Priority (Critical/High/Medium) Alert Sent Summary Stats Updated At Modification Options Adjust the "Schedule Trigger" interval (e.g., every 10 minutes). Modify "Critical Alert?" and "High Priority?" conditions for custom thresholds. Customize email and Slack templates with branded messaging. Integrate with fraud detection tools for enhanced risk analysis. Enhance "Generate Summary Stats" with additional metrics (e.g., average risk). Discover more workflows – Get in touch with us
Detect holiday conflicts & suggest meeting reschedules with Google Calendar and Slack
Who’s it for Remote and distributed teams that schedule across time zones and want to avoid meetings landing on public holidays—PMs, CS/AM teams, and ops leads who own cross-regional calendars. What it does / How it works The workflow checks next week’s Google Calendar events, compares event dates against public holidays for selected country codes, and produces a single Slack digest with any conflicts plus suggested alternative dates. Core steps: Workflow Configuration (Set) → Fetch Public Holidays (via a public holiday API such as Calendarific/Nager.Date) → Get Next Week Calendar Events (Google Calendar) → Detect Holiday Conflicts (compare dates) → Generate Reschedule Suggestions (find nearest business day that isn’t a holiday/weekend) → Format Slack Digest → Post Slack Digest. How to set up Open Workflow Configuration (Set) and edit: countryCodes, calendarId, slackChannel, nextWeekStart, nextWeekEnd. Connect your own Google Calendar and Slack credentials in n8n (no hardcoded keys). (Optional) Adjust the Trigger to run daily or only on Mondays. Requirements n8n (Cloud or self-hosted) Google Calendar read access to the target calendar Slack app with permission to post to the chosen channel A public-holiday API (no secrets needed for Nager.Date; Calendarific requires an API key) How to customize the workflow Time window: Change nextWeekStart/End to scan a different period. Holiday sources: Add or swap APIs; merge multiple regions. Suggestion logic: Tweak the look-ahead window or rules (e.g., skip Fridays). Output: Post per-calendar messages, DM owners, or create tentative reschedule events automatically.