{
  "id": "momentry-search-credential",
  "name": "Momentry Search (Using Credentials)",
  "nodes": [
    {
      "parameters": {
        "method": "POST",
        "url": "http://localhost:3002/api/v1/n8n/search",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "authentication": "headerAuth",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "query",
              "value": "meeting"
            },
            {
              "name": "limit",
              "value": "3"
            }
          ]
        },
        "options": {
          "timeout": 30000
        }
      },
      "id": "http-request",
      "name": "Call Momentry API",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.1,
      "position": [250, 300]
    },
    {
      "parameters": {
        "jsCode": "const data = $input.first().json;\nconst hits = data.hits || [];\nreturn {\n  json: {\n    query: data.query,\n    count: data.count,\n    results: hits.map(h => ({\n      chunk_id: h.id,\n      video_id: h.vid,\n      text: (h.text || '').substring(0, 100),\n      score: h.score?.toFixed(3),\n      time: h.start_time?.toFixed(2)\n    }))\n  }\n};"
      },
      "id": "code",
      "name": "Format Results",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [500, 300]
    },
    {
      "parameters": {},
      "id": "noop",
      "name": "Done",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [750, 300]
    }
  ],
  "connections": {
    "Call Momentry API": {
      "main": [
        [
          {
            "node": "Format Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Results": {
      "main": [
        [
          {
            "node": "Done",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {},
  "tags": []
}