New to Kestra?
Use blueprints to kickstart your first workflows.
Use AI to analyze production incidents, determine severity and customer impact, recommend an initial response, and automatically escalate urgent incidents through Slack.
Production incidents often arrive as unstructured alerts, monitoring events, application errors, infrastructure notifications, or customer reports. During an incident, engineers need to quickly understand the severity, scope, customer impact, and appropriate first response.
This Blueprint automates the first stage of incident response by using an AI model to transform an unstructured incident description into structured incident intelligence.
The workflow:
The workflow follows this sequence:
Incident ↓ AI Structured Analysis ↓ Severity + Category + Customer Impact ↓ Confidence + Recommended Action ↓ Conditional Routing ↓ ┌───────────────────────┐ │ P0 Critical / P1 High │ └───────────┬───────────┘ │ Yes ──┴── No ↓ ↓ Slack Alert Routine Investigation ↓ ↓ └────┬────┘ ↓ Final Summary
For each incident, the AI determines:
Widespread or severe production impact requiring immediate response.
Examples include:
Significant production impact requiring urgent engineering attention.
Examples include:
Limited impact that should be investigated during normal operations.
Examples include:
Informational, minor, or low-impact issue that does not require immediate escalation.
P0 and P1 incidents are automatically routed to the urgent-response path.
The urgent path:
P2 and P3 incidents follow the routine investigation path and do not generate an urgent Slack escalation.
A monitoring platform reports that a production API is returning HTTP 500 errors for a large percentage of requests and customers are experiencing failed requests.
The AI can classify the event as a high-severity availability incident, estimate customer impact, provide a confidence level, and recommend an initial engineering response.
A possible structured assessment can look like:
The exact result depends on the incident information provided to the AI model.
This Blueprint can receive incidents from:
The webhook trigger can be connected to external alerting systems that send incident information into Kestra.
The workflow can be extended with:
Before running this Blueprint, make sure you have:
The workflow expects the following Kestra secrets:
OPENAI_API_KEY
Used to authenticate requests to the OpenAI provider.
SLACK_WEBHOOK_URL
Used to send urgent incident notifications to Slack.
Credentials must be configured in the Kestra secret backend. Never place real credentials directly inside the Blueprint YAML.
OPENAI_API_KEY secret.SLACK_WEBHOOK_URL secret if Slack escalation is required.Short title describing the incident.
Example:
Production API returning HTTP 500 errors
Detailed description of the incident including symptoms, scope, affected users, and observed impact.
Name of the application, service, or infrastructure component affected by the incident.
The primary AI analysis is available from:
outputs.analyze_incident.extractedJson
The structured result contains:
severitycategorycustomer_impactconfidencerecommended_actionThe workflow also produces:
outputs.incident_summary
which contains the final incident-triage summary.
Credentials are stored using Kestra secrets and are never hardcoded in the workflow.
The Blueprint uses:
{{ secret('OPENAI_API_KEY') }}{{ secret('SLACK_WEBHOOK_URL') }}No credential values are included in this Blueprint.
Teams can customize this Blueprint by:
The conditional routing remains deterministic after the AI produces the structured incident assessment.
