AI-Powered JIRA Ticket Auto-Assignment with Supabase Vector Search - n8n Workflow

Use this powerful n8n workflow to automatically assign stale JIRA support tickets. It leverages OpenAI and a Supabase vector database to match issues to the best-suited, highest-capacity team member, powered entirely by n8n templates.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

• Project Managers and Support Team Leads struggling with ticket backlog management.
• Engineering teams looking to automate ticket assignment based on prior domain expertise.
• Users seeking advanced n8n templates integrating RAG (Retrieval-Augmented Generation) with SaaS applications.
• Anyone needing a robust n8n automation solution for DevOps and operations management.

Overview

This comprehensive n8n automation template solves the critical problem of 'ticket rot'—where support issues remain unassigned and forgotten for extended periods. By integrating JIRA, Supabase, and OpenAI, this n8n workflow establishes a proactive, intelligent assignment system. The solution involves two parallel n8n automation processes.

First, it continuously builds a knowledge base of recently resolved JIRA issues and their successful assignees in a Supabase vector database. This database provides the historical context required for accurate matching. Second, a separate n8n trigger periodically searches for stale, unassigned tickets (older than five days). When a stale ticket is found, an AI Agent n8n node compares the new ticket against the vector store to find assignees who resolved similar problems previously. Finally, the n8n workflow checks the current workload capacity of those expert candidates before assigning the ticket, ensuring fair distribution and optimal efficiency. This powerful n8n workflow drastically reduces manual overhead in project task management.

How it Works

This advanced n8n workflow operates in two main phases, both initiated by an n8n trigger:


  1. Vector Database Population (Scheduled): A Schedule Trigger n8n node runs daily, fetching recently resolved issues from JIRA using a Jira n8n node. This data is collected, formatted, and chunked. An Embeddings OpenAI n8n node then generates vector representations, which are inserted into the Supabase Vector Store n8n node, keeping the similarity database fresh.

  2. Stale Ticket Detection and Assignment (Scheduled): A second Schedule Trigger n8n node initiates the assignment process by querying JIRA for unassigned issues older than five days.

  3. AI Analysis and Candidate Identification: For each stale issue, an AI Agent n8n node is invoked. This agent uses an OpenAI Chat Model and the Supabase Vector Store (configured as a retrieval tool) to perform a semantic search. The goal is to find similar, resolved issues and list their successful assignees, who are the initial candidates.

  4. Data Structure and Validation: The output from the AI Agent is converted into structured data using the To Structured Output n8n node, and an If n8n node checks if candidates were successfully identified. If not, the n8n workflow skips the issue.

  5. Capacity Check: The n8n workflow iterates through the qualified candidates. A Jira n8n node queries the number of 'In Progress' tickets currently assigned to each user. The results are tallied and summarized.

  6. Assignment: The Sort n8n node identifies the best candidate—the one with the lowest number of open issues (i.e., the most capacity). A Jira n8n node then assigns the stale ticket to this chosen team member and adds an automatic comment, completing this crucial n8n workflow step.

Installation Guide


  1. Import the n8n workflow: Copy the provided JSON and paste it into your n8n instance under the 'Workflows' section using the 'New' -> 'Import from JSON' option.

  2. JIRA Credentials: Update the Jira n8n node credentials. Ensure your account has read permissions for fetching resolved and unassigned issues, and write permissions for updating issue assignees and adding comments. Modify the JQL queries in the Jira n8n node settings (e.g., project = "My Kanban Project") to match your organization's projects.

  3. OpenAI Credentials: Set up the credentials for the OpenAI n8n node nodes used for embedding generation and the Chat Model.

  4. Supabase Vector Store Setup: Configure the Supabase Vector Store n8n node credentials. This requires a self-hosted PostgreSQL database with the pg_vector extension enabled. Ensure the specified table name (documents) is correctly set up as a vector store.

  5. Activation: Once all credentials and project settings are updated, activate both Schedule Trigger n8n trigger nodes to run the dual-purpose n8n workflow.

Node Details

Schedule Trigger (n8n trigger): Initiates both branches of the n8n workflow on a defined schedule, ensuring continuous operation for both database population and stale ticket monitoring.
Jira (n8n node): Used four times: to retrieve resolved issues (for population), to get stale unassigned issues (for assignment), to check assignee capacity, and to assign the ticket and add a comment.
Embeddings OpenAI (n8n node): Generates vector representations of resolved JIRA issue descriptions, crucial for the similarity search function within the n8n workflow.
Issues Similarity Database (Supabase Vector Store n8n node): The key storage component. It inserts new resolved issues and their context, and later serves as the retrieval tool for finding similar issues.
Find Similar Issues + Assignees (AI Agent n8n node): This advanced n8n node orchestrates the Retrieval-Augmented Generation (RAG) process, using the Supabase tool and an OpenAI language model (gpt-4o-mini) to determine assignment candidates based on past expertise.
To Structured Output (n8n node): Ensures the complex text response from the AI Agent is reliably converted into structured JSON data that subsequent n8n node operations can process.
Summarize (n8n node): Used to aggregate and count the 'In Progress' issues tallied for each potential assignee, enabling the capacity assessment part of the overall n8n workflow.
Sort (n8n node): Sorts the candidate assignees by their workload count to select the person with the most capacity.

Related n8n Workflows

Free

Nodes: 18 Nodes
Updated: December 26 2025
View all
Created by
Jimleuk
Jimleuk

Freelance consultant based in the UK specialising in AI-powered automations. I work with select clients tackling their most challenging projects. For business enquiries, send me an email at [email protected] LinkedIn: https://www.linkedin.com/in/jimleuk/ X/Twitter: https://x.com/jimle_uk

Featured*