The action Translate with AI
Modified on Fri, 15 Aug at 9:36 AM
Purpose
Translate with AI uses a third‑party model (Google Gemini or OpenAI) to translate the content of a document into another language. The action returns a plain text translation that can be used by subsequent actions (save to file, attach to email, send to Teams, etc.).
Required settings — quick steps
- Select the AI model
Choose the provider and specific model from the AI model dropdown (examples: Google‑Gemini, OpenAI). Select a model appropriate for translation quality and cost. - Enter your API key
Paste your API key for the chosen provider in the API key field. You must have an account and API access with the selected AI provider.
Note: Get your Google Gemini API key here >, or your OpenAI key here > - Set the prompt
Enter the instruction prompt the model should use to perform the translation. Make the prompt explicit about target language, tone and any formatting rules. Example: “You are a professional translator. Translate the following document into French. Preserve dates, numbers and code blocks. Return only the translated text.”
Use Insert fields to include dynamic content or metadata in the prompt.
Output
- The action produces the translated text as plain text. That text is then available to later actions in the scenario (Save to disk, Create PDF, Send email, Push to CRM/ERP, etc.).
Supported input formats & prerequisites
- Google Gemini and OpenAI support many document types but may require that the file be readable (text-based). Supported types typically include: .pdf, .docx, .txt, .html, .eml/.msg, .pptx, common image formats (jpg/png/tiff).
Privacy and compliance
- Document content is transmitted to the selected third‑party AI provider for processing. Ensure this data sharing is allowed by your organization’s policies and relevant regulations before enabling the action.
Best practices and tips
- Prompt clarity: state the target language, desired tone (formal/informal), and special instructions (e.g., “keep units and numbers unchanged”, “do not translate proper names”).
- Provide examples: include brief examples in the prompt for domain-specific terminology to improve consistency.
- Handle large documents: for long documents split text into chunks (Extract Text + chunking) and translate sequentially to avoid provider input limits. Reassemble chunks as needed.
- Preserve layout: if you need structural output (paragraphs, headers), include instructions to preserve paragraph breaks or return a specific markup (e.g., HTML) in the prompt.
- Post‑processing: after translation, run additional actions (Create PDF, Insert into template, Save to disk) to format or store results.
- Monitor quotas: watch API usage and quotas to avoid interruptions and unexpected costs.
Error handling and troubleshooting
- Authentication errors: verify the API key and that it has required permissions for the chosen model (in particular for OpenAI).
- Model limits/timeouts: large inputs may time out; pre-process and chunk if necessary.
- Poor translation quality: improve the prompt, choose a different model, or provide domain examples.
Example prompts
- Simple: “Translate the following text into Spanish. Return only the translated text.”
- Detailed: “You are a professional translator. Translate the following document into German. Keep dates, numbers and email addresses unchanged. Preserve paragraph breaks. Use formal tone.”
- With format request: “Translate to French and return output in Markdown with headings preserved.”
Using the translated text
- Once produced, the translated text can be:
- Saved as a .txt file or inserted into a template
- Converted into a PDF
- Sent by email, uploaded to an FTP,...
- Pushed to downstream systems (CRM, CMS, translation memory tools)
That’s all, choose a model, supply your API key, craft a clear translation prompt, and the action returns a text translation ready for downstream processing.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article