Seamless Speech-to-Text & AI Interaction Workflow
detail.loadingPreview
Automate communication by instantly transcribing voice messages to text and leveraging advanced AI for intelligent responses. This workflow integrates seamlessly with Telegram, enabling rich, multimodal interactions.
About This Workflow
This n8n workflow, 'Speech Support Workflow', is designed to bridge the gap between voice and text-based communication, powered by cutting-edge AI. It begins by receiving messages on Telegram, intelligently distinguishing between text and voice inputs. For voice messages, it efficiently downloads the audio, transcribes it using OpenAI's robust speech-to-text capabilities, and then processes the text through a Google Gemini AI model. The AI agent is configured to generate plain-text responses suitable for Telegram, with built-in code nodes to clean extraneous markdown and split lengthy outputs into manageable chunks. This ensures smooth, intelligent, and effective communication via your Telegram bot.
Key Features
- Multimodal Input Handling: Accepts both text and voice messages via Telegram.
- Automated Transcription: Leverages OpenAI to convert voice messages into readable text.
- Advanced AI Processing: Utilizes Google Gemini for intelligent text generation and response.
- Clean & Concise Output: Post-processes AI responses to remove markdown and ensure Telegram compatibility.
- Long Message Segmentation: Splits lengthy responses into multiple, manageable Telegram messages.
How To Use
- Set up Telegram Trigger: Configure the 'Recieve Telegram Message' node with your Telegram Bot Token. Ensure the 'updates' field includes 'message'.
- Handle Message Types: The 'If Voice Message' node will route inputs. Ensure the 'Check For Text or Voice Message' node correctly extracts text from messages.
- Process Voice Messages: If it's a voice message, connect 'If Voice Message' (False branch) to 'Download Audio File' and then to 'Transcribe Audio File' using your OpenAI credentials.
- AI Interaction: Connect the transcribed text (or original text message) to the 'AI Agent' node. Ensure your system prompt and text inputs are correctly configured.
- Refine AI Output: Connect the 'AI Agent' output to 'Code to remove unwanted characters from LLM response' to clean the text, followed by 'Code to split output into chunks under 4000 characters' for Telegram's length limits.
- Send Response: Connect the final code node to 'Respond to Telegram Message', ensuring 'chatId' and 'text' parameters are correctly mapped from previous nodes.
- Configure Credentials: Ensure your Telegram API, Google Gemini (PaLM) API, and OpenAI API credentials are set up and linked in the respective nodes.
Apps Used
Workflow JSON
{
"id": "8c9d770a-8765-4779-92c0-74e4a6cd6fc4",
"name": "Seamless Speech-to-Text & AI Interaction Workflow",
"nodes": 10,
"category": "Operations",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 8c9d770a-8765...
About the Author
N8N_Community_Pick
Curator
Hand-picked high quality workflows from the global community.
Statistics
Related Workflows
Discover more workflows you might like
Instant WooCommerce Order Notifications via Telegram
When a new order is placed on your WooCommerce store, instantly receive detailed notifications directly to your Telegram chat. Stay on top of your e-commerce operations with real-time alerts, including order specifics and a direct link to view the order.
Google Sheets to Icypeas: Automated Bulk Domain Scanning
This workflow streamlines the process of performing bulk domain scans by integrating your Google Sheets data directly with the Icypeas platform. Automate the submission of company names from your spreadsheet to Icypeas for comprehensive domain information, saving valuable time and effort.
On-Demand Microsoft SQL Query Execution
This workflow allows you to manually trigger and execute any SQL query against your Microsoft SQL Server database. Perfect for ad-hoc data lookups, administrative tasks, or quick tests, giving you direct control over your database operations.