{
  "name": "05 · Customer Support / Knowledge Base Gap Miner",
  "active": false,
  "nodes": [
    {
      "id": "ee7efcf4-a029-4728-b86a-7970ac2a1a75",
      "name": "📘 Guide",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -640,
        -120
      ],
      "parameters": {
        "content": "## 05 · Customer Support · Knowledge Base Gap Miner\n\n### What this does\nClusters unresolved tickets weekly and proposes new KB articles with outlines.\n\n### Setup checklist\n1. Ticket export API\n2. LLM\n3. Notion/Confluence create page\n\n### How to test locally\nRun schedule or POST `support-kb-gaps`.\n\n### Tips\n- Keep credentials in n8n Credentials (never hardcode secrets).\n- Use **Test URL** on the Webhook while developing.\n- Activate only after credentials + destinations are configured.\n",
        "width": 560,
        "height": 560,
        "color": 2
      }
    },
    {
      "id": "2ce77d77-d8c8-4369-af2d-d50fd56f6994",
      "name": "⚙️ Config",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -640,
        480
      ],
      "parameters": {
        "content": "## Config map\n\n- **Webhook path:** `support-kb-gaps`\n- **Replace** all `https://httpbin.org/...` calls with real integrations.\n- **Credentials:** create in n8n → Credentials, then select on HTTP nodes.\n- **Activate** workflow only after a successful Test execution.\n\n### Local files\nShared host folder is mounted at `/files` inside n8n.",
        "width": 560,
        "height": 320,
        "color": 2
      }
    },
    {
      "id": "1417355f-2147-472c-9c35-4def0984d134",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        0,
        200
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes",
              "minutesInterval": 120
            }
          ]
        }
      }
    },
    {
      "id": "9d0289e7-c25a-496f-b443-39ddbdc504d6",
      "name": "Collect & Rank",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        280,
        200
      ],
      "parameters": {
        "mode": "runOnceForAllItems",
        "language": "javaScript",
        "jsCode": "const items = [\n  { title: 'Signal Alpha', score: 92 },\n  { title: 'Signal Beta', score: 71 },\n  { title: 'Signal Gamma', score: 88 },\n].sort((a,b)=>b.score-a.score);\nreturn [{ json: { workflow: 'Knowledge Base Gap Miner', generatedAt: new Date().toISOString(), top: items, html: '<h1>Knowledge Base Gap Miner</h1><ul>' + items.map(i=>`<li>${i.title} (${i.score})</li>`).join('') + '</ul>' } }];"
      }
    },
    {
      "id": "026e4ba9-7848-4113-88ac-4ff463176a48",
      "name": "Deliver Digest",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        560,
        200
      ],
      "parameters": {
        "method": "POST",
        "url": "https://httpbin.org/post",
        "options": {},
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify($json) }}"
      }
    }
  ],
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Collect & Rank",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Collect & Rank": {
      "main": [
        [
          {
            "node": "Deliver Digest",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "callerPolicy": "workflowsFromSameOwner"
  },
  "tags": [],
  "meta": {
    "templateCredsSetupCompleted": true,
    "description": "Clusters unresolved tickets weekly and proposes new KB articles with outlines."
  },
  "pinData": {}
}