Text Translate
Translates text between languages or detects the source language using Google Cloud Translation API. This node supports 60+ languages and automatically detects the source language for seamless translation workflows.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- Text - The text content to translate or detect language for. Can be a single word, sentence, paragraph, or multiple paragraphs.
Options
- Target Language - The language to translate the text into. Default is "English". Supported languages include:
- Major Languages: Afrikaans (af), Albanian (sq), Amharic (am), Arabic (ar), Armenian (hy), Assamese (as), Aymara (ay), Azerbaijani (az), Bambara (bm), Basque (eu), Belarusian (be), Bengali (bn), Bhojpuri (bho), Bosnian (bs), Bulgarian (bg), Catalan (ca), Cebuano (ceb), Danish (da), Dutch (nl), German (de), Hindi (hi), Indonesian (id), Italian (it), Japanese (ja), Korean (ko), Norwegian (no), Portuguese (pt), Russian (ru), Spanish (es), Swedish (sv), Thai (th), Turkish (tr), Turkmen (tk), Twi (ak), Ukrainian (uk), Urdu (ur), Uyghur (uf), Uzbek (uz), Vietnamese (vi), Welsh (cy), Xhosa (xh), Yiddish (yi), Yoruba (yo), Zulu (zu)
- Chinese Variants: Chinese - Cantonese (zh-HK), Chinese - Simplified (zh-CN), Chinese - Traditional (zh-TW)
- English Variants: English (en), English - Australian (en-AU), English - Canadian (en-CA), English - Great Britain (en-GB), English - Indian (en-IN), English - US (en-US)
- French Variants: French (fr), French - Canadian (fr-CA), French - France (fr-FR)
- Spanish Variants: Spanish (es), Spanish - Latin America (es-419), Spanish - Spain (es-ES)
- Portuguese Variants: Portuguese (pt), Portuguese - Brazilian (pt-BR)
- Credentials - Google Cloud service account credentials used to authenticate with the Translation API. Select from credentials stored in your Robomotion vault.
- Only Detect Language - If enabled, only detects the source language of the input text without translating it. Default is false.
Output
- Text - The translated text. When translating, contains the text in the target language. When "Only Detect Language" is enabled, this field is empty.
- Source Language - The detected source language code of the input text (e.g., "en" for English, "es" for Spanish, "fr" for French).
- Target Language - The target language code selected in the options (matches the Target Language option).
How It Works
The Text Translate node provides flexible translation capabilities using Google Cloud Translation API. When executed, the node:
- Validates Inputs - Ensures text input is not empty and credentials are valid
- Authenticates - Establishes a connection to Google Cloud Translation API using the provided service account credentials
- Detects Source Language - Automatically identifies the language of the input text
- Translation Mode:
- Normal Mode - Translates the text from the detected source language to the specified target language
- Detection Only Mode - When "Only Detect Language" is enabled, skips translation and only returns the detected source language
- Returns Results - Outputs the translated text (if applicable), source language code, and target language code
Requirements
- Google Cloud account with Translation API enabled
- Service account with Cloud Translation API User role or equivalent permissions
- Service account credentials JSON file stored in Robomotion vault
- Text content to translate or analyze (cannot be empty)
- Network connectivity to Google Cloud services
Error Handling
The node will return specific errors in the following cases:
- ErrInvalidArg:
- Empty text input
- Empty target language selection
- ErrCredentials:
- Missing or invalid Google Cloud credentials
- Credentials file not found in vault
- Malformed credentials JSON
- ErrRuntime:
- Failed to create Translation API client
- Authentication failures
- ErrTranslate:
- Translation API service errors
- Invalid language codes
- Network connectivity issues
- API quota exceeded
- Language not supported for translation
Practical Examples
Example 1: Translate Customer Feedback
Scenario: Automatically translate customer feedback from various languages to English for analysis.
Inputs:
- Text:
"Este producto es excelente. Lo recomiendo totalmente."
Options:
- Target Language: "English"
- Credentials: (Your Google Cloud credentials)
- Only Detect Language: false
Output:
- Text:
"This product is excellent. I totally recommend it." - Source Language:
"es" - Target Language:
"en"
Example 2: Detect Language Before Processing
Scenario: Detect the language of incoming support tickets to route them to the appropriate team.
Inputs:
- Text:
"Bonjour, j'ai besoin d'aide avec ma commande"
Options:
- Target Language: "English" (ignored in detection-only mode)
- Credentials: (Your Google Cloud credentials)
- Only Detect Language: true
Output:
- Text:
""(empty) - Source Language:
"fr" - Target Language:
"en"
Example 3: Translate Product Descriptions for E-commerce
Scenario: Translate product descriptions to multiple languages for international markets.
Inputs:
- Text:
"Premium leather wallet with RFID protection. Features 8 card slots and bill compartment."
Options:
- Target Language: "Spanish - Spain" (es-ES)
- Credentials: (Your Google Cloud credentials)
- Only Detect Language: false
Output:
- Text:
"Cartera de cuero premium con protección RFID. Cuenta con 8 ranuras para tarjetas y compartimento para billetes." - Source Language:
"en" - Target Language:
"es-ES"
Example 4: Multi-Language Content Localization
Scenario: Translate marketing content to Brazilian Portuguese for a campaign.
Inputs:
- Text:
"Limited time offer! Get 50% off on all premium features."
Options:
- Target Language: "Portuguese - Brazilian" (pt-BR)
- Credentials: (Your Google Cloud credentials)
- Only Detect Language: false
Output:
- Text:
"Oferta por tempo limitado! Ganhe 50% de desconto em todos os recursos premium." - Source Language:
"en" - Target Language:
"pt-BR"
Tips for Effective Use
Translation Quality
- Provide Context - Longer text passages with complete sentences generally translate better than isolated words
- Use Proper Grammar - Well-structured input text produces more accurate translations
- Avoid Slang - Informal language and slang may not translate accurately
- Technical Terms - Industry-specific terminology may require post-translation review
Performance Optimization
- Batch Similar Content - Group similar content types for consistent translation style
- Cache Results - Store frequently translated phrases to reduce API calls
- Language Detection - Use "Only Detect Language" mode when you only need to identify the language
Regional Variants
- Choose Appropriate Locale - Select region-specific variants (e.g., en-US vs. en-GB) for localized content
- Currency and Date Formats - Be aware that translations don't automatically convert numbers, dates, or currency formats
- Cultural Adaptation - Consider cultural context when selecting target language variants
Integration Best Practices
- Error Handling - Use Continue On Error for non-critical translations or implement Catch nodes
- Rate Limiting - Be aware of Google Cloud Translation API quotas and implement appropriate throttling
- Cost Management - Monitor character count as pricing is based on characters translated
- Credentials Security - Store credentials securely in Robomotion vault, never hardcode them
Common Workflows
- Support Ticket Routing - Detect language → Route to appropriate team → Translate if needed
- Content Publishing - Translate → Review → Publish to regional sites
- Data Processing - Extract text → Detect language → Translate → Store results
- Email Automation - Read email → Detect language → Translate → Generate response
Common Errors and Solutions
"Text cannot be empty"
Cause: The Text input is empty or null. Solution: Ensure the Text input variable contains valid text content before the node executes.
"No Credential Content" or "ErrCredentials"
Cause: The selected credentials are invalid or not properly formatted. Solution:
- Verify the credentials exist in your Robomotion vault
- Ensure the credentials JSON file is valid
- Check that you've selected the correct credentials in the Credentials option
- Re-download the service account key from Google Cloud Console if needed
"Failed to create translate client"
Cause: Unable to establish connection to Google Cloud Translation API. Solution:
- Verify internet connectivity
- Check that the Translation API is enabled in your Google Cloud Console
- Ensure the service account has the necessary permissions
- Verify credentials are not expired
"Language could not be detected"
Cause: The input text is too short or unclear for language detection. Solution:
- Provide more text for better language detection
- Ensure text contains actual language content (not just numbers or symbols)
- Check that the text encoding is correct
Translation API Quota Exceeded
Cause: You've exceeded your Google Cloud Translation API usage limits. Solution:
- Check your quota usage in Google Cloud Console
- Request a quota increase if needed
- Implement rate limiting in your flow
- Consider caching frequently translated content
Poor Translation Quality
Cause: Complex text, slang, or context-specific content. Solution:
- Simplify input text structure
- Break long texts into smaller, logical segments
- Avoid idioms and colloquialisms
- Review and post-edit critical translations
- Consider using specific regional variants for better cultural accuracy
Usage Notes
- The node automatically detects the source language, so you don't need to specify it
- Source language detection is included in the translation process at no additional cost
- When "Only Detect Language" is enabled, translation is skipped entirely
- The Source Language output uses ISO 639-1 language codes (e.g., "en", "es", "fr")
- Regional variants provide more culturally appropriate translations (e.g., "pt-BR" for Brazilian Portuguese vs. "pt" for European Portuguese)
- Large texts (thousands of characters) may require longer processing time
- The Translation API has character limits per request; very large texts may need to be split
- Translation quality is generally highest for widely-spoken language pairs (e.g., English ↔ Spanish)
- Some language pairs may go through an intermediate language (pivot translation) which can affect quality
- The service is stateless - each translation is independent and doesn't benefit from previous context
- Pricing is based on characters processed, not API calls - monitor usage to control costs