Translate Document

deepl.translate_document
ActionAI & modelsconnection required

Calls the DeepL API with the connection's credentials.

Upload a document to DeepL and start translating it, returning the document_id and document_key that identify the job.

Connection

Required
Yes — the node will not save without one
Auth type
API key
Providers
DeepL
Secret shape
the DeepL auth key, or {"api_key": "…"}
Resolved by
config.connection_id, else node.connection_id

Configuration

8 fields, 3 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
file_content
The document itself: base64 by default, so an upstream file node's file_content can be wired straight in. Set content_encoding to text to give the document as plain text instead.
stringYes——SGVsbG8sIHdvcmxkLg==
content_encoding
How file_content is encoded. Leave as base64 for a binary document; use text when the content is plain text you typed or built upstream.
stringNobase64one of "base64", "text"—
filename
Name of the document, including the extension. DeepL reads the format from it and supports docx, pptx, xlsx, pdf, htm, html, txt, xlf, xliff and srt.
stringYes——notes.txt
target_lang
Language to translate into, as a DeepL code such as DE, FR, JA, EN-GB, EN-US, PT-BR or ZH-HANS. Run deepl.list_languages with type=target for the current list.
stringYes——DE
source_lang
Language of the input, as a DeepL code such as EN, DE or JA. Leave empty to let DeepL detect it; required when a glossary is used.
stringNo———
formality
Whether the translation leans formal or informal. 'more'/'less' are refused with a 400 for a target language that does not support formality — DeepL documents support for DE, ES, FR, IT, JA, NL, PL, PT-BR, PT-PT, RU. Use 'prefer_more'/'prefer_less' to fall back to the default formality instead of failing, and check supports_formality on deepl.list_languages (type=target) for the current set.
stringNo—one of "default", "more", "less", "prefer_more", "prefer_less"—
glossary_id
Glossary to apply, from deepl.create_glossary or deepl.list_glossaries. Its language pair must match, so source_lang has to be set when a glossary is used.
stringNo———
output_format
Extension of the format to return the translation in. Leave empty to get the same format as the uploaded document.
stringNo—one of "docx", "pptx", "xlsx", "pdf", "html", "txt", "xlf", "srt"—

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "content_encoding": "base64",
  "file_content": "SGVsbG8sIHdvcmxkLg==",
  "filename": "notes.txt",
  "target_lang": "DE"
}

Output

One shape.

result

FieldTypeExample
document_id
Identifier of the document translation job.
string—
document_key
Key required to poll or download the result.
string—
filename
Name the document was uploaded under.
string—
target_lang
Language the document is being translated into.
string—
{
  "document_id": "",
  "document_key": "",
  "filename": "",
  "target_lang": ""
}

Notes

  • This is one status check, not a wait: it returns immediately with the job's current status. Loop it with control.while on `done == false` and a control.delay of a few seconds rather than expecting the node to block a worker until DeepL finishes.

See Translate Document run in a workflow.

In a technical demo we add the DeepL connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.