{
  "name": "04 Webhook - OpenAI Summary Skeleton",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "meeting-summary-demo",
        "responseMode": "responseNode",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        220,
        300
      ],
      "id": "79917335-58f7-4dcb-9bb1-b0ba6bde0031",
      "name": "Webhook",
      "webhookId": "meeting-summary-demo"
    },
    {
      "parameters": {
        "keepOnlySet": false,
        "values": {
          "string": [
            {
              "name": "title",
              "value": "={{$json.body.title}}"
            },
            {
              "name": "content",
              "value": "={{$json.body.content}}"
            },
            {
              "name": "prompt",
              "value": "={{'請把以下內容整理成 3 點摘要，使用繁體中文，每點不超過 30 字：\\n' + $json.body.content}}"
            }
          ]
        },
        "options": {}
      },
      "id": "79917335-58f7-4dcb-9bb1-b0ba6bde0032",
      "name": "Build Prompt",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        480,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "const input = $input.first().json;\n\nreturn [\n  {\n    json: {\n      title: input.title,\n      prompt: input.prompt,\n      summary: '這是一個可匯入的 OpenAI skeleton。請把這個 Code node 換成 HTTP Request 或 OpenAI node，並使用 input.prompt 作為模型輸入。',\n      processed_at: new Date().toISOString()\n    }\n  }\n];"
      },
      "id": "79917335-58f7-4dcb-9bb1-b0ba6bde0033",
      "name": "Mock Summary Result",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        760,
        300
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{$json}}",
        "options": {
          "responseCode": 200
        }
      },
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.4,
      "position": [
        1020,
        300
      ],
      "id": "79917335-58f7-4dcb-9bb1-b0ba6bde0034",
      "name": "Respond to Webhook"
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Build Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Prompt": {
      "main": [
        [
          {
            "node": "Mock Summary Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mock Summary Result": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {},
  "meta": {}
}
