Translation node for n8n that connects to the open source libretranslate API
| credentials | ||
| nodes/LibreTranslate | ||
| workflows | ||
| .eslintrc.js | ||
| .gitignore | ||
| .prettierrc | ||
| CHANGELOG.md | ||
| CLAUDE.md | ||
| gulpfile.js | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
n8n-nodes-libretranslate
This is an n8n community node that provides integration with LibreTranslate, a free and open-source machine translation API.
Features
This node supports all LibreTranslate API endpoints:
Translation Operations
- Translate Text - Translate text from one language to another
- Translate File - Translate documents and files
- Suggest Translation - Submit translation suggestions to improve the service
Language Operations
- Detect Language - Automatically detect the language of text
- Get Languages - Retrieve list of all supported languages
Settings Operations
- Get Frontend Settings - Retrieve frontend configuration settings
Installation
Community Nodes (Recommended)
- Go to Settings > Community Nodes in your n8n instance
- Select Install
- Enter
n8n-nodes-libretranslatein Enter npm package name - Agree to the risks and click Install
Manual Installation
npm install n8n-nodes-libretranslate
Credentials
To use this node, you need to configure LibreTranslate API credentials:
-
API URL (required) - The URL of your LibreTranslate instance
- For public instance:
https://libretranslate.com - For self-hosted: Your custom URL (e.g.,
http://localhost:5000)
- For public instance:
-
API Key (optional) - Required for managed instances from libretranslate.com
- Not required for self-hosted instances
- Get your API key from LibreTranslate Portal
Usage
Basic Translation Example
- Add the LibreTranslate node to your workflow
- Select Translation as the resource
- Select Translate Text as the operation
- Configure:
- Text: The text you want to translate
- Source Language: Source language code (e.g.,
enfor English, orautofor automatic detection) - Target Language: Target language code (e.g.,
esfor Spanish)
Language Detection Example
- Add the LibreTranslate node to your workflow
- Select Language as the resource
- Select Detect as the operation
- Enter the text to analyze
Get Supported Languages
- Add the LibreTranslate node to your workflow
- Select Language as the resource
- Select Get Languages as the operation
- Execute to get a list of all supported language pairs
Example Workflows
The workflows/ folder contains ready-to-use example workflows:
Email Translation Workflow
Automatically translates incoming emails from any language to English and forwards them via SMTP.
Features:
- Monitors IMAP inbox for new emails
- Detects the language of incoming emails
- Translates non-English emails to English
- Sends translated emails via SMTP
- Forwards English emails unchanged
See workflows/README.md for detailed setup instructions and customization options.
Development
# Install dependencies
npm install
# Build the node
npm run build
# Run linter
npm run lint
# Fix linting issues
npm run lintfix
Resources
License
MIT