New to Kestra?
Use blueprints to kickstart your first workflows.
Summarize incident reports into a two sentence ops update with Mistral chat completions in Kestra, and post the summary to Slack with failure alerts.
Incident write-ups are long, and the people who need the gist rarely read them. This blueprint sends the raw report to a Mistral model through io.kestra.plugin.mistral.ChatCompletion, asks for exactly two sentences of plain prose, and posts the result to Slack. The system message pins the format, the user message carries the report, and the assistant text comes back as a single string output ready to interpolate.
summarize (io.kestra.plugin.mistral.ChatCompletion) sends two messages to the Mistral API: a SYSTEM message that fixes the output to two sentences of plain prose without quotation marks, and a USER message carrying {{ inputs.incident_text }}. The model name comes from the model_name input, defaulting to mistral-small-latest.{{ outputs.summarize.response }}, with the full API response available as {{ outputs.summarize.raw }} for debugging.notify posts the summary to Slack. Because the system message forbids quotation marks and line breaks, the response interpolates into the JSON payload as a plain scalar; if you relax the prompt, escape the text before placing it in JSON.errors block posts a distinct Slack alert when the API call fails, naming the flow and execution.A one-off script can call the Mistral API, but the summary only matters if it reliably reaches the channel every time. Kestra wraps the call with secret management for the API key, retries and execution history, typed inputs so anyone can run it from the UI with their own report text, and output passing straight into the Slack notification.
MISTRAL_API_KEY: Mistral API bearer token.SLACK_WEBHOOK_URL: Slack incoming webhook URL.incident_text with a real report, or call this flow from your incident tooling.jsonResponseSchema to extract structured fields such as severity and affected service alongside the prose summary.model_name to a larger model for long or messy reports.