{
  "id": "nYXuCXZGkJtkCBVN",
  "name": "Jira Vector - Register Minimal",
  "tags": [],
  "nodes": [
    {
      "id": "ffeeb416-bbec-4b6d-b2fc-76352e182585",
      "name": "Jira Issue List",
      "type": "n8n-nodes-base.jira",
      "position": [
        120,
        140
      ],
      "parameters": {
        "options": {
          "jql": "statusCategory IN (\"Done\") AND updated > -1d"
        },
        "operation": "getAll"
      },
      "typeVersion": 1,
      "alwaysOutputData": false
    },
    {
      "id": "5eb278ff-4b2d-40ac-a13a-99159f877c06",
      "name": "Jira Issue Detail",
      "type": "n8n-nodes-base.jira",
      "position": [
        740,
        360
      ],
      "parameters": {
        "limit": 5,
        "options": {},
        "issueKey": "={{ $json.id }}",
        "resource": "issueComment",
        "operation": "getAll"
      },
      "typeVersion": 1
    },
    {
      "id": "1e6e3731-04cb-4773-b902-08503f7dd483",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        320,
        240
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "a5bbfc71-eedb-4966-b62f-675718db109c",
      "name": "Code1",
      "type": "n8n-nodes-base.code",
      "position": [
        520,
        360
      ],
      "parameters": {
        "jsCode": "return {\n  'id': $input.first().json.id,\n  'summary': $input.first().json.fields.summary,\n  'description': $input.first().json.fields.description,\n}"
      },
      "executeOnce": true,
      "typeVersion": 2
    },
    {
      "id": "5c980f99-aee4-4fbc-9e5d-cbd592e2f36c",
      "name": "Code2",
      "type": "n8n-nodes-base.code",
      "position": [
        940,
        360
      ],
      "parameters": {
        "jsCode": "let comments = '';\nfor (const item of $input.all()) {\n  comments += '## ' + item.json.updated\n  comments += '\\n'\n  comments += item.json.body.content[0].content[0].text\n  comments += '\\n'\n  comments += '\\n'\n}\n\nreturn {\n  'id': $('Code1').first().json.id,\n  'summary': $('Code1').first().json.summary,\n  'description': $('Code1').first().json.description,\n  'comments': comments,\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "48358c4e-9f36-4d07-b85d-35982139b963",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -80,
        140
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "ae49fa6d-5efc-4fbb-9c70-0563d9f6a911",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        100,
        -20
      ],
      "parameters": {
        "color": 4,
        "width": 1060,
        "height": 780,
        "content": "## Step2 : Jira Trigger (Completed Tickets)\nRetrieves the summary, description, and comments of completed Jira tickets.\nThe target tickets are fetched using the Jira Issue Detail node, and the data is formatted in the Code2 node."
      },
      "typeVersion": 1
    },
    {
      "id": "5c6b673f-d9f5-43cf-b881-353806620f6e",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -200,
        -20
      ],
      "parameters": {
        "width": 280,
        "height": 780,
        "content": "## Step1 : Scheduled Trigger\nThe workflow runs at regular intervals according to the schedule set in the Scheduled Trigger node."
      },
      "typeVersion": 1
    },
    {
      "id": "bff28b0a-9ef1-4da6-bc56-9f3927002d4e",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1180,
        -20
      ],
      "parameters": {
        "color": 5,
        "width": 440,
        "height": 780,
        "content": "## Step3 : Register to Pinecone\nConverts the retrieved ticket information into vectors and registers them in Pinecone.  "
      },
      "typeVersion": 1
    },
    {
      "id": "30559523-f51d-4808-a14f-d355ceb0c555",
      "name": "Pinecone Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        1240,
        360
      ],
      "parameters": {
        "mode": "insert",
        "options": {},
        "pineconeIndex": {
          "__rl": true,
          "mode": "id",
          "value": "<Pinecone Index>"
        }
      },
      "notesInFlow": false,
      "typeVersion": 1.3
    },
    {
      "id": "b1ef66ca-649b-49f5-a6b5-bd2ad433e8d3",
      "name": "Embeddings OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        1240,
        600
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "18aca75a-697d-42a5-9d47-63820cfee0ad",
      "name": "Default Data Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        1420,
        600
      ],
      "parameters": {
        "options": {
          "metadata": {
            "metadataValues": [
              {
                "name": "JiraIssueID",
                "value": "={{ $json.id }}"
              },
              {
                "name": "JiraUrl"
              }
            ]
          }
        }
      },
      "typeVersion": 1.1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "485fc0b1-6ff8-49e7-a23f-2c37f059819d",
  "connections": {
    "Code1": {
      "main": [
        [
          {
            "node": "Jira Issue Detail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code2": {
      "main": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Jira Issue List": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Code1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Jira Issue List",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Jira Issue Detail": {
      "main": [
        [
          {
            "node": "Code2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Pinecone Vector Store": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}