New to Kestra?
Use blueprints to kickstart your first workflows.
Rank recent GitHub commits and merged PRs against an alert with Gemini, page Slack, and open an incident issue when critical in Kestra.
When an alert fires, the first question on call is "what changed?". Answering it means jumping between GitHub commit lists, merged pull requests and chat, usually while the incident is already running.
This blueprint answers it automatically:
critical.alert_webhook (io.kestra.plugin.core.trigger.Webhook) receives the alert; service, severity, summary and repository from the JSON body map onto the flow inputs, so the flow also runs from the UI Execute button.gather_changes (io.kestra.plugin.core.flow.Parallel) runs recent_commits (io.kestra.plugin.github.commits.Search) and merged_prs (io.kestra.plugin.github.pulls.Search) at the same time, limited to the last lookback_hours.rank_suspects (io.kestra.plugin.ai.completion.ChatCompletion, Google Gemini) receives the alert, the commits and the merged PRs and returns the ranked shortlist.page_slack (io.kestra.plugin.slack.notifications.SlackIncomingWebhook) posts the alert, the change counts and the suspects.escalate_if_critical (io.kestra.plugin.core.flow.If) runs only when severity is critical: open_incident_issue (io.kestra.plugin.github.issues.Create) opens a GitHub issue labelled incident with the shortlist in the body.The pieces exist separately: monitoring fires a webhook, GitHub has the history, a model can summarise it. Kestra connects them with a webhook trigger, runs the two GitHub searches in parallel, branches on severity, and keeps a record of every alert, every prompt input and every suggestion, which is useful in a post-incident review.
key in the trigger with a long random string before enabling it.GITHUB_TOKEN: GitHub token used for the commit and PR searches and for creating the incident issue.GEMINI_API_KEY: Google Gemini API key used by rank_suspects (model gemini-3.5-flash-lite).SLACK_WEBHOOK: Slack incoming webhook URL used by page_slack.service (STRING, default checkout): service named in the alert.severity (STRING, default critical): critical also opens a GitHub incident issue.summary (STRING, default 5xx > 5%): one-line alert description.repository (STRING, default acme/checkout): owner/repo whose recent changes are searched.lookback_hours (INT, default 6): how far back to look for commits and merged PRs.GITHUB_TOKEN, GEMINI_API_KEY and SLACK_WEBHOOK to your Kestra namespace secrets.repository default (or pass it per alert) and replace the webhook key.curl -X POST "https://kestra.example.com/api/v1/main/executions/webhook/company.sre/alert-change-correlator/<webhook-key>" \
-H "Content-Type: application/json" \
-d '{"service":"checkout","severity":"critical","summary":"5xx > 5%","repository":"acme/checkout"}'
Parallel branch that fetches deployment events or feature flag changes.provider for another Kestra AI provider without touching the rest of the flow.page_slack with a PagerDuty or Opsgenie task for critical alerts.Subflow and call it once per service-to-repository mapping.