Workflow Recipe: Auto-Translate Posts into Any Language
Publish one post — have it automatically translated and saved as a draft in any number of languages. This workflow recipe uses AIWU to trigger on post publication, translate the content with AI, and save language-specific drafts ready for review. No translation plugins or external services needed.
Before You Start
You’ll need:
- Familiar with the workflow builder (First Custom Workflow guide)
- AIWU with API key configured
- Time needed: ~10 minutes per language
- Plan required: Pro
What This Workflow Does
Trigger: Post Published → AI translates content → saves translated draft post.
One trigger can fan out to multiple translation workflows running simultaneously — publish once in English and get Spanish, French, and German drafts created automatically.
Step 1: Create the Workflow
Go to WordPress Admin → AI Copilot → Workflows → Create New Workflow.
Name it: “Auto-Translate to Spanish” (create a separate workflow for each target language).
Step 2: Set the Trigger
| Setting | Value |
|---|---|
| Trigger | Post Published |
| Post Type | Post (or your custom post type) |
| Categories filter | Leave empty for all, or select specific categories to translate |
Step 3: Write the Translation Prompt
Translate the following WordPress post into Spanish (Latin American).Requirements:
- Translate the title and the full content
- Preserve all HTML formatting exactly (headings, bold, links, lists)
- Do not translate URLs, proper nouns, brand names, or code snippets
- Keep the same structure and paragraph breaks
- Use natural, idiomatic Spanish — not literal word-for-word translation
- Return the result in this exact format:
TITLE: [translated title]
CONTENT: [translated HTML content]Original title: {post_title}
Original content: {post_content}
Step 4: Configure the Output Action
In the Output Action section, select Create WordPress Post.
| Setting | Value |
|---|---|
| Post Title | Parse from AI output: TITLE field |
| Post Content | Parse from AI output: CONTENT field |
| Post Status | Draft — always review translations before publishing |
| Post Category | Same as original, or a language-specific category (e.g. “Español”) |
| Language meta (if using WPML/Polylang) | Set language to “es” (Spanish) |
Step 5: Duplicate for Other Languages
Duplicate the workflow (most workflow builders have a clone function) and change:
- Workflow name → “Auto-Translate to French”
- Prompt → change “Spanish (Latin American)” to “French (France)”
- Category → “Français” (if you use language categories)
Repeat for each target language. All workflows share the same trigger — one post publication fires all of them simultaneously.
Verify It’s Working
- Publish a test post
- Go to Posts → Drafts
- You should see translated draft posts appear within 30–60 seconds, one per language workflow
- Open a draft and verify: HTML formatting preserved, URLs intact, content reads naturally in the target language
Common Issues
Problem: “Translated post has broken HTML — tags got translated.”
Fix: Add to the prompt: “Do not translate any HTML tags, attributes, or their values. Only translate visible text content between tags.”
Problem: “TITLE and CONTENT aren’t being parsed correctly into separate fields.”
Fix: Check that your AI output parser is configured to split on the TITLE:/CONTENT: markers. Test the prompt manually first — paste a sample post into the prompt and verify the output format before running in production.
What’s Next
- 🌍 Chatbot in multiple languages: Multi-Language Chatbot guide
- 📋 More workflow recipes: 5 Ready-Made Workflows
- 🔧 Variables used in this workflow: Workflow Variables Reference
Last verified: AIWU v.4.9.2 · Updated: 2026-02-25
