AutomationFlowsAI & RAG › Build Rag-powered Support Agent for Jira Issues Using Pinecone and Openai

Build Rag-powered Support Agent for Jira Issues Using Pinecone and Openai

ByBr1 @bruno-menegolli on n8n.io

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,…

Cron / scheduled trigger★★★★★ complexityAI-powered30 nodesText Splitter Recursive Character Text SplitterHTTP RequestPinecone Vector StoreOpenAI EmbeddingsMcp TriggerDocument Default Data LoaderAgentOpenAI Chat
AI & RAG Trigger: Cron / scheduled Nodes: 30 Complexity: ★★★★★ AI nodes: yes Added:

This workflow corresponds to n8n.io template #8720 — we link there as the canonical source.

This workflow follows the Agent → Chat Trigger recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "hhg9b3hGgDJN5yu9",
  "name": "Load Jira open issues with comments into Pinecone",
  "tags": [],
  "nodes": [
    {
      "id": "58e0fa98-cdf6-4c2a-85f8-866ccdc9f150",
      "name": "Document Chunker",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "position": [
        3280,
        1040
      ],
      "parameters": {
        "options": {
          "splitCode": "markdown"
        },
        "chunkSize": 512,
        "chunkOverlap": 50
      },
      "typeVersion": 1
    },
    {
      "id": "d03d3708-3160-444c-835c-170e5fc1e14a",
      "name": "Convert to txt",
      "type": "n8n-nodes-base.code",
      "position": [
        2288,
        496
      ],
      "parameters": {
        "jsCode": "return items.map(item => {\n  const html = item.json.html || \"\";\n\n  const text = html\n    .replace(/<\\s*br\\s*\\/?>/gi, \"\\n\")\n    .replace(/<\\/p\\s*>/gi, \"\\n\")\n    .replace(/<[^>]*>/g, \"\")\n    .replace(/&nbsp;/g, \" \")\n    .replace(/&amp;/g, \"&\")\n    .replace(/&lt;/g, \"<\")\n    .replace(/&gt;/g, \">\")\n    .replace(/&quot;/g, \"\\\"\")\n    .replace(/&#39;/g, \"'\")\n    .replace(/(\\r\\n|\\n|\\r|\\\\n|\\\\r|\\\\\\\\n)/g, \"\")  \n    .replace(/\\s+/g, \" \")\n    .replace(/!\\S+?\\.(png|jpe?g|gif|bmp|pdf|docx?|xlsx?|zip|rar)(\\|[^!]*)?!/gi, \"\")\n    .replace(/\\{panel:[^}]*\\}/gi, \"\")\n\n    .trim();\n\n  return {\n    json: {\n      ...item.json,\n      text\n    }\n  };\n});\n\n"
      },
      "typeVersion": 2
    },
    {
      "id": "6c90b512-f3fa-4262-b111-accea4260ae3",
      "name": "Get Comments",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1616,
        848
      ],
      "parameters": {
        "url": "=https://jira.siav.it/rest/api/2/issue/{{ $json.issue_key }}/comment",
        "options": {
          "allowUnauthorizedCerts": true
        },
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBasicAuth"
      },
      "typeVersion": 4
    },
    {
      "id": "6aecfae3-de7e-4fbb-a53f-908da0316351",
      "name": "Create Comment array",
      "type": "n8n-nodes-base.code",
      "position": [
        1808,
        848
      ],
      "parameters": {
        "jsCode": "const issueMap = {};\n\nitems.forEach(item => {\n  const comments = item.json.comments || [];\n\n  comments.forEach(comment => {\n    const url = comment.self || '';\n    const match = url.match(/issue\\/(\\d+)\\//);\n    const issueId = match ? match[1] : 'unknown';\n\n    const body = comment.body?.trim();\n    if (!body) return;\n\n    // Filtri per commenti inutili\n    const onlyImage = /^!?[^\\s]+\\.(png|jpg|jpeg|gif|bmp)\\|?.*!?$/i.test(body);\n    const onlyDot = body === '.';\n    const isEmptyMarkdown = /^(\\*|_|~|`)+$/g.test(body);\n    if (onlyImage || onlyDot || isEmptyMarkdown) return;\n\n    if (!issueMap[issueId]) {\n      issueMap[issueId] = {\n        issue_id: issueId,\n        comments: []\n      };\n    }\n\n    issueMap[issueId].comments.push(body);\n  });\n});\n\n// Output finale\nreturn Object.values(issueMap).map(issue => ({\n  json: {\n    issue_id: issue.issue_id,\n    comments_text: issue.comments.join(';')  \n  }\n}));\n\n"
      },
      "typeVersion": 2
    },
    {
      "id": "bf4f7290-2d34-4665-b80e-5d78db98fb6e",
      "name": "Pinecone Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        2608,
        496
      ],
      "parameters": {
        "mode": "insert",
        "options": {
          "clearNamespace": "={{($runIndex)==0 }}",
          "pineconeNamespace": "jira"
        },
        "pineconeIndex": {
          "__rl": true,
          "mode": "id",
          "value": "openissues"
        }
      },
      "credentials": {
        "pineconeApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2,
      "alwaysOutputData": true
    },
    {
      "id": "fc8455dd-e542-4af0-ab5c-7e5720061a15",
      "name": "Embeddings OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        2736,
        864
      ],
      "parameters": {
        "options": {
          "dimensions": 512
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "ef4089fb-aae4-412d-b5ae-c02dddd31416",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        528,
        464
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 8,11,14,17 * * 1-5"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "1d06729e-6390-4097-bd44-40bc0995e781",
      "name": "Extract Issues",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1136,
        480
      ],
      "parameters": {
        "url": "https://jira.siav.it/rest/api/2/search",
        "options": {
          "response": {
            "response": {}
          },
          "allowUnauthorizedCerts": true
        },
        "sendQuery": true,
        "authentication": "predefinedCredentialType",
        "queryParameters": {
          "parameters": [
            {
              "name": "maxResults",
              "value": "=25"
            },
            {
              "name": "jql",
              "value": "=project = CS AND issuetype = Case AND resolution = Unresolved AND created >= -365d "
            },
            {
              "name": "startAt",
              "value": "={{($runIndex)*25 }}"
            }
          ]
        },
        "nodeCredentialType": "jiraSoftwareServerPatApi"
      },
      "typeVersion": 4
    },
    {
      "id": "a7accfcb-7332-485f-a05e-b79b4470e3af",
      "name": "Extract Relevant Info",
      "type": "n8n-nodes-base.code",
      "position": [
        1392,
        480
      ],
      "parameters": {
        "jsCode": "return items[0].json.issues.map(issue => {\n  const rawDate = issue.fields.customfield_10317?.ongoingCycle?.startTime?.jira ?? null;\n  const formattedDate = rawDate \n    ? new Date(rawDate).toLocaleString(\"it-IT\", {\n        year: \"numeric\",\n        month: \"2-digit\",\n        day: \"2-digit\",\n        hour: \"2-digit\",\n        minute: \"2-digit\",\n        hour12: false\n      }).replace(',', '') \n    : null;\n\n  return {\n    json: {\n      issue_key: issue.key ?? null,\n      issue_id: issue.id ?? null,\n      summary: issue.fields.summary ?? null,\n      issue_description: issue.fields?.description ?? null,\n      product: issue.fields.customfield_10402?.[0].replace(/\\s*\\(.*?\\)\\s*/g, '').trim() ?? null,\n      level: issue.fields.customfield_10408?.[0].replace(/\\s*\\(.*?\\)\\s*/g, '').trim() ?? null,\n      customer: issue.fields.customfield_10409?.[0]?.replace(/\\s*\\(.*?\\)\\s*/g, '').trim() ?? null,\n      status: issue.fields.customfield_10001?.currentStatus?.status ?? null,\n      classification: issue.fields.customfield_10322?.value ?? null,\n      registration: formattedDate\n    }\n  };\n});\n\n\n"
      },
      "typeVersion": 2
    },
    {
      "id": "e0869f53-b22f-4f91-b0dc-c222b297a23b",
      "name": "MCP Server Trigger",
      "type": "@n8n/n8n-nodes-langchain.mcpTrigger",
      "position": [
        3920,
        368
      ],
      "parameters": {
        "path": "jiraticket"
      },
      "typeVersion": 2
    },
    {
      "id": "b632445b-ddbb-4984-a531-c71bd88bcc0d",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3648,
        304
      ],
      "parameters": {
        "color": 6,
        "width": 544,
        "height": 912,
        "content": "## Published also as MCP tool"
      },
      "typeVersion": 1
    },
    {
      "id": "a04cee53-9d8f-49bd-9fbf-ca0f3486f790",
      "name": "openissues",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        3744,
        592
      ],
      "parameters": {
        "mode": "retrieve-as-tool",
        "options": {
          "pineconeNamespace": "jira"
        },
        "pineconeIndex": {
          "__rl": true,
          "mode": "id",
          "value": "openissues"
        },
        "toolDescription": "Recupera informazioni sui ticket aperti per i clienti di Siav.\nUsa sempre il metadato 'cliente' per filtrare i risultati di ricerca. "
      },
      "credentials": {
        "pineconeApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "26c7773f-d86e-4bd7-9b0b-8b549471c70a",
      "name": "openIssues (Data Loader)",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        3072,
        848
      ],
      "parameters": {
        "options": {
          "metadata": {
            "metadataValues": [
              {
                "name": "ticket",
                "value": "={{ $json.issue_key }}"
              },
              {
                "name": "issue_id",
                "value": "={{ $json.issue_id }}"
              },
              {
                "name": "customer",
                "value": "={{ $json.customer }}"
              },
              {
                "name": "product",
                "value": "={{ $json.product }}"
              },
              {
                "name": "classification",
                "value": "={{ $json.classification }}"
              },
              {
                "name": "registrazion",
                "value": "={{ $json.registration }}"
              },
              {
                "name": "state",
                "value": "={{ $json.status }}"
              },
              {
                "name": "applicationmanagementLevel",
                "value": "={{ $json.level }}"
              }
            ]
          }
        },
        "jsonData": "=Customer: {{ $json.customer }}\nSummary: {{ $json.summary }}\nDescription: {{ $json.issue_description }}",
        "jsonMode": "expressionData"
      },
      "typeVersion": 1
    },
    {
      "id": "0f1e9d41-9100-4408-8664-e668c0e6e9e5",
      "name": "All openissues are loaded?",
      "type": "n8n-nodes-base.switch",
      "position": [
        3040,
        496
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "Exit",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "1755b1cf-f0f0-472d-b5d6-c2df6f2236e6",
                    "operator": {
                      "type": "boolean",
                      "operation": "true",
                      "singleValue": true
                    },
                    "leftValue": "={{ ($runIndex+1) * 25 > $('Extract Issues').item.json.total  }}",
                    "rightValue": 100
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "cicle",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "75aed4b9-24a5-487f-bd6c-7a44038073a0",
                    "operator": {
                      "type": "boolean",
                      "operation": "false",
                      "singleValue": true
                    },
                    "leftValue": "={{ ($runIndex+1) * 25 > $('Extract Issues').item.json.total }}",
                    "rightValue": 0
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "executeOnce": true,
      "typeVersion": 3.2
    },
    {
      "id": "8944879b-a29b-4a51-876c-e3abbff7be47",
      "name": "Merge Comments",
      "type": "n8n-nodes-base.merge",
      "position": [
        2096,
        496
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "fieldsToMatchString": "issue_id"
      },
      "typeVersion": 3.1
    },
    {
      "id": "44dde183-38c7-42eb-bce7-eadd4cf8763d",
      "name": "Cycles",
      "type": "n8n-nodes-base.merge",
      "position": [
        912,
        480
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "7bd3bdbd-1458-49c4-9565-759de422a9a0",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        304
      ],
      "parameters": {
        "color": 5,
        "width": 1632,
        "height": 912,
        "content": "## Jira openissues Extraction with merged user Comments \n"
      },
      "typeVersion": 1
    },
    {
      "id": "877d1356-07bf-422f-aa4f-7b2c5ae1efe8",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -528,
        272
      ],
      "parameters": {
        "width": 704,
        "height": 944,
        "content": "## Load Jira open issues with comments into Pinecone\n\nThis workflow extracts unresolved Jira tickets (with pagination), merges user comments, cleans and transforms the text, generates embeddings with OpenAI, and stores them in a Pinecone index. The index is **recreated at every iteration** so that it always reflects the current set of unresolved issues. It also exposes the data as an MCP tool for external semantic queries.\n\n### How it works\n- **Trigger**: Runs on a schedule (8, 11, 14, 17 on weekdays).\n- **Jira issues extraction with pagination**: Fetches open issues in batches of 25 until all are loaded.\n- **Transform fields**: Extracts key info (issue ID, key, summary, description, product, customer, classification, status, registration date).\n- **Merge comments**: Collects all comments, filters out irrelevant ones (images, dots, empty markdown).\n- **Clean text**: Converts HTML content into plain text.\n- **Embedding**: Generates embeddings via OpenAI (dimensions = 512).\n- **Vector storage**: Saves vectors + metadata in Pinecone (`jira` namespace, `openissues` index). The namespace is cleared at every run to ensure only unresolved tickets remain indexed.\n- **Chunking**: Splits long texts into 512-token chunks with 50 overlap.\n- **MCP publishing**: Makes the Pinecone index available as a tool for external querying.\n\n### Setup\n1. Configure Jira credentials and adjust the JQL query as needed.\n2. Provide an OpenAI API key for embeddings.\n3. Create a Pinecone index (`openissues`, 512 dimensions) and set the namespace (`jira`).\n4. Adjust the cron expression for your schedule.\n5. (Optional) Enable the MCP nodes if you want to expose the index as an MCP tool.\n\n### Requirements\n- Jira account with API access.\n- OpenAI API key.\n- Pinecone account with a 512-dimension index.\n- n8n instance with Jira, Pinecone, and OpenAI credentials configured.\n\n### Customize\n- Change the JQL query to refine which tickets are fetched.\n- Modify `maxResults` (default 25) to adjust pagination batch size.\n- Add/remove metadata fields in the \"Extract Relevant Info\" node.\n- Adjust chunk size and overlap in the Document Chunker.\n- Swap embedding/vector store providers if needed.\n- Extend with alerts, dashboards, or AI assistants powered by the indexed data.\n\n\n "
      },
      "typeVersion": 1
    },
    {
      "id": "37b7acfe-108b-4878-977f-04c7056beeeb",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2464,
        304
      ],
      "parameters": {
        "color": 7,
        "width": 1140,
        "height": 920,
        "content": "## Pinecone Vector Store\n\nLoads paged openissues into a Pinecone Index\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "1eaa0ce9-5b57-4de0-8223-d73418b15f7e",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1600,
        1360
      ],
      "parameters": {
        "text": "={{ $json.chatInput }}",
        "options": {
          "systemMessage": "=Today is {{ $now.format('dd/LL/yyyy') }}.\n\nYou are an expert technical support agent responsible for informing the commercial team about the health status of the various systems used by clients.\nConsider terms like issue, problem, ticket, or incident as synonyms.\nThe questions you will receive will mostly aim to understand whether a given client has any open tickets and therefore unresolved issues.\n\nYou will answer questions such as:\n\nAre there any issues from client ACME?\nAre there any open tickets?\nAre there tickets that have been open for a long time?\n\nNB: Always extract ALL tickets you find!\n\nThe tool openIssues allows you to search for this information and filter it using relevant metadata such as client, which identifies the client, and registration, which provides the ticket\u2019s registration date.\nAnother important metadata is severity, which indicates the ticket's urgency with a color code (Red, Yellow, Green, White).\n\nImportant:\n\nAlways report in your response all results obtained with the openIssues tool, which must be used before giving an answer.\nWhen extracting tickets for a client, make sure to retrieve all of them, not partial results.\nUse an informal and collaborative tone in your responses.\n\nIn the response, always provide:\n\nThe issue identifier (issue key)\nIssue description\nCustomer\nProduct details related to the issue\nAssigned severity color (White, Green, Yellow, or Red)\nTicket status\nType of AM contract\nSLA applied to the ticket, based on registration date, service level, and severity. Briefly explain the reason for the applied SLA.\n\nThese are the characteristics of the offered service levels {{ $json.SLA }}\n\n\n\n\n\n"
        },
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "bb5ce05b-8f81-4cfa-9201-b2eb41e34712",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1552,
        1584
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o",
          "cachedResultName": "gpt-4o"
        },
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "d8056459-8ea3-4431-ad22-2a793f0899a2",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1728,
        1584
      ],
      "parameters": {
        "contextWindowLength": 10
      },
      "typeVersion": 1.3
    },
    {
      "id": "73ef8785-da67-4dc8-a206-b89eded48158",
      "name": "SLA",
      "type": "n8n-nodes-base.set",
      "position": [
        1040,
        1360
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "29504428-d42f-410c-8a3d-9f0afe5e9220",
              "name": "SLA",
              "type": "string",
              "value": "Service Levels\n\nBelow are the service levels related to the basic Application Maintenance service (SAMB, SAMA, SAMFS) that Siav commits to respect regarding the resolution of detected and reported anomalies.\n\nService Implementation Timelines\nThe service implementation timelines are defined based on:\n\nStatus of the ticket handling\nSeverity of the problem\nLevel of Application Maintenance subscribed\nTicket Handling Process\n\nIn the process of resolving an anomaly or handling a ticket, four main phases can be identified:\n\nTicket Registration: The ticket received by the support center (phone request) is registered in the Siav information system, which generates a unique identification code.\nSeverity Code Assignment and Ticket Number Communication: The unique identifier assigned to the TDS ticket, along with the correctly assigned severity level, is communicated to the Client.\nTicket Acceptance: The ticket enters this phase when a Siav technician takes it over and starts processing it.\nTicket Closure: When the assigned personnel inform the support service that the requested assistance has been provided to the Client (resolution of the reported issue or fulfillment of the specific request), the ticket is considered closed, and the closure details are communicated to the Client contact indicated at the ticket registration.\nProblem Severity Definition\nThe severity of the problem depends on two factors: Urgency and Impact. Below are the standard criteria for their assignment and the matrix for calculating Severity and the related response times.\n\nUrgency Level\nIndicates how quickly a restoration is needed, considering the Customer's business needs (communicated at ticket opening), and is assigned based on which and how many functionalities are no longer available.\nThe defined levels are:\n\nCritical: All functions are unavailable, with certainty or possibility of data corruption; immediate restoration is required to resume the Client's blocked activities.\nHigh: Most functionalities are unavailable, or the problem concerns important functions that block the Client\u2019s business; rapid restoration is required to meet externally imposed deadlines.\nMedium: The unavailable functionalities are not crucial and do not prevent the Customer from continuing operations; short-term restoration is needed to meet internal deadlines.\nLow: The unavailability is limited to a few or minor functions, whose restoration can occur over a medium/long term period.\n\nImpact\nRefers to the number and type of users affected by the problems or anomalies.\n\n\n...."
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "92b59453-0da6-4c65-8e5c-865c00035037",
      "name": "Chat",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        512,
        1360
      ],
      "parameters": {
        "public": true,
        "options": {
          "title": "\u2692\ufe0f  Ticket Jira ancora aperti  \u2692\ufe0f",
          "subtitle": "=\ud83d\udd51 Refresh automatico ogni giorno alle 8, 11, 14, 17 \ud83d\udd51\n",
          "customCss": ":root {\n  --chat--font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n\n  /* Colori SCURI forzati */\n  --chat--color-primary: #10a37f;\n  --chat--color-primary-shade-50: #0e9272;\n  --chat--color-primary-shade-100: #0d8165;\n  --chat--color-secondary: #40414f;\n  --chat--color-secondary-shade-50: #565869;\n  --chat--color-white: #ffffff;\n  --chat--color-light: #343541;\n  --chat--color-light-shade-50: #2c2c34;\n  --chat--color-light-shade-100: #1e1e24;\n  --chat--color-medium: #444654;\n  --chat--color-dark: #d1d5db;\n  --chat--color-disabled: #6b7280;\n  --chat--color-typing: #999999;\n\n  --chat--message--bot--background: var(--chat--color-secondary);\n  --chat--message--bot--color: var(--chat--color-dark);\n  --chat--message--user--background: var(--chat--color-secondary);\n  --chat--message--user--color: var(--chat--color-white);\n  --chat--message--pre--background: rgba(255, 255, 255, 0.05);\n\n  --chat--input--background: var(--chat--color-medium);\n  --chat--input--text-color: var(--chat--color-white);\n\n  --chat--input--send--button--background: var(--chat--color-medium);\n  --chat--input--send--button--color: var(--chat--color-white);\n\n  --chat--header--background: var(--chat--color-medium);\n  --chat--header--color: var(--chat--color-white);\n\n  --chat--footer--background: var(--chat--color-medium);\n  --chat--footer--color: var(--chat--color-white);\n\n  --chat--toggle--background: var(--chat--color-primary);\n  --chat--toggle--hover--background: var(--chat--color-primary-shade-50);\n  --chat--toggle--active--background: var(--chat--color-primary-shade-100);\n  --chat--toggle--color: var(--chat--color-white);\n}\n\n\n"
        },
        "initialMessages": "Come posso aiutarti oggi? \ud83d\ude0e"
      },
      "typeVersion": 1.1
    },
    {
      "id": "708377d2-9273-4fd7-84f0-969b9b639b4f",
      "name": "openIssues",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        1968,
        1536
      ],
      "parameters": {
        "mode": "retrieve-as-tool",
        "topK": 10,
        "options": {
          "pineconeNamespace": "jira"
        },
        "toolName": "openIssue",
        "pineconeIndex": {
          "__rl": true,
          "mode": "list",
          "value": "openissues",
          "cachedResultName": "openissues"
        },
        "toolDescription": "Retrieve information on open tickets for Siav's clients.\nAlways use the 'client' metadata to filter the search results."
      },
      "credentials": {
        "pineconeApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "352b195e-f3b1-407c-8f62-f62ba27304a4",
      "name": "Embeddings OpenAI1",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        2192,
        1728
      ],
      "parameters": {
        "options": {
          "dimensions": 512
        }
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "82b9c5ee-bfa1-4fba-b09b-7ebb65ed0ac1",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        1264
      ],
      "parameters": {
        "color": 3,
        "width": 1632,
        "height": 736,
        "content": "## RAG Agent \n"
      },
      "typeVersion": 1
    },
    {
      "id": "273d0858-1dcf-44b1-b336-91eba0e03f43",
      "name": "MCP RAG",
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "position": [
        3264,
        1584
      ],
      "parameters": {
        "options": {},
        "endpointUrl": "http://localhost:5678/mcp-test/jiraticket",
        "serverTransport": "httpStreamable"
      },
      "typeVersion": 1.1
    },
    {
      "id": "64e0547e-d42d-4d43-8280-67874159ab88",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2464,
        1264
      ],
      "parameters": {
        "color": 2,
        "width": 1728,
        "height": 736,
        "content": "## You can substitute openissue tool with RAG MCP Tool to use MCP server connection"
      },
      "typeVersion": 1
    },
    {
      "id": "cb098944-ad62-4d79-9679-17df7d4ca7b0",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -528,
        1264
      ],
      "parameters": {
        "width": 704,
        "height": 464,
        "content": "## AI Chatbot for Jira open tickets with SLA insights\n\n**Flow structure**  \n1. **ChatTrigger** \u2192 starts the conversation with the sales/support team.  \n2. **AI Agent (OpenAI)** \u2192 interprets user questions.  \n3. **SLA Node** \u2192 provides SLA rules (Basic / Advanced / Full Service, optional Fast Support).  \n4. **Pinecone Query** \u2192 searches unresolved Jira tickets (`openissues` index, `jira` namespace).  \n5. **Memory** \u2192 keeps short-term context for multi-turn conversations.  \n6. **AI Response** \u2192 returns a human-friendly summary with ticket details + SLA info.  \n\n**Key data stored in Pinecone**  \n- Issue key & description  \n- Customer & product  \n- Severity level (Red / Yellow / Green / White)  \n- Status  \n- Contract level (Basic / Advanced / Full Service)  \n- SLA explanation\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "9ef9acd1-1441-438c-99f1-ba47da462633",
  "connections": {
    "SLA": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Chat": {
      "main": [
        [
          {
            "node": "SLA",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cycles": {
      "main": [
        [
          {
            "node": "Extract Issues",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "openIssues": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "openissues": {
      "ai_tool": [
        [
          {
            "node": "MCP Server Trigger",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Comments": {
      "main": [
        [
          {
            "node": "Create Comment array",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Convert to txt": {
      "main": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Issues": {
      "main": [
        [
          {
            "node": "Extract Relevant Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Comments": {
      "main": [
        [
          {
            "node": "Convert to txt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Document Chunker": {
      "ai_textSplitter": [
        [
          {
            "node": "openIssues (Data Loader)",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Cycles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "ai_embedding",
            "index": 0
          },
          {
            "node": "openissues",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI1": {
      "ai_embedding": [
        [
          {
            "node": "openIssues",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Create Comment array": {
      "main": [
        [
          {
            "node": "Merge Comments",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Extract Relevant Info": {
      "main": [
        [
          {
            "node": "Merge Comments",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Comments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pinecone Vector Store": {
      "main": [
        [
          {
            "node": "All openissues are loaded?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "openIssues (Data Loader)": {
      "ai_document": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "All openissues are loaded?": {
      "main": [
        [],
        [
          {
            "node": "Cycles",
            "type": "main",
            "index": 1
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

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,…

Source: https://n8n.io/workflows/8720/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

WooriFisa. Uses agent, httpRequest, documentDefaultDataLoader, vectorStorePinecone. Scheduled trigger; 86 nodes.

Agent, HTTP Request, Document Default Data Loader +14
AI & RAG

This workflow automates patient communication for medical clinics using the WhatsApp Business API. It supports appointment booking, rescheduling, service inquiries, follow-ups, and document submission

Google Sheets, Data Table, Data Table Tool +12
AI & RAG

WooriFisa 최종. Uses memoryMongoDbChat, agent, httpRequest, documentDefaultDataLoader. Scheduled trigger; 68 nodes.

Memory Mongo Db Chat, Agent, HTTP Request +14
AI & RAG

This template is a complete, hands-on tutorial for building a RAG (Retrieval-Augmented Generation) pipeline. In simple terms, you'll teach an AI to become an expert on a specific topic—in this case, t

Memory Buffer Window, Supabase Vector Store, Document Default Data Loader +8
AI & RAG

Ditch the endless scroll for AI trends. Meet Archi, your personal AI research assistant that hits you up once a week with everyone you need to know. 🧑🏽‍🔬

Weaviate Vector Store, Document Default Data Loader, HTTP Request +8