n8nWorkPlanningAI score · PendingAI-assisted edit · no obvious prompt-injection riskn8n.io

Auto-review Jira ticket quality with OpenRouter GPT and coaching comments

Jira trigger → AI quality score → auto-comment on low scores

Some experienceStepsWorkflowPrompt
Who
Team leads or project managers using Jira Cloud
You get
Automatically evaluate new Story/Bug/Task tickets; low-quality ones receive coaching comments
You need
n8n · jira

Constraints

Prerequisites: n8n instance, Jira Software Cloud credentials (email + API token + domain), OpenRouter API credential. Default quality threshold is 7/10; default monitored types are Story, Bug, Task. Default model in workflow.json is openai/gpt-oss-20b:free, though description.md mentions openai/gpt-oss-120b:free; follow the actual imported node configuration.

What they did

Author salimbr published an n8n workflow template that automatically evaluates ticket quality when new Story, Bug, or Task issues are created in Jira Cloud, and adds a coaching comment if quality falls below a threshold.

How it went

The author states the workflow uses a coaching tone by design to help authors improve rather than rejecting their work, making it adoptable in real teams; well-written tickets receive no comment, keeping the backlog clean (author_report).

Worth knowing

Default model in workflow.json is openai/gpt-oss-20b:free, while description.md mentions openai/gpt-oss-120b:free; follow the actual node configuration after import. The 5 scoring criteria can be adjusted to match your team's Definition of Ready. Jira Cloud admin access is needed to configure webhooks. This site has not tested the workflow.

n8n workflow template

Structure checked · Not run-tested

Use “Import from File” in n8n, or copy the JSON and paste it into the editor. Connect your own accounts, then try test data. The template is inactive by default.

Setup and test checklist

Credentials to connect

  • When JIRA Ticket Created node: connect jiraSoftwareCloudApi credentials.
  • Add Comment to JIRA Ticket node: connect jiraSoftwareCloudApi credentials.
  • OpenAI Quality Evaluator node: connect openRouterApi credentials.

Configuration to replace

  • Source template is n8n public workflow #16693 (~13 nodes). Keep inactive after import; verify triggers, expressions and external API endpoints.
  • Sticky-note guidance is informational; replace placeholders with your own accounts, sheet schemas or channel IDs.

Test input and expected output

  • Manually run the main path once in a test workspace and confirm credentialed nodes authenticate without errors.
  • Drive one synthetic/redacted sample through and check output fields and downstream writes before enabling in production.

Template changes

  • Author credential bindings, webhookId and execution data are removed; the workflow is inactive. Nodes, connections and original prompts are preserved. Not run-tested in n8n.
  • No business-logic edits; verify keys, quotas and privacy compliance before use.

Template retrieved: 2026-10-25

