RAG-Powered Support Agent for Open Jira Issues using Pinecone and OpenAI - n8n Workflow

Deploy an automated n8n workflow to sync open Jira tickets and comments into Pinecone using OpenAI embeddings. Run a RAG-based AI agent to query the data instantly for support and sales teams.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Technical Support Managers needing real-time visibility into unresolved issues.

  • Sales or Account Managers requiring quick summaries of client ticket statuses (RAG agent).

  • Automation specialists seeking advanced n8n templates for custom RAG implementation.

  • Users who need to automate data synchronization between Jira and a vector database like Pinecone.

Overview

This powerful n8n workflow serves a dual purpose: first, it establishes a reliable data pipeline to extract, clean, and vectorize all currently open Jira issues and their associated comments, storing them in a Pinecone index. This automated process ensures the knowledge base is always fresh, running multiple times per day via an n8n trigger. Second, it exposes this vector store to an AI Agent powered by OpenAI via an interactive Chat Trigger. The resulting RAG agent can answer complex questions about specific customer issues, ticket history, and relevant SLA details, making it an advanced solution among available n8n templates for enterprise support.

How it Works

The process is divided into two major, interconnected flows.

Data Loading Flow (Scheduled)


  1. Schedule Trigger: The n8n trigger initiates the data sync on a predefined schedule (e.g., four times daily on weekdays).

  2. Jira Extraction: The workflow iteratively fetches all unresolved Jira tickets using pagination logic, ensuring comprehensive coverage.

  3. Data Enrichment: Key fields (summary, customer, product, status, registration date) are extracted. Simultaneously, an HTTP Request n8n node fetches all associated user comments.

  4. Cleaning and Merging: A Code n8n node filters out irrelevant comments (like single image links or dots) and cleans complex HTML content from issue descriptions and comments, converting everything to clean text. The data is then merged.

  5. Vector Preparation: The Document Data Loader node formats the cleaned text and attaches essential metadata (e.g., issue_key, customer) to the document.

  6. Chunking and Embedding: The Document Chunker splits large texts into smaller, manageable pieces. The Embeddings OpenAI n8n node generates 512-dimension vectors.

  7. Pinecone Storage: The Pinecone Vector Store n8n node inserts these vectors. Critically, it clears the target namespace on the first run, guaranteeing the index only contains currently unresolved issues, maintaining data integrity.

RAG Agent Flow (Chat)


  1. Chat Trigger: A user starts a conversation via the public chat interface, which serves as the entry point for the query part of the n8n workflow.

  2. SLA Context: A Set n8n node injects detailed SLA definitions, providing the AI with the necessary policy context.

  3. AI Agent: The AI Agent n8n node uses a robust system message to guide the OpenAI Chat Model (GPT-4o) to act as a support expert.

  4. RAG Query: The agent uses the 'openIssues' tool, which is connected to the Pinecone Vector Store. This connection allows the agent to semantically search the indexed Jira data.

  5. Final Response: The agent synthesizes the retrieved Jira information and the SLA details to provide a comprehensive, friendly answer, including ticket key, status, and SLA justification.

Installation Guide

To utilize this advanced n8n workflow, follow these steps:


  1. Import: Copy the provided JSON code and import it directly into your n8n instance using the 'New' -> 'Import from JSON' function.

  2. Credentials Setup:

Jira: Configure a Jira API credential for the 'Extract Issues' n8n node (PAT or Basic Auth depending on setup).
OpenAI: Configure an OpenAI API key credential for both the 'Embeddings OpenAI' n8n node (for data loading) and the 'OpenAI Chat Model' (for the agent).
* Pinecone: Configure a Pinecone API credential, ensuring it is linked to the 'Pinecone Vector Store' n8n node and the 'openIssues' retrieval n8n node.

  1. Pinecone Index: Ensure you have an active Pinecone index named openissues configured with 512 dimensions.

  2. Activation: Activate the n8n workflow. The 'Schedule Trigger' will handle the data loading automatically, and the 'Chat Trigger' will generate a public URL for the RAG agent.

Node Details

Schedule Trigger: A powerful n8n trigger set to run multiple times a day (Mon-Fri) to keep the RAG knowledge base fresh.
Extract Issues (HTTP Request): Manages pagination for large sets of Jira issues (25 results per batch) and uses JQL to filter for unresolved tickets.
Extract Relevant Info (Code): A custom Code n8n node used to parse and standardize complex fields (like nested custom fields and date formats) from the Jira API response.
Convert to txt (Code): A necessary step using the Code n8n node to strip HTML and clean up messy text from Jira descriptions and comments before embedding.
Document Chunker (Text Splitter): Ensures large documents are broken down into optimal 512-token chunks, improving RAG performance.
Embeddings OpenAI: The n8n node responsible for transforming text chunks into dense vector representations (512 dimensions) using the OpenAI API.
Pinecone Vector Store: The central n8n node for data storage. It is configured to clear the jira namespace of the openissues index on the first execution of the n8n workflow, ensuring only current data remains.
Chat Trigger: The user-facing n8n trigger that initiates interaction with the RAG agent via a customizable web interface.
AI Agent: The orchestration n8n node that defines the logic, connects the LLM (OpenAI Chat Model), memory (Simple Memory), and the retrieval tool (openIssues Pinecone Vector Store).
openIssues (Pinecone Vector Store - Retrieve-as-Tool): This n8n node is specifically configured to act as a retrieval tool for the AI agent, enabling fast, semantic searches across the indexed Jira tickets.

Related n8n Workflows

Free

Nodes: 17 Nodes
Updated: December 26 2025
View all
Created by
Br1
Br1

Experienced and professional manager with over 20 years of experience in consulting for business process digitalization, driven by a strong passion for organization.

Featured*