Schedule icon
Return icon
Parallel icon
ChatCompletion icon
If icon
SlackIncomingWebhook icon
Log icon

Parallel Multilingual Markdown Translation with OpenAI

Automated workflow to translate markdown documents into Spanish, German, and French simultaneously using OpenAI GPT-4o with Slack notifications.

Categories
AIBusiness

Global software companies and open-source projects need their product documentation, changelogs, and release announcements available in multiple languages. Translating documents sequentially is slow, and relying on external translation agencies creates days of release friction.

This blueprint implements an automated, high-speed documentation localization pipeline using OpenAI and Kestra. It takes any raw Markdown document, fans out parallel translation requests across Spanish, German, and French concurrently, enforces output completeness checks, bundles the localized markdown files, and broadcasts a publication summary into Slack.

How it works

  1. Trigger & Inputs: The daily_localization_schedule trigger (io.kestra.plugin.core.trigger.Schedule) fires automatically at 03:00 UTC, or runs on-demand with custom markdown text passed via inputs.source_markdown.
  2. Source Inspection: The inspect_source task (io.kestra.plugin.core.debug.Return) measures source document length and records the execution timestamp.
  3. Parallel Execution Fan-Out: The parallel_translations flowable task (io.kestra.plugin.core.flow.Parallel) dispatches three concurrent translation tasks:
    • translate_spanish (io.kestra.plugin.openai.ChatCompletion): Translates to idiomatic technical Spanish while preserving markdown structure and code blocks.
    • translate_german (io.kestra.plugin.openai.ChatCompletion): Translates to precise technical German.
    • translate_french (io.kestra.plugin.openai.ChatCompletion): Translates to natural technical French.
  4. Quality Verification Gate: The verify_translations flowable task (io.kestra.plugin.core.flow.If) verifies that all three language branches completed successfully with non-null content.
  5. Bundle & Notify: On success, bundle_localized_content packages all three translations into structured JSON, and notify_slack_localization (io.kestra.plugin.slack.notifications.SlackIncomingWebhook) sends a release summary to Slack.
  6. Publish Manifest: The export_localization_manifest task records execution audit details for downstream CMS or Git commit triggers.

What you get

  • 3x faster translation speeds by running language models concurrently in parallel.
  • Preserved markdown formatting, headers, lists, code fences, and links.
  • Zero human bottleneck for multi-language release notes and docs.
  • Automated verification to catch partial or empty API responses.
  • Immediate team visibility in Slack.

Who it's for

  • Developer relations and technical writing teams maintaining multilingual documentation portals.
  • Product marketing teams publishing global release announcements.
  • Open source maintainers localizing READMEs and community guides.

Why orchestrate this with Kestra

Calling LLMs in a loop inside ad-hoc scripts is brittle: timeouts fail the entire run, there is no built-in retry logic, and tasks execute sequentially rather than concurrently. Kestra's io.kestra.plugin.core.flow.Parallel runs all target languages concurrently, isolates task logs per language, and manages secrets cleanly.

Prerequisites

  • A running Kestra instance.
  • An OpenAI API key with access to gpt-4o-mini or gpt-4o.
  • (Optional) A Slack Incoming Webhook URL to receive publication updates.

Secrets

  • OPENAI_API_KEY: API key for OpenAI model completions.
  • SLACK_WEBHOOK_URL: (Optional) Slack Incoming Webhook URL for publication alerts.

Quick start

  1. Add OPENAI_API_KEY (and optionally SLACK_WEBHOOK_URL) to your Kestra namespace secrets.
  2. Import the flow YAML into Kestra.
  3. Click Execute in the UI to run the pipeline with the default product launch announcement.
  4. Inspect the localized Spanish, German, and French translations in the Outputs tab.

How to extend

  • Add additional parallel language branches (e.g. Japanese ja, Portuguese pt, Italian it).
  • Add a io.kestra.plugin.git.Push task inside the then: block to commit the translated .md files directly to your documentation repository.
  • Connect a io.kestra.plugin.core.trigger.Webhook so new GitHub release drafts trigger automated translations automatically.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.