Google Translate
This component connects your automation workflows to Google’s translation service. It allows you to convert text from one language to another, automatically identify the language of a given text, or fetch a list of all supported languages. Everything happens securely through a cloud API, keeping your data flowing smoothly between apps.
How it Works
This component acts as a secure bridge between Nappai and the Google Cloud Translation API. When you run it, the component sends your text to Google’s servers, which instantly process the language request and return the results back to your workflow. If you are processing multiple items at once, the component uses a special batch process (Mapping Mode) to handle each piece of text one by one in the background, ensuring your workflow stays fast and organized.
Connection & Credentials
This component requires configuring a credential in the Nappai panel before interacting with the external service:
- Go to the Credentials section in your Nappai panel.
- Create a new credential of the type specified for this component and fill in the required fields (API Keys, tokens, etc.).
- In your workflow, select the saved credential in the Credential input field of this node.
Inputs
Mapping Mode
This component has a special mode called “Mapping Mode”. When you enable this mode using the toggle switch, an additional input called “Mapping Data” is activated, and each input field offers you three different ways to provide data:
- Fixed: You type the value directly into the field.
- Mapped: You connect the output of another component to use its result as the value.
- Javascript: You write Javascript code to dynamically calculate the value.
This flexibility allows you to create more dynamic and connected workflows.
Input Fields
The following fields are available to configure this component. Each field may be visible in different operations:
- Operation: Select the task you want the component to perform, such as translating text, detecting the original language, or retrieving supported languages.
- Text: The text you want to translate or analyze. This field is required to run the component.
- Target Language: The language code you want to convert the text into (e.g., ‘en’ for English, ‘es’ for Spanish, ‘fr’ for French).
- Format: Choose how the text is structured. Select ‘text’ for plain messages or ‘html’ if the text contains formatting like web page code.
Outputs
After processing your request, this component outputs the result as structured data that you can route to other parts of your workflow. This output contains the translated text, the detected original language, confidence scores, or a complete list of supported languages, depending on the operation you selected.
Output Data Example (JSON)json
{ “translated_text”: “Bienvenido al sistema de automatización”, “detected_language”: “en”, “confidence”: 0.98, “supported_languages”: [“en”, “es”, “fr”, “de”, “ja”] }
Connectivity
In a typical workflow, this component connects after a data source or text extraction node (like a CRM record, email parser, or manual input) and before a formatting, storage, or messaging node. For example, you might connect it to an email reader to translate incoming messages, or to a database to standardize multilingual content before displaying it in a dashboard. Its output typically feeds into data storage, message builders, or conditional logic nodes that decide what to do next based on the translated result.
Usage Example
Scenario: Automating Multilingual Customer Support Imagine you receive customer messages in various languages. You can connect an email or form reader to this component, set the Operation to “Translate”, provide the Target Language as “es”, and run it on every incoming message. The component will automatically detect the original language, translate the message to Spanish, and pass the clean, translated text to your support ticket system. Thanks to Mapping Mode, this happens seamlessly even if you receive dozens of messages at once.
Tips and Best Practices
- Always use standard language codes (like ‘en’, ‘es’, ‘fr’) for the Target Language to ensure consistent results.
- Enable Mapping Mode when working with lists or multiple records to process them efficiently in bulk.
- If you are working with formatted web content, select the ‘html’ format to preserve links and styling during translation.
- Test your workflows with short sample texts first to verify language codes and translation accuracy before scaling up.
Security Considerations
- Keep your Google API Key secure and never expose it directly in shared workflows. Use Nappai’s built-in credential manager to store it safely.
- Ensure you comply with Google’s Terms of Service and rate limits when processing large volumes of text to avoid temporary service interruptions.
- Avoid sending sensitive or personal information through the translation API unless required and properly governed by your data privacy policies.