Steps

  1. Configure trigger and threshold

    After importing the template into n8n, configure the Jira Trigger node: select Jira Software Cloud credentials, set event filter to issue_created with issuetype in (Story, Bug, Task). Then configure the Set Score Threshold node, setting SCORE_THRESHOLD to your desired cutoff (default 7).

  2. Configure AI quality evaluation

    Connect the OpenAI Quality Evaluator (OpenRouter Chat Model) to the Quality Analysis Agent. In the Quality Analysis Agent, verify the prompts: the user message passes ticket type, title, description, and reporter; the system message defines 5 scoring criteria (title clarity, description completeness, acceptance criteria, reproduction steps/user scenario, scope & dependencies), each scored 1-3, with a specified JSON output structure.

    Execution prompt · Source text。Quality Analysis Agent node Text / User Message field

    =Evaluate this Jira ticket:
    
    <ticket>
    Type: {{ $('When JIRA Ticket Created').first().json.issue.fields.issuetype.name }}
    Title: {{ $('When JIRA Ticket Created').first().json.issue.fields.summary }}
    Description: {{ $('When JIRA Ticket Created').first().json.issue.fields.description ?? "No description provided." }}
    Reporter: {{ $('When JIRA Ticket Created').first().json.issue.fields.reporter.displayName }}
    </ticket>
    
    Return the evaluation JSON.

    Execution prompt · Source text。Quality Analysis Agent node System Message field

    You are a Jira ticket quality reviewer. Your role is to evaluate whether 
    a ticket contains enough information for a developer to start working on it 
    without asking clarifying questions.
    
    Evaluate the ticket on these 5 criteria:
    
    1. **Title clarity** — Is the title specific and action-oriented? (not "Fix bug" or "Update page")
    2. **Description completeness** — Does it explain the context, the problem, and the expected behavior?
    3. **Acceptance criteria** — Are there clear, testable conditions for "done"?
    4. **Reproduction steps** — For bugs: are steps to reproduce present? For stories: is there a user scenario?
    5. **Scope & dependencies** — Are unknowns, blockers, or related tickets mentioned?
    
    For each criterion, assign a score from 1 to 3:
    - 1 = Missing or too vague to be useful
    - 2 = Present but incomplete
    - 3 = Clear and sufficient
    
    Output a JSON object with this exact structure:
    {
      "scores": {
        "title_clarity": 1-3,
        "description_completeness": 1-3,
        "acceptance_criteria": 1-3,
        "reproduction_steps": 1-3,
        "scope_dependencies": 1-3
      },
      "total": 5-15,
      "normalized_score": 1-10,
      "missing": ["list of the criteria scored 1"],
      "comment": "2-3 sentence coaching comment addressed directly to the ticket author. Friendly tone. Name exactly what is missing and why it matters. Do not mention the score."
    }
    
    Return only the JSON object. No preamble, no markdown fences.
  3. Configure score parsing

    In the Parse Normalized Score node (Code node), keep the default JS code: extract JSON from the AI output, strip markdown code block markers, parse as object and return. Throws error if parsing fails.

    Execution prompt · Source text。Parse Normalized Score node JS Code field

    const response = $input.first().json.output ?? $input.first().json.text ?? "";
    
    const cleaned = response
      .replace(/^```json\s*/i, "")
      .replace(/^```\s*/i, "")
      .replace(/\s*```$/i, "")
      .trim();
    
    let scores;
    
    try {
      scores = JSON.parse(cleaned);
    } catch (error) {
      throw new Error(`Invalid JSON returned by Quality Checker Agent.\n${error.message}`);
    }
    
    return scores;
  4. Configure conditional branch

    In the Check Score Threshold node (If node), set the condition: normalized_score < SCORE_THRESHOLD. Ensure the left value comes from Parse Normalized Score output and the right value from Set Score Threshold.

  5. Configure comment action

    In the Add Comment to JIRA Ticket node, configure Jira credentials and verify the comment template includes coaching advice, quality score, and missing items list. If the score meets the threshold, the workflow ends at the No Action Needed node.

    Execution prompt · Source text。Add Comment to JIRA Ticket node Comment field

    ={{ $json.comment }}
    
    **Quality score: {{ $json.normalized_score }}/10**
    Missing: {{ $json.missing.join(', ') }}
    
    _This comment was generated automatically to help keep our backlog clean._

Prompt you can copy

Setup guidance · Editorial suggestion。Give to setup assistant; confirm inputs and permissions first

This block is the prompt. Ads are never placed here.

You are an n8n workflow setup assistant. The user wants to replicate a Jira ticket quality auto-review workflow. Help the user: 1) Confirm they have Jira Cloud and OpenRouter credentials; 2) Import the workflow from template https://n8n.io/workflows/16693/; 3) Check node configurations step by step, especially the Quality Analysis Agent system message and OpenRouter model selection; 4) For testing, create a low-quality Jira ticket first to verify the comment triggers. Note: default model is openai/gpt-oss-20b:free; change if needed.

After importing the template, prioritize checking Jira credential permissions, webhook reachability, and whether the OpenRouter model supports JSON output.

Source

Review Jira ticket quality with OpenRouter GPT and coaching comments · salimbr · n8n.io · 2026-06-29

Comments & feedback

Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.

Loading…

    Related