Return icon
IngestDocument icon
KestraKVStore icon
GoogleGemini icon
ChatCompletion icon
Log icon
Request icon
Webhook icon

AI ITOps Triage for Jira Issues with RAG

Webhook-driven Jira triage that embeds your ops playbook, retrieves relevant guidance with RAG, asks Gemini for triage steps, and comments on the issue.

Categories
AI

Close the loop between a new Jira ticket and a first actionable response. This Kestra blueprint listens for Jira issue webhooks, extracts the relevant fields with jq, grounds Google Gemini in your operations playbook through RAG, and posts the AI-proposed triage steps straight back onto the issue as a comment. Engineers open the ticket and find risk assessment, work notes, and a proposed resolution already waiting, written from your own runbooks rather than generic model knowledge.

How it works

  1. The jira_issue trigger (io.kestra.plugin.core.trigger.Webhook) receives the issue-created payload from a Jira automation rule, secured by JIRA_WEBHOOK_KEY.
  2. The log_issue task (io.kestra.plugin.core.debug.Return) uses a jq expression to project the payload down to id, key, summary, description, reporter, and priority.
  3. The ingest_kb task (io.kestra.plugin.ai.rag.IngestDocument) splits the inline playbook stub by paragraph (1024 char segments, 512 overlap) and embeds it with gemini-embedding-001 into io.kestra.plugin.ai.embeddings.KestraKVStore.
  4. The invoke_ai task (io.kestra.plugin.ai.rag.ChatCompletion) retrieves matching playbook segments and asks gemini-3.5-flash-lite for a concise summary, work notes, and a proposed resolution with mandatory Risk, Steps, and Verification sections.
  5. The update_comment task (io.kestra.plugin.core.http.Request) POSTs the answer to the Jira REST API v3 comment endpoint as an Atlassian Document Format body, authenticated with basic auth built from JIRA_EMAIL and JIRA_API_TOKEN.

What you get

  • Every new issue gets a structured first response inside the ticket itself, no context switching.
  • Answers grounded in your provisioning, token rotation, outage, and disk playbooks.
  • Deterministic field extraction from noisy webhook payloads via jq.
  • A full audit trail in Kestra of what the model saw and what it recommended.

Who it's for

  • IT operations teams drowning in repetitive access, token, and outage tickets.
  • SRE teams that want runbook-consistent first responses on every incident ticket.
  • Platform teams piloting AI assistance inside their existing Jira workflow.

Why orchestrate this with Kestra

Jira automation rules can call a webhook, but they cannot run a RAG pipeline, manage embeddings, or keep an auditable record of model inputs and outputs. Kestra turns the whole loop into declarative YAML: the io.kestra.plugin.ai plugin makes document ingestion and retrieval-augmented chat first-class tasks, pluginDefaults keeps the Gemini API key in one place, secrets stay out of the flow definition, and every execution links the incoming payload, retrieved context, and posted comment. Swap the model, the vector store, or the ticketing system without rewriting glue code.

Prerequisites

  • A Jira Cloud site with an automation rule or webhook that fires on issue creation.
  • A Jira API token for a service account allowed to comment on issues.
  • A Google AI Studio API key with access to Gemini chat and embedding models.
  • Update the jira_base_url variable to your Atlassian domain.

Secrets

  • GEMINI_API_KEY: Google Gemini API key for embeddings and chat.
  • JIRA_EMAIL: email of the Jira service account used for basic auth.
  • JIRA_API_TOKEN: Jira API token paired with the email.
  • JIRA_WEBHOOK_KEY: shared secret guarding the Webhook trigger.

Quick start

  1. Add the secrets above to your Kestra namespace and set jira_base_url.
  2. Replace the inline playbook stub in ingest_kb with your real knowledge base.
  3. Create a Jira automation rule: on issue created, send the webhook to the flow URL with the configured key.
  4. Create a test issue such as "cannot log in to Grafana" and watch the triage comment appear.

How to extend

  • Move KB ingestion to a scheduled flow so ticket triage skips re-embedding.
  • Route by priority with io.kestra.plugin.core.flow.If: page on-call for P1, comment only for P3.
  • Use the Jira plugin task io.kestra.plugin.jira.issues.CreateComment in place of the raw HTTP call.
  • Add label or component updates alongside the comment to auto-categorize tickets.
  • Swap KestraKVStore for pgvector or Elasticsearch for larger playbooks.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.