New to Kestra?
Use blueprints to kickstart your first workflows.
Download an article over HTTP and turn it into a concise, SEO-ready summary with the OpenAI ChatCompletion plugin, orchestrated end to end in Kestra.
Turn long-form content into concise, search-friendly summaries automatically. This blueprint downloads an article from any public URL, sends its contents to an OpenAI chat model, and produces a short SEO-optimized summary you can drop into meta descriptions, social previews, or content indexes. It removes the manual copy, paste, and prompt loop that slows down content and marketing teams, and makes summary generation a repeatable, versioned pipeline.
fetch_article uses io.kestra.plugin.core.http.Download to retrieve the article from the article_url input and stores the response in Kestra internal storage.generate_seo_summary uses io.kestra.plugin.openai.ChatCompletion with the gpt-4o-mini model to summarize the downloaded file. The prompt reads the file with {{ read(outputs.fetch_article.uri) }} and is capped at maxTokens: 500 for a roughly 200 word result.log_output uses io.kestra.plugin.core.log.Log to print the summary, extracting the model text with {{ outputs.generate_seo_summary.choices | jq('.[].message.content') | first }}.The OpenAI API has no scheduler, retry policy, or run history of its own. Kestra adds event and schedule triggers, automatic retries on transient HTTP or API failures, full execution lineage from download to summary, and declarative YAML you can version in Git. Inputs make the flow reusable across any article URL, and outputs flow cleanly between tasks without glue code.
io.kestra.plugin.openai and core plugins are bundled).gpt-4o-mini.This sample hardcodes a placeholder apiKey for demonstration. In any real deployment, replace it with {{ secret('OPENAI_API_KEY') }} and store the value in your Kestra secret backend. Never commit a live key.
apiKey on generate_seo_summary to {{ secret('OPENAI_API_KEY') }} and configure that secret.article_url or supplying your own.log_output task logs.gpt-4o-mini for another OpenAI model, or tune maxTokens and the prompt for length and tone.Schedule trigger to summarize newly published articles automatically.log_output with a write to a database, object store, or a Slack notification.