New to Kestra?
Use blueprints to kickstart your first workflows.
Webhook-triggered incident triage that embeds your ops playbook with Gemini, retrieves relevant guidance with RAG, and posts AI triage steps to Slack.
Turn raw incident payloads into grounded, actionable triage guidance. This Kestra blueprint receives an incident over a webhook, embeds your operations knowledge base into the built-in Kestra KV vector store, retrieves the most relevant playbook sections with RAG, and asks Google Gemini for triage steps that always include risk, steps, and verification. The proposal is logged for the audit trail and posted to Slack for the on-call engineer. Because the model is grounded in your own playbooks, it answers with your procedures instead of generic advice, and it returns 'N/A' for tickets outside the knowledge base rather than hallucinating.
incident_trigger (io.kestra.plugin.core.trigger.Webhook) accepts a POST from monitoring or ITSM tooling, secured by INCIDENT_WEBHOOK_KEY. A JSON incident input provides a fallback payload so the flow also runs manually.log_incident task (io.kestra.plugin.core.log.Log) records the raw payload.ingest_kb task (io.kestra.plugin.ai.rag.IngestDocument) embeds an inline knowledge base stub with the gemini-embedding-001 model into io.kestra.plugin.ai.embeddings.KestraKVStore, dropping the previous index each run so the store always mirrors the current playbook.enrich_with_rag task (io.kestra.plugin.ai.rag.ChatCompletion) retrieves relevant KB segments and asks gemini-3.5-flash-lite for a concise summary, work notes, and a proposed resolution, constrained by a system message that enforces Risk, Steps, and Verification sections.log_incident_response persists the answer in execution logs and post_to_slack (io.kestra.plugin.slack.notifications.SlackIncomingWebhook) delivers it to the on-call channel.A standalone script calling an LLM has no trigger surface, no retry semantics, and no audit trail. Kestra provides the webhook entry point, versioned declarative YAML for the whole RAG pipeline, per-task logs that show exactly what the model was asked and answered, and secret management for API keys. The IngestDocument and ChatCompletion tasks from the io.kestra.plugin.ai plugin make embedding and retrieval first-class workflow steps, so re-indexing the KB is just another task run you can schedule, observe, and replay.
GEMINI_API_KEY: Google Gemini API key used by both the embedding and chat providers.SLACK_WEBHOOK: Slack incoming webhook URL for triage notifications.INCIDENT_WEBHOOK_KEY: shared secret guarding the Webhook trigger.ingest_kb with your real playbooks, or point fromDocuments at namespace files.incident input simulates an Nginx 502 alert.KestraKVStore for a production vector store such as pgvector, Weaviate, or Elasticsearch via the corresponding io.kestra.plugin.ai.embeddings types.io.kestra.plugin.core.flow.If to page on-call via PagerDuty only when severity is high.Pause approval task and an automated remediation step for low-risk fixes like service restarts.