Translate Block
Translate text to any language
The Translate block converts text between languages using a large language model, preserving meaning, nuance, and formatting. Reach for it whenever you need natural, fluent translation with appropriate cultural adaptation rather than a rule-based engine.
Overview
| Property | Value |
|---|---|
| Type | translate |
| Category | tools |
| Color | #FF4B4B |
When to Use
- Translate user input or AI output into any target language before further processing
- Build multilingual pipelines where content must reach audiences in different languages
- Localize support tickets, emails, or form responses before an agent handles them
- Convert AI-generated replies back into the user's original language
- Handle idioms, cultural references, and technical terminology that rule-based translators miss
- Chain two Translate blocks (translate-in → agent → translate-out) for fully multilingual agent workflows
Configuration
Text to Translate (context)
Required. The source text you want to translate. Accepts a long-form string; connect another block's output with {{blockName.content}}. This is the primary input that the LLM translates.
Translate To (targetLanguage)
Required. The name of the destination language in plain English, for example Spanish, French, Japanese, or Brazilian Portuguese. The value is injected directly into the system prompt that instructs the LLM.
Model (model)
Required. A dropdown populated at runtime from all non-Ollama model providers registered in the platform (OpenAI, Anthropic, Google, Groq, Mistral, xAI, DeepSeek, and others). Select any model key that maps to a supported provider. The block resolves the provider from the model name and routes the request accordingly.
API Key (apiKey)
Required. The API key for the selected model's provider. Enter it as a literal value or reference a workspace secret with {{YOUR_SECRET_NAME}}. This field is treated as a password and is not connection-droppable.
System Prompt (systemPrompt)
Hidden / auto-generated. This field is computed from targetLanguage and is never shown in the UI. It instructs the LLM to preserve meaning, formality, idioms, formatting, and technical terms, and to return only the translated text with no explanations.
Inputs & Outputs
Inputs
| Field | Type | Description |
|---|---|---|
context | string | Text to translate |
targetLanguage | string | Target language (e.g. "Spanish") |
apiKey | string | Provider API key |
systemPrompt | string | Translation instructions (auto-generated from targetLanguage) |
Outputs
| Field | Type | Description |
|---|---|---|
content | string | Translated text |
model | string | Model used for the translation |
tokens | json | Token usage details (prompt, completion, total) |
Tools
The Translate block is an LLM block. It does not use the tool registry. Instead it calls the provider directly via executeProviderRequest. The tools.access list declares which provider chat integrations the block may route through:
- OpenAI Chat (
openai_chat) — Routes to the OpenAI provider (GPT-4o, GPT-4.1, o-series, etc.) - Anthropic Chat (
anthropic_chat) — Routes to the Anthropic provider (Claude Sonnet, Haiku, Opus, etc.) - Google Chat (
google_chat) — Routes to the Google Gemini provider (Gemini 2.0, 2.5, etc.)
The actual provider is resolved at runtime from the selected model name via getBaseModelProviders(). Any non-Ollama provider registered on the platform is eligible; the three ids above represent the primary built-in families.
YAML Example
translate_1:
type: translate
name: "Translate to Spanish"
inputs:
context: "{{agent_1.content}}"
targetLanguage: "Spanish"
apiKey: "{{OPENAI_API_KEY}}"
model: "gpt-5.4-mini"
connections:
outgoing:
- target: response_1