<!-- BusyBot node reference — https://busybot.net/tools/google-translate/ -->

> Node: Google Translate (`google_translate`) · Action · v1
> Category: Utility · Credentials: Google Translate OAuth2 (`googleTranslateOAuth2Api`), Google API (Service Account) (`googleApi`)
> Updated: 2026-08-16

# Google Translate

> Translate text to any language using Google Cloud Translation API.

## Overview

Google Translate tool uses the Google Cloud Translation API v2 to translate arbitrary text into a target language. It supports both OAuth2 and Service Account (API key) authentication. The translate operation returns the translated text and, when the source language was auto-detected, the detected source language code. Inputs are processed per-item; each item must supply the text to translate and the target language code (e.g. "en", "fr", "de", "ja").

**Category:** Utility  
**Tool Name:** `google_translate`  
**Version:** 1

**Appearance:** Icon: `lucide-Languages` | Color: `#4285F4`

## Node Type

**Action** — processes input items and produces output

## Input / Output

| Direction | Port(s) |
|-----------|--------|
| Input | `Input` |
| Output | `Output`, `Error` |

## Credentials

This tool requires **Google Translate OAuth2** or **Google API (Service Account)** credentials — configure the one that matches the Authentication parameter.
See the [Credentials Guide](https://busybot.net/credentials/) for setup instructions.

### Resources

| Resource | Value |
|----------|-------|
| Language | `language` |

### Operations

| Operation | Value | Description |
|-----------|-------|-------------|
| Translate | `translate` | Translate text to a target language |

### Parameters

#### Language: Translate

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Text | `string` | Yes | — | The input text to translate. Supports plain text, and expressions like {{ $json.body }}. |
| Translate To | `string` | Yes | — | The target language code (ISO 639-1). Examples: "en" (English), "fr" (French), "de" (German), "ja" (Japanese), "zh" (Chinese). See https://cloud.google.com/translate/docs/languages for the full list. Supports expressions. |

#### All Operations

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Authentication | `options` | No | `oAuth2` | Authentication method to use. |
| | | | | Options: `oAuth2` (OAuth2 — recommended), `serviceAccount` (Service Account) |
| Google Account | `credential` | No | — | Connect or select your Google account. _(shown when Authentication is `oAuth2`)_ |
| Service Account Email | `string` | Yes | — | The email address of the Google service account. _(shown when Authentication is `serviceAccount`)_ |
| Private Key | `string` | Yes | — | The private key from the service account JSON key file. Entered as a secret. _(shown when Authentication is `serviceAccount`)_ |
| Max Concurrency | `number` | No | `10` | Maximum number of items to process concurrently. |

## Output Data

One output item per input item. The translation is merged into the item JSON at the top level, so the incoming fields stay addressable next to it:

```json
{
  "translatedText": "Bonjour, comment allez-vous ?",
  "detectedSourceLanguage": "en"
}
```

- `translatedText` — the translated string. Always present on a successful call.
- `detectedSourceLanguage` — the ISO 639-1 code Google detected for the input. Present only when Google performed detection, so treat it as optional in downstream expressions.

Binary data on the input item is **not** carried to the output item — put this node after any step that needs the file, or re-fetch the binary downstream.

Reference the result downstream by expression, e.g. `{{ $json.translatedText }}`.

## Usage Examples

- Translate "Hello, world!" to French
- Auto-detect source language and translate to Japanese
- Translate a product description to German
- Translate customer support messages to English

## Example Configuration

Translate a message on the item into French using a connected Google account:

```json
{
  "type": "google_translate",
  "parameters": {
    "authentication": "oAuth2",
    "resource": "language",
    "operation": "translate",
    "text": "{{ $json.message }}",
    "translateTo": "fr"
  }
}
```

Translate with a service account instead of a user account:

```json
{
  "type": "google_translate",
  "parameters": {
    "authentication": "serviceAccount",
    "resource": "language",
    "operation": "translate",
    "text": "{{ $json.description }}",
    "translateTo": "ja",
    "maxConcurrency": 5
  }
}
```

Pick the target language from the item itself:

```json
{
  "type": "google_translate",
  "parameters": {
    "resource": "language",
    "operation": "translate",
    "text": "{{ $json.originalText }}",
    "translateTo": "{{ $json.targetLanguageCode }}",
    "maxConcurrency": 20
  }
}
```

### Error Handling

| Mode | Behavior |
|------|----------|
| **stop** | Halts workflow on first error |
| **continue** | Skips failed items, passes successful ones through |
| **errorPort** | Routes failed items to Error output port |

## Tips

Translate text to any language using Google Cloud Translation API v2.

### Important Notes

- `resource` is always `language` and `operation` is always `translate` — they are the only supported values, and both are set for you by default.
- Language codes follow the ISO 639-1 standard (for example `en`, `fr`, `de`, `ja`, `zh`).
- Both **Text** and **Translate To** accept expressions, so a single node can translate item-specific content into an item-specific language.
- Authentication defaults to OAuth2. Switch to Service Account for server-to-server runs where no user is present to sign in.
- Leaving the source language unstated is the normal case — the API detects it and reports what it found on `detectedSourceLanguage`.