Skip to content

Google Translate

Google Translate translates a text into the language you choose or detects which language it is written in, using Google’s translation service. When translating, you don’t need to give the source language: it is detected automatically.

You can use it as a step in the flow or as a tool for an agent. If you connect its Tool output to an agent’s Tools input, the agent translates or detects the language when it needs to, and it can fill in the fields you mark as Defined by AI itself. More on this in Tool Mode.

When to use it

  • You receive customer enquiries in several languages and want to translate them into English before processing them.
  • You want to reply to each customer in their language after detecting it.
  • You translate product descriptions for an international online shop.
  • An agent serves users from other countries and needs to translate specific texts.

Configuration

You need a Google Translate credential with a Google Cloud key that has the translation service enabled. See Credentials.

FieldWhat it does
Credential (required)The Google Translate credential. Once you pick it, the Target Language list is loaded.
OperationTranslate to translate or Detect Language to detect the language. Defaults to Translate.
Text (required)The text you want to translate or identify the language of.
Target Language (required)The language to translate into, by its code, for example es, en or fr. Defaults to en. Only shown with Translate.

Advanced options

FieldWhat it does
Formattext for plain text or html if the text contains web page tags you want to keep. Defaults to text. Only shown with Translate.

Output

The Data output contains:

  • With Translate: the translated text (translated_text), the detected source language (detected_source_language), the target language and the original text.
  • With Detect Language: the detected language code (detected_language), the confidence level (confidence) and the analysed text.

The Tool output connects to an agent’s Tools input.

Example

A hotel receives reviews in many languages and wants to read them all in English.

  1. Add Google Translate with Operation set to Translate and Target Language set to en.
  2. Connect the text of each review to Text.
  3. Pass the translated_text field of the Data output to the component that stores the reviews.
  • Language Detector: detects the language of a text without a credential.
  • Agent: the agent that can use translation as a tool.