{
  "name": "PrintOnline AI Quote (webhook → ราคา → ใบเสนอ)",
  "nodes": [
    {
      "parameters": {"httpMethod": "POST", "path": "printonline-quote", "responseMode": "lastNode"},
      "name": "Webhook (รับข้อความลูกค้า)",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [0, 0],
      "webhookId": "printonline-quote"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://printonline.co/api/line-quote",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\"message\": $json.body.message || $json.message}"
      },
      "name": "PrintOnline คิดราคา",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [220, 0]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://printonline.co/api/make-quotation",
        "sendHeaders": true,
        "headerParameters": {"parameters": [
          {"name": "X-Api-Key", "value": "pol_ใส่คีย์ของร้านจากหน้า /account"}]},
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\"job\": \"งานจาก n8n\", \"spec\": {\"mode\": \"rectangle\", \"piece_width\": 8.268, \"piece_height\": 11.693, \"order_qty\": 1000, \"colors\": 4, \"gsm\": 130}}"
      },
      "name": "ออกใบเสนอ QT+JE (ตัวอย่าง — แก้ spec ตามจริง)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [440, 160],
      "disabled": true
    }
  ],
  "connections": {
    "Webhook (รับข้อความลูกค้า)": {"main": [[{"node": "PrintOnline คิดราคา", "type": "main", "index": 0}]]}
  },
  "settings": {},
  "meta": {
    "description": "เดโม่: POST {message:'นามบัตร 1000 ใบ 4 สี 350 แกรม'} มาที่ webhook → ได้ราคาหลายยอด + ลิงก์ใบเสนอกลับไป · เปิด node ที่ 3 (ใส่ X-Api-Key) เพื่อออกเอกสารจริงในนามร้าน · ต่อ LINE/Facebook/email node ต่อท้ายได้ตามถนัด"
  }
}
