Build RAG-powered support agent for Jira issues using Pinecone and OpenAI
Load Jira open issues with comments into Pinecone + RAG Agent (Direct Tool or MCP) Who’s it for This workflow is designed for support teams, data engineers, and AI developers who want to centralize Jira issue data int...
Template notes
Load Jira open issues with comments into Pinecone + RAG Agent (Direct Tool or MCP)
Who’s it for This workflow is designed for support teams, data engineers, and AI developers who want to centralize Jira issue data into a vector database. It collects open issues and their associated comments, converts them into embeddings, and loads them into Pinecone for semantic search, retrieval-augmented generation (RAG), or AI-powered support bots. It’s also published as an MCP tool, so external applications can query the indexed issues directly.
How it works The workflow automates Jira issue extraction, comment processing, and vector storage in Pinecone. Importantly, the Pinecone index is recreated at every run so that it always reflects the current set of unresolved tickets.
1. Trigger – A schedule trigger runs the workflow at defined times (e.g., 8, 11, 14, and 17 on weekdays). 2. Issue extraction with pagination – Calls the Jira REST API to fetch open issues matching a JQL query (unresolved cases created in the last year). - Pagination is fully handled: issues are retrieved in batches of 25, and the workflow continues iterating until all open issues are loaded. 3. Data transformation – Extracts key fields (issue ID, key, summary, description, product, customer, classification, status, registration date). 4. Comments integration – Fetches all comments for each issue, filters out empty/irrelevant ones (images, dots, empty markdown), and merges them with the issue data. 5. Text cleaning – Converts HTML descriptions into clean plain text for processing. 6. Embedding generation – Uses the OpenAI Embeddings node to vectorize text. 7. Vector storage with index recreation – Loads embeddings and metadata into Pinecone under the jira namespace and the openissues index. The namespace is cleared at every run to ensure the index contains only unresolved tickets. 8. Document chunking – Splits long issue texts into smaller chunks (512 tokens, 50 overlap) for better embedding quality. 9. MCP publishing – Exposes the Pinecone index as an MCP tool (openissues), enabling external systems to query Jira issues semantically.
How to set up 1. Jira – Configure a Jira account and generate a token. Update the Jira node with credentials and adjust the JQL query if needed. 2. OpenAI – Set up an OpenAI API key for embeddings. Configure embedding dimensions (default: 512). 3. Pinecone – Create an index (e.g., openissues) with matching dimensions (512). Configure Pinecone API credentials and namespace (jira). - The index will be cleared automatically at every run before reloading unresolved issues. 4. Schedule – Adjust the cron expression in the Schedule Trigger to fit your update frequency. 5. Optional MCP – If you want to query Jira issues via MCP, configure the MCP trigger and tool nodes.
Requirements - Jira account with API access and permissions to read issues and comments. - OpenAI API key with access to the embedding model. - Pinecone account with an index created (dimensions = 512). - n8n instance with credentials set up for Jira, OpenAI, and Pinecone.
How to customize the workflow - JQL query: Modify it to control which issues are extracted (e.g., by project, type, or time window). - Pagination size: Adjust the maxResults parameter (default 25) if you want larger or smaller batches per iteration. - Metadata fields: Add or remove fields in the “Extract Relevant Info” code node. - Chunk size: Adjust chunk size/overlap in the Document Chunker for different embedding strategies. - Embedding model: Switch to a different embedding provider if preferred. - Vector store: Replace Pinecone with another supported vector database if needed. - Downstream use: Extend with notifications, dashboards, or AI assistants that consume the vector data. ---------------
AI Chatbot for Jira open tickets with SLA insights