{
  "name": "Intent data olu\u015fturma",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -60,
        -20
      ],
      "id": "05d19baf-0712-473b-9de0-2bf636b6b201",
      "name": "When clicking \u2018Test workflow\u2019"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Intent: {{$json.intent}}\n\nYukar\u0131daki intent i\u00e7in 100 farkl\u0131, do\u011fal ve k\u0131sa T\u00fcrk\u00e7e \u00f6rnek c\u00fcmle \u00fcret. C\u00fcmleler havayolu \u015firketine m\u00fc\u015fterilerinin sordu\u011fu sorular veya istekler \u015feklinde olmal\u0131. Format\u0131 \u015fu \u015fekilde olmal\u0131:\n\nIntent: {{$json.intent}}\n- C\u00fcmle 1\n- C\u00fcmle 2\n...\n- C\u00fcmle 100",
        "options": {
          "systemMessage": "Sen profesyonel bir dil modeli asistan\u0131s\u0131n ve g\u00f6revin m\u00fc\u015fteri hizmetleri i\u00e7in T\u00fcrk\u00e7e \u00f6rnek c\u00fcmleler \u00fcretmektir. Yan\u0131t\u0131n\u0131 her zaman \u015fu formatta ver:\nIntent: [intent de\u011feri]\n- C\u00fcmle 1\n- C\u00fcmle 2\n...\n\n\"Intent:\" ba\u015fl\u0131\u011f\u0131 ve tire i\u015faretleri (-) tam olarak bu \u015fekilde olmal\u0131. \u0130lave a\u00e7\u0131klama, yorum veya ba\u015fka metin ekleme. Sadece intent ba\u015fl\u0131\u011f\u0131 ve liste \u00f6\u011felerini i\u00e7eren temiz, sade bir \u00e7\u0131kt\u0131 \u00fcret. \u015eehir isimleri gerekti\u011finde \u015fu listeyi kullan: \u0130stanbul, Ankara, \u0130zmir, Antalya, Bodrum, Paris, Londra, New York, Roma, Berlin, Amsterdam, Frankfurt, Adana, Moskova, Atina, Tokyo."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.9,
      "position": [
        700,
        100
      ],
      "id": "74763e36-30f2-4486-a432-9ef1ccedeecf",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "modelName": "models/gemini-2.0-flash",
        "options": {
          "temperature": 0.9,
          "topP": 1
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        700,
        280
      ],
      "id": "9bc34d4c-f0ea-4972-b9cc-49f2350b33df",
      "name": "Google Gemini Chat Model",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const aiOutput = $input.all();\n\nconsole.log(\"AIAgent \u00c7\u0131kt\u0131s\u0131:\", JSON.stringify(aiOutput, null, 2));\n\nconst result = aiOutput.flatMap(item => {\n  const content = item.json.output;\n  const lines = content.split('\\n').filter(line => line.trim());\n  const intentLine = lines[0];\n  const intent = intentLine.replace(/^Intent: /, '').trim();\n  const c\u00fcmleler = lines.slice(1).map(c\u00fcmle => c\u00fcmle.replace(/^- /, '').trim()).filter(c\u00fcmle => c\u00fcmle);\n\n  // Her c\u00fcmleyi ayr\u0131 bir item olarak d\u00f6n\n  return c\u00fcmleler.map(\u00f6rnek_c\u00fcmle => ({\n    json: {\n      intent,\n      \u00f6rnek_c\u00fcmle\n    }\n  }));\n});\n\nconsole.log(\"Sonu\u00e7:\", JSON.stringify(result, null, 2));\n\nreturn result;\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1080,
        100
      ],
      "id": "ed640fa3-4f4f-43db-b596-67787bd83a4b",
      "name": "Code"
    },
    {
      "parameters": {
        "options": {}
      },
      "name": "ExcelOkuma",
      "type": "n8n-nodes-base.spreadsheetFile",
      "position": [
        280,
        -20
      ],
      "typeVersion": 1,
      "id": "dc90d9c6-5332-4580-8dd7-a70cfd4c115f"
    },
    {
      "parameters": {
        "mode": "combine",
        "fieldsToMatchString": "['\u00f6rnek_c\u00fcmle']",
        "joinMode": "keepNonMatches",
        "outputDataFrom": "input2",
        "options": {}
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.1,
      "position": [
        1280,
        -40
      ],
      "id": "621a340a-e9cd-4f08-b772-876356c86de2",
      "name": "Merge"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.1,
      "position": [
        1460,
        -300
      ],
      "id": "5d6a729c-9cb6-467d-bf2e-e8d00144ca99",
      "name": "Merge1"
    },
    {
      "parameters": {
        "operation": "xlsx",
        "options": {
          "fileName": "intent_veri_seti"
        }
      },
      "type": "n8n-nodes-base.convertToFile",
      "typeVersion": 1.1,
      "position": [
        1680,
        -300
      ],
      "id": "37f087a1-013e-4d69-9e8a-f8b6d8189bf3",
      "name": "Convert to File"
    },
    {
      "parameters": {
        "operation": "download",
        "fileId": {
          "__rl": true,
          "value": "1mvBGoTJiL_3-8nGEZrMnDSJyja-IF9BF",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        120,
        -20
      ],
      "id": "0fee5317-c990-4b7c-a33a-f24e6538e844",
      "name": "Google Drive",
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "folderId": {
          "__rl": true,
          "value": "1lshp54b_gfBZZhDhQgqzgIxRIMGgOVHU",
          "mode": "list",
          "cachedResultName": "Chatbot",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1lshp54b_gfBZZhDhQgqzgIxRIMGgOVHU"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        1900,
        -300
      ],
      "id": "be6875e5-c05e-413b-86af-ab68b525010e",
      "name": "Google Drive1",
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const intents = [...new Set($input.all().map(item => item.json.intent))];\nreturn intents.map(intent => ({ json: { intent } }))[8];\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        520,
        100
      ],
      "id": "306137a4-e6d1-44c9-8223-5294bbbcf5ea",
      "name": "Code1"
    }
  ],
  "connections": {
    "When clicking \u2018Test workflow\u2019": {
      "main": [
        [
          {
            "node": "Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Code": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "ExcelOkuma": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Code1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge1": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "Google Drive1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive": {
      "main": [
        [
          {
            "node": "ExcelOkuma",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code1": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "9f5f4c0e-6b6b-4b3f-8a2d-73c2aa902475",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "55BWj11I3gCQgiit",
  "tags": []
}