Overview
This n8n node integrates with the Tolq translation service to translate text from a source language to a target language. It supports both machine and human translation, allows for automatic language detection, and can operate in either polling or webhook mode to retrieve translation results. This node is useful for automating translation workflows, such as translating user-generated content, localizing product descriptions, or processing multilingual support tickets.
Practical examples:
- Automatically translating incoming customer messages into your team's preferred language.
- Localizing website content by batch-processing text through Tolq.
- Integrating real-time translation into chatbot workflows.
Properties
| Name | Meaning |
|---|---|
| Text | The text to be translated. (Required) |
| Source Language Name or ID | The source language for translation. Choose from a list or specify an ID using an expression. Optionally, select "Detect language" to auto-detect the source language. |
| Target Language Name or ID | The target language for translation. Choose from a list or specify an ID using an expression. |
| Quality | The desired translation quality. Options: Translation (human), Machine (machine translation). |
| Method | How to receive the translation result. Options: Polling (wait and poll until ready), Webhook (Tolq will call back when done). |
| Execution Limit | Maximum time to wait for translation completion (only shown if Method is Polling). Options: 3 Minutes, 1 Hour, 1 Day. |
| Webhook URL | The callback URL for Tolq to notify when the translation is complete (only shown if Method is Webhook). |
Output
- The output is a JSON object containing the translation result(s).
- If the method is polling, the node waits for the translation to finish and returns the translated text in the following structure:
[
{
"translations": {
"<targetLanguageCode>": "<translatedText>"
},
// ...other metadata fields from Tolq's response
}
]
If the method is webhook, the node simply passes through the input data, expecting that another workflow execution will handle the webhook callback.
No binary data is produced by this node.
Dependencies
- External Service: Requires access to the Tolq API.
- API Key: You must configure Tolq API credentials in n8n under the name
tolqApi. - Environment: Ensure your n8n instance is accessible by Tolq if using the webhook method (publicly reachable webhook URL).
Troubleshooting
Common Issues:
- Invalid Credentials: If the Tolq API key is missing or incorrect, authentication errors will occur.
- Timeouts: If the translation takes longer than the selected Execution Limit, the node will throw an "execution expired" error.
- Webhook Not Triggered: If using the webhook method, ensure the provided Webhook URL is correct and publicly accessible.
- Unsupported Languages: If you select a language not supported by Tolq, the request may fail.
Error Messages:
"execution expired": The translation did not complete within the specified Execution Limit. Try increasing the limit or check Tolq's service status.- Other API Errors: Any other errors are likely returned directly from the Tolq API and may indicate issues like invalid parameters or service unavailability.