CO - API de Tradutor icon

CO - API de Tradutor

Traduzir texto usando a API de Tradutor

Overview

This node translates text from one language to another using a custom translation API. It is useful for automating multilingual content workflows, such as translating user-generated content, product descriptions, or messages in chatbots. For example, you can input English text and get it translated into Portuguese or Spanish automatically.

Properties

Name Meaning
Texto Para Traduzir The text string that you want to translate.
Idioma De Origem The source language code of the input text. Use "auto" to enable automatic language detection.
Idioma De Destino The target language code to which the text should be translated.

Output

The node outputs an array with one item per input. Each output item contains a json object with the following structure:

{
  "translatedText": "Translated text string"
}

This field holds the translated version of the input text. The node does not output any binary data.

Dependencies

  • Requires access to a translation API endpoint running at http://192.168.0.105:3000/translate.
  • The node sends a POST request with JSON body containing the text (q), source language (source), and target language (target).
  • No external API keys or authentication are shown in the code, but the API server must be reachable from the n8n instance.

Troubleshooting

  • API Unreachable or Timeout: If the translation API server is down or unreachable, the node will throw an error unless "Continue On Fail" is enabled.
  • Invalid Language Codes: Using unsupported or incorrect language codes may cause the API to return errors or unexpected results.
  • Empty Text Input: Providing empty text might result in no meaningful translation.
  • Error Handling: When an error occurs, if "Continue On Fail" is enabled, the node outputs the original input along with the error details for that item.

Links and References

Discussion