Quick overview
This workflow localizes newly published WordPress posts into multiple languages using Anthropic Claude, validates translations with deterministic HTML/link/number/glossary checks plus a Claude QA review, then requests Slack approval before creating WordPress draft posts and logging results in n8n Data Tables.
How it works
- Runs hourly on a schedule or starts on demand from an n8n form where you provide a WordPress post URL/ID and select target languages.
- Loads localization settings, then reads a glossary and a localization log from n8n Data Tables to decide what to translate and avoid reprocessing.
- Fetches published posts from the WordPress REST API, pairs each post with each target language, and skips items that exceed the maximum content length.
- Sends each (post, language) to Anthropic Claude to generate a translated title, slug, excerpt, and HTML content, and retries once with specific feedback if mechanical checks fail.
- Runs a second Anthropic Claude request to QA the translation against the source for meaning and critical errors, then packages results into a single Slack approval message.
- Waits for Slack approval; if approved it creates one WordPress draft per language (prefixing failures with [REVIEW]), saves outcomes to the localization log, and posts a completion summary to Slack.
Setup
- Add credentials for Anthropic, Slack, and WordPress (using a user/application password that can create posts via the WordPress REST API).
- Create two n8n Data Tables named
localization_glossary (at least: term, language, translation) and localization_log (at least: postId, language, sourceUrl, draftId, draftUrl, qaVerdict, status, localizedAt).
- In the localization config, set your WordPress base URL, target languages (and optional tag IDs), brand voice, lookback/max limits, and the Slack channel ID for approvals and status messages.
- If you use the on-demand form, ensure n8n user authentication is enabled for the form and share the form with the intended reviewers/requesters.