id: ai-multilingual-markdown-translator
namespace: company.team
description: |
Concurrent multi-language documentation and content localization pipeline. Translates raw
Markdown documents into Spanish, German, and French in parallel using OpenAI GPT-4o, validates
output integrity, and delivers localized publication bundles with Slack notifications.
concurrency:
limit: 1
inputs:
- id: source_markdown
type: STRING
displayName: Source Markdown Content
description: Raw markdown text to translate into multiple languages simultaneously.
defaults: |
# Product Launch: Autonomous Workflow Engine v2.0
We are excited to announce the general availability of our next-generation orchestration platform.
### Key Features
- **Sub-millisecond scheduling latency**: Execute mission-critical pipelines with deterministic precision.
- **Zero-warehouse analytics**: Ingest and curate Parquet files in memory with embedded DuckDB.
- **Declarative AI integrations**: Connect OpenAI, Anthropic, and Gemini models with first-class tasks.
### Getting Started
Deploy our official Docker container or connect your Kubernetes cluster using our Helm chart. Visit our documentation portal for quickstart guides and configuration templates.
- id: model
type: STRING
displayName: OpenAI Model
description: OpenAI LLM identifier used for high-fidelity translation and
technical tone matching.
defaults: "gpt-4o-mini"
- id: slack_channel
type: STRING
displayName: Slack Notification Channel
description: Destination channel for localization publication digests.
defaults: "#localization-updates"
triggers:
- id: daily_localization_schedule
type: io.kestra.plugin.core.trigger.Schedule
description: Daily scheduled batch localization run at 03:00 UTC. Can also run
on-demand.
cron: "0 3 * * *"
tasks:
- id: inspect_source
type: io.kestra.plugin.core.debug.Return
description: Extract document statistics and initialize localization metadata.
format: |
{
"source_length_chars": {{ inputs.source_markdown | length }},
"requested_model": "{{ inputs.model }}",
"timestamp": "{{ execution.startDate }}"
}
- id: parallel_translations
type: io.kestra.plugin.core.flow.Parallel
description: Fan out concurrent translation requests across target languages to
minimize latency.
tasks:
- id: translate_spanish
type: io.kestra.plugin.openai.ChatCompletion
description: Translate markdown source into fluent, technically accurate Spanish.
apiKey: "{{ secret('OPENAI_API_KEY') }}"
model: "{{ inputs.model }}"
messages:
- role: system
content: |
You are an expert technical translator specializing in software documentation.
Translate the user's markdown into Spanish (Español).
Preserve all markdown syntax, headers, code blocks, bullet points, and technical terms intact.
Return ONLY the translated markdown with no conversational preamble or outro.
- role: user
content: "{{ inputs.source_markdown }}"
- id: translate_german
type: io.kestra.plugin.openai.ChatCompletion
description: Translate markdown source into precise, professional German.
apiKey: "{{ secret('OPENAI_API_KEY') }}"
model: "{{ inputs.model }}"
messages:
- role: system
content: |
You are an expert technical translator specializing in software documentation.
Translate the user's markdown into German (Deutsch).
Preserve all markdown syntax, headers, code blocks, bullet points, and technical terms intact.
Return ONLY the translated markdown with no conversational preamble or outro.
- role: user
content: "{{ inputs.source_markdown }}"
- id: translate_french
type: io.kestra.plugin.openai.ChatCompletion
description: Translate markdown source into natural, idiomatic French.
apiKey: "{{ secret('OPENAI_API_KEY') }}"
model: "{{ inputs.model }}"
messages:
- role: system
content: |
You are an expert technical translator specializing in software documentation.
Translate the user's markdown into French (Français).
Preserve all markdown syntax, headers, code blocks, bullet points, and technical terms intact.
Return ONLY the translated markdown with no conversational preamble or outro.
- role: user
content: "{{ inputs.source_markdown }}"
- id: verify_translations
type: io.kestra.plugin.core.flow.If
description: Validate that all concurrent translation tasks generated complete
markdown outputs.
condition: "{{ outputs.translate_spanish.choices[0].message.content != null and
outputs.translate_german.choices[0].message.content != null and
outputs.translate_french.choices[0].message.content != null }}"
then:
- id: bundle_localized_content
type: io.kestra.plugin.core.debug.Return
description: Aggregate all localized versions into a unified multi-language payload.
format: |
{
"languages": ["es", "de", "fr"],
"translations": {
"es": {{ outputs.translate_spanish.choices[0].message.content | json }},
"de": {{ outputs.translate_german.choices[0].message.content | json }},
"fr": {{ outputs.translate_french.choices[0].message.content | json }}
}
}
- id: notify_slack_localization
type: io.kestra.plugin.slack.notifications.SlackIncomingWebhook
description: Dispatch localization completion summary and preview card to Slack.
url: "{{ secret('SLACK_WEBHOOK_URL') }}"
messageText: |
*Multilingual Content Localization Complete*
• *Source Document Size*: `{{ outputs.inspect_source.value.source_length_chars }}` characters
• *Model Used*: `{{ inputs.model }}`
• *Generated Locales*: Spanish (`es`), German (`de`), French (`fr`)
• *Status*: All 3 parallel translations verified and bundled successfully.
else:
- id: log_translation_failure
type: io.kestra.plugin.core.log.Log
description: Alert on missing or empty translation responses.
message: "Localization failure: One or more language translations returned empty
payloads. Check OpenAI API quotas."
- id: export_localization_manifest
type: io.kestra.plugin.core.debug.Return
description: Emit final publication manifest for downstream static site
generator or CMS sync.
format: |
{
"pipeline": "ai-multilingual-markdown-translator",
"processed_at": "{{ execution.startDate }}",
"locales_generated": 3,
"verification_status": "{{ outputs.verify_translations.outputs != null ? 'SUCCESS' : 'FAILED' }}"
}