What this workflow does
This workflow listens for new Telegram voice messages.
It downloads the audio and turns it into text using OpenAI.
Then, it checks what language the message is in.
After that, it translates the text between two chosen languages.
Finally, it sends the translated text and also an audio reply back in Telegram.
This saves time and helps understand messages faster in different languages.
Who should use this workflow
People who get voice messages in languages they do not speak well.
Users who want quick translations right inside Telegram without switching apps.
Anyone needing faster replies and fewer mistakes in foreign language chats.
Tools and services used
- Telegram Bot API: Receives voice messages and sends replies.
- OpenAI API: Transcribes speech to text, detects language, translates text, and synthesizes audio.
- n8n automation: Runs the workflow and connects Telegram and OpenAI.
Inputs, Processing steps, and Outputs
Input
- New Telegram voice message triggers the workflow.
Processing
- Download the voice file from Telegram.
- Send audio to OpenAI to get text transcription.
- Prepare the text safely for processing if empty or missing.
- Use OpenAI to detect the language and translate between two set languages.
- Convert the translated text back to speech audio.
Output
- Send back the translated text message in the Telegram chat.
- Send audio of the translated speech as a voice reply.
Beginner step-by-step: How to use this workflow in n8n
Import the workflow
- Inside the n8n editor, click “Import from File”.
- Find and select the downloaded workflow file using the Download button on this page.
Configure after import
- Add your Telegram Bot API credentials.
- Add your OpenAI API Key.
- Check the Settings node for
language_nativeandlanguage_translatevalues. Change if needed. - Make sure the chat IDs or user IDs are updating dynamically. Usually done automatically.
Test and activate
- Send a test voice message to your Telegram bot to try the whole flow.
- Watch in n8n if the workflow runs without errors.
- Once working, switch the workflow to active mode to run for all messages.
If you want privacy and control, consider self-host n8n.
Step-by-step workflow description (Input → Process → Output)
Input
The Telegram Trigger node waits for any new message with voice audio.
It triggers the workflow only if a voice message is detected.
Process
- The Telegram node downloads voice audio using the file ID from the trigger.
- The OpenAI node transcribes audio to text using speech-to-text models.
- The Set node named Input Error Handling prepares the text so next nodes don’t break if text is empty.
- The Chain LLM node auto detects if text is in native or translated language and then translates accordingly.
- The system uses another OpenAI node to convert the translated text back to speech audio.
Output
- The Telegram node sends translated text message back in the Telegram chat.
- A second Telegram node sends the audio reply with the translated speech.
Common edge cases and how to handle failures
- If the Telegram Trigger node does not work, check if the webhook is set and if credentials are correct.
- If OpenAI transcription is empty or has errors, verify the Telegram voice file ID and ensure audio is correctly sent to OpenAI.
- If translations look wrong or repeat, check the prompt in the Chain LLM node and make sure language variables are correct.
Customization ideas
- Edit the Settings node to change native and translated languages easily.
- Modify the Telegram Trigger to also handle audio and video messages.
- Add emojis or format text in the reply node for more fun messages.
- Insert logging nodes to save transcripts or translations to external databases.
- Expand the Chain LLM translation prompt to support more than two languages.
Summary
→ Transcribes voice messages from Telegram.
→ Detects and translates text between two chosen languages.
→ Sends back translation as text and voice message.
✓ Quick understanding of foreign voice messages.
✓ Saves time and reduces errors.
✓ Fits inside Telegram without switching apps.
