{
  "name": "LINE の問い合わせを Slack で返す（答えが決まるものは AI が即答）",
  "nodes": [
    {
      "id": "2f69db0a-c39d-4c93-ba9a-cf4c9a73ab79",
      "name": "LINEから受信",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        0,
        320
      ],
      "webhookId": "ce71ab30-1f23-4710-a350-93c823e32a87",
      "parameters": {
        "httpMethod": "POST",
        "path": "line-slack",
        "responseMode": "onReceived",
        "options": {
          "rawBody": true
        }
      }
    },
    {
      "id": "6be11e4a-9e82-4817-9c1d-01e36ddc7dda",
      "name": "署名を計算",
      "type": "n8n-nodes-base.crypto",
      "typeVersion": 2,
      "position": [
        220,
        320
      ],
      "parameters": {
        "action": "hmac",
        "binaryData": true,
        "binaryPropertyName": "data",
        "type": "SHA256",
        "encoding": "base64",
        "dataPropertyName": "computedSignature"
      }
    },
    {
      "id": "8aceb084-753e-4a7a-acf3-8f4d733101ac",
      "name": "署名が一致？",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        440,
        320
      ],
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "leftValue": "={{ $json.computedSignature }}",
              "rightValue": "={{ $json.headers['x-line-signature'] }}",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      }
    },
    {
      "id": "f50affdd-0ced-443f-96be-d5da70943b3f",
      "name": "署名が合わないので捨てる",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        660,
        440
      ],
      "parameters": {}
    },
    {
      "id": "1b0695d9-9477-4492-8bed-82d48c5283b9",
      "name": "イベントを1件ずつに",
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        660,
        220
      ],
      "parameters": {
        "fieldToSplitOut": "body.events"
      }
    },
    {
      "id": "73efbeb0-1e94-4bac-bc33-4d06c3a87b06",
      "name": "同じイベントを捨てる",
      "type": "n8n-nodes-base.removeDuplicates",
      "typeVersion": 2,
      "position": [
        880,
        220
      ],
      "parameters": {
        "operation": "removeItemsSeenInPreviousExecutions",
        "logic": "removeItemsWithAlreadySeenKeyValues",
        "dedupeValue": "={{ $json.webhookEventId }}"
      }
    },
    {
      "id": "6ef45a4d-139b-4317-98e9-ecb9f41b795f",
      "name": "問い合わせを整える",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1100,
        220
      ],
      "parameters": {
        "mode": "manual",
        "includeOtherFields": false,
        "assignments": {
          "assignments": [
            {
              "id": "u",
              "name": "userId",
              "value": "={{ $json.source.userId }}",
              "type": "string"
            },
            {
              "id": "r",
              "name": "replyToken",
              "value": "={{ $json.replyToken }}",
              "type": "string"
            },
            {
              "id": "t",
              "name": "messageType",
              "value": "={{ $json.type === 'message' ? $json.message.type : $json.type }}",
              "type": "string"
            },
            {
              "id": "m",
              "name": "messageId",
              "value": "={{ $json.message?.id ?? \"\" }}",
              "type": "string"
            },
            {
              "id": "x",
              "name": "text",
              "value": "={{ $json.message?.text ?? \"\" }}",
              "type": "string"
            },
            {
              "id": "ts",
              "name": "receivedAt",
              "value": "={{ $json.timestamp }}",
              "type": "number"
            }
          ]
        }
      }
    },
    {
      "id": "0a365135-7027-4cc3-a413-156c53c1b895",
      "name": "テキストと画像だけ",
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.3,
      "position": [
        1320,
        220
      ],
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "leftValue": "={{ $json.messageType }}",
              "rightValue": "text",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            },
            {
              "leftValue": "={{ $json.messageType }}",
              "rightValue": "image",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "or"
        },
        "options": {}
      }
    },
    {
      "id": "7c23cc04-74eb-4e5f-b277-5ecea63f9ced",
      "name": "テキストか画像か",
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.4,
      "position": [
        1540,
        220
      ],
      "parameters": {
        "mode": "rules",
        "rules": {
          "values": [
            {
              "outputKey": "text",
              "renameOutput": true,
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "leftValue": "={{ $json.messageType }}",
                    "rightValue": "text",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ]
              }
            },
            {
              "outputKey": "image",
              "renameOutput": true,
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "leftValue": "={{ $json.messageType }}",
                    "rightValue": "image",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ]
              }
            }
          ]
        }
      }
    },
    {
      "id": "debee50f-99fc-4c1c-b263-8933e35ea057",
      "name": "テキストの問い合わせ",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1980,
        120
      ],
      "parameters": {
        "mode": "manual",
        "includeOtherFields": false,
        "assignments": {
          "assignments": [
            {
              "id": "i",
              "name": "inquiry",
              "value": "={{ $(\"問い合わせを整える\").item.json.text }}",
              "type": "string"
            }
          ]
        }
      }
    },
    {
      "id": "47f0df1b-cbe2-4e38-9ec3-17b87676e32e",
      "name": "画像を取得",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.5,
      "position": [
        1760,
        340
      ],
      "parameters": {
        "method": "GET",
        "url": "=https://api-data.line.me/v2/bot/message/{{ $(\"問い合わせを整える\").item.json.messageId }}/content",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file",
              "outputPropertyName": "data"
            }
          }
        }
      }
    },
    {
      "id": "63be6fe5-1e46-4c22-8cbd-aa39badabe0a",
      "name": "写真の内容を読む",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.9,
      "position": [
        1980,
        340
      ],
      "parameters": {
        "promptType": "define",
        "text": "この写真に写っている家具について、種類（ソファ、テーブル、チェア、照明、ラグ、収納 のどれか）、色、素材、大きさの印象を日本語で2〜3文で書いてください。家具が写っていなければ「家具は写っていません」とだけ書いてください。",
        "messages": {
          "messageValues": [
            {
              "type": "HumanMessagePromptTemplate",
              "messageType": "imageBinary",
              "binaryImageDataKey": "data"
            }
          ]
        }
      }
    },
    {
      "id": "522988a1-cf29-4eff-9ea9-4442b4c5f4f6",
      "name": "画像の問い合わせ",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        2200,
        340
      ],
      "parameters": {
        "mode": "manual",
        "includeOtherFields": false,
        "assignments": {
          "assignments": [
            {
              "id": "i",
              "name": "inquiry",
              "value": "=写真が送られてきました。写真の内容: {{ $json.text }}\nこの商品の在庫があるかを知りたいお問い合わせです。",
              "type": "string"
            }
          ]
        }
      }
    },
    {
      "id": "2768298b-56ba-416d-89c2-8d0d47940e52",
      "name": "問い合わせ文",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        2420,
        220
      ],
      "parameters": {}
    },
    {
      "id": "131b00c7-7cad-45ec-8b13-29d2668a465d",
      "name": "Claude Haiku 4.5",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.5,
      "position": [
        2700,
        700
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "claude-haiku-4-5-20251001",
          "cachedResultName": "Claude Haiku 4.5"
        }
      }
    },
    {
      "id": "5143fb54-8e71-4787-815e-35d044904359",
      "name": "答えが決まっているか",
      "type": "@n8n/n8n-nodes-langchain.textClassifier",
      "typeVersion": 1.1,
      "position": [
        2640,
        220
      ],
      "parameters": {
        "inputText": "={{ $json.inquiry }}",
        "categories": {
          "categories": [
            {
              "category": "店舗情報",
              "description": "営業時間、定休日、年末年始の休み、店の場所、駐車場、支払い方法だけを聞いている"
            },
            {
              "category": "商品・在庫",
              "description": "商品の在庫、価格、サイズ、色、取り扱いの有無だけを聞いている。写真の商品があるかの質問も含む"
            },
            {
              "category": "来店の空き",
              "description": "来店できる日時に空きがあるかだけを聞いている"
            },
            {
              "category": "担当者が対応",
              "description": "予約の確定・変更・取り消し、返品、交換、苦情、値引き、配送料や納期、修理、上の3つに当てはまらないもの、2つ以上の用件が混ざっているもの"
            }
          ]
        },
        "options": {
          "fallback": "other",
          "systemPromptTemplate": "Please classify the text provided by the user into one of the following categories: {categories}, and use the provided formatting instructions below. If the text contains two or more different requests, choose 担当者が対応. Don't explain, and only output the json."
        }
      }
    },
    {
      "id": "5c83eb30-eb31-489e-b885-f41508f16ef9",
      "name": "店舗情報で答える",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.9,
      "position": [
        3080,
        0
      ],
      "parameters": {
        "promptType": "define",
        "text": "=お客様からのLINE:\n{{ $(\"問い合わせ文\").item.json.inquiry }}\n\n店の情報:\n店名：インテリアショップ（家具・インテリアの店）\n営業時間：平日 11:00〜19:00、土日祝 10:00〜19:00\n定休日：毎週水曜日（水曜が祝日のときは営業し、翌木曜が休み）\n年末年始の休み：12月31日〜1月3日\n場所：駅の東口から徒歩5分（検証用の架空の店）\n駐車場：3台（無料）。満車のときは近くのコインパーキングをご利用ください\n支払い方法：現金、クレジットカード、交通系IC、QRコード決済\n配送：送料はサイズとお届け先で変わるため、担当者がご案内します\n\n今日は {{ $now.setZone('Asia/Tokyo').toFormat('yyyy-MM-dd') }}（{{ $now.setZone('Asia/Tokyo').setLocale('ja').toFormat('cccc') }}）です。",
        "messages": {
          "messageValues": [
            {
              "type": "SystemMessagePromptTemplate",
              "message": "あなたは家具・インテリアの店のスタッフです。お客様のLINEへの返信を日本語で書いてください。店の情報だけを根拠にしてください。\n\n守ること:\n- 与えられた情報に書かれていることだけを書く。配送、納期、割引、取り置き、入荷の連絡など、情報に無いことは約束しない\n- 情報だけでは答えが決まらないとき、質問が2つ以上の用件を含むときは、文章を書かずに ESCALATE とだけ出力する\n- LINEのトークなので短く書く。宛名と署名は書かない\n- プレーンテキストで書く。** や # などの記号を使わない\n- 「データ」「検索」「システム」「SKU」などの社内の言葉と、商品コードを書かない\n- 電話番号、メールアドレス、URL など、情報に無い連絡先や連絡手段を案内しない\n- 「お問い合わせありがとうございます。」で始める\n\n本文だけを出力してください。"
            }
          ]
        }
      }
    },
    {
      "id": "33294f40-89d7-4cca-994a-b648ecbea055",
      "name": "商品の種類を抽出",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "typeVersion": 1.2,
      "position": [
        3080,
        220
      ],
      "parameters": {
        "text": "={{ $(\"問い合わせ文\").item.json.inquiry }}",
        "schemaType": "fromAttributes",
        "attributes": {
          "attributes": [
            {
              "name": "category",
              "type": "string",
              "required": true,
              "description": "問い合わせの商品の種類。ソファ、テーブル、チェア、照明、ラグ、収納 のいずれか。当てはまらなければ その他"
            }
          ]
        }
      }
    },
    {
      "id": "cef48ee6-4e87-439d-bfde-55e8fac5081a",
      "name": "在庫を検索",
      "type": "n8n-nodes-base.dataTable",
      "typeVersion": 1.1,
      "position": [
        3420,
        220
      ],
      "alwaysOutputData": true,
      "parameters": {
        "resource": "row",
        "operation": "get",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "matchType": "allConditions",
        "filters": {
          "conditions": [
            {
              "keyName": "category",
              "condition": "eq",
              "keyValue": "={{ $json.output.category }}"
            }
          ]
        },
        "returnAll": true
      }
    },
    {
      "id": "ee339cd3-50f5-4a51-a1a8-669885f19e45",
      "name": "検索結果をまとめる",
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        3640,
        220
      ],
      "parameters": {
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": "products"
      }
    },
    {
      "id": "be26d42d-e738-4c72-9ec7-76e37f63c87e",
      "name": "在庫で答える",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "typeVersion": 1.2,
      "position": [
        3860,
        220
      ],
      "parameters": {
        "schemaType": "fromAttributes",
        "text": "=あなたは家具・インテリアの店のスタッフです。お客様のLINEに、在庫の返信を書きます。\n\nお客様からのLINE:\n{{ $(\"問い合わせ文\").item.json.inquiry }}\n\n店にある商品（この種類のもの）:\n{{ $json.products.filter(p => p.sku).length ? JSON.stringify($json.products.filter(p => p.sku).map(p => ({ name: p.name, color: p.color, width_cm: p.width_cm, price: p.price, stock: p.stock, note: p.note }))) : \"なし\" }}\n\n守ること:\n- 与えられた情報に書かれていることだけを書く。配送、納期、割引、取り置き、入荷の連絡など、情報に無いことは約束しない\n- LINEのトークなので短く書く。宛名と署名は書かない\n- プレーンテキストで書く。** や # などの記号を使わない\n- 「データ」「検索」「システム」「SKU」などの社内の言葉と、商品コードを書かない\n- 電話番号、メールアドレス、URL など、情報に無い連絡先や連絡手段を案内しない\n- 「お問い合わせありがとうございます。」で始める\n\n",
        "attributes": {
          "attributes": [
            {
              "name": "found",
              "type": "boolean",
              "required": true,
              "description": "お客様が聞いている商品（写真の商品を含む）と同じ種類・用途の商品が「店にある商品」の中にあれば true。無い、または「なし」なら false"
            },
            {
              "name": "reply",
              "type": "string",
              "required": true,
              "description": "found が true のときだけ、お客様への返信。在庫・価格・サイズは「店にある商品」だけを根拠にし、stock が 0 の商品は在庫切れと伝え、note に入荷予定があれば添える。found が false なら空文字"
            }
          ]
        }
      }
    },
    {
      "id": "74756699-2a23-4d95-8957-af321e5f223c",
      "name": "在庫の回答",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        4080,
        220
      ],
      "parameters": {
        "mode": "manual",
        "includeOtherFields": false,
        "assignments": {
          "assignments": [
            {
              "id": "t",
              "name": "text",
              "value": "={{ $json.output.found === true && String($json.output.reply ?? \"\").trim() !== \"\" ? $json.output.reply : \"ESCALATE\" }}",
              "type": "string"
            }
          ]
        }
      }
    },
    {
      "id": "9f492867-b54f-4b31-8edd-3d32dd6f02c7",
      "name": "来店希望を抽出",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "typeVersion": 1.2,
      "position": [
        3080,
        440
      ],
      "parameters": {
        "text": "=今日は {{ $now.setZone('Asia/Tokyo').toFormat('yyyy-MM-dd') }}（{{ $now.setZone('Asia/Tokyo').setLocale('ja').toFormat('cccc') }}）です。\n\n{{ $(\"問い合わせ文\").item.json.inquiry }}",
        "schemaType": "fromAttributes",
        "attributes": {
          "attributes": [
            {
              "name": "desired_date",
              "type": "string",
              "required": true,
              "description": "来店を希望する日付。YYYY-MM-DD 形式。日付が分からなければ 不明"
            },
            {
              "name": "time_preference",
              "type": "string",
              "description": "希望の時間帯。HH:MM、午前、午後、指定なし のいずれか"
            }
          ]
        }
      }
    },
    {
      "id": "220b66c1-5111-47a2-ae91-c03b09b80b55",
      "name": "空き枠を検索",
      "type": "n8n-nodes-base.dataTable",
      "typeVersion": 1.1,
      "position": [
        3420,
        440
      ],
      "alwaysOutputData": true,
      "parameters": {
        "resource": "row",
        "operation": "get",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "matchType": "allConditions",
        "filters": {
          "conditions": [
            {
              "keyName": "slot_date",
              "condition": "eq",
              "keyValue": "={{ $json.output.desired_date }}"
            }
          ]
        },
        "returnAll": true
      }
    },
    {
      "id": "b93215f7-949c-4c41-be73-1f6ffad0db60",
      "name": "枠をまとめる",
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        3640,
        440
      ],
      "parameters": {
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": "slots"
      }
    },
    {
      "id": "4238fe23-d370-458a-a1cb-7d1ea7958e0c",
      "name": "空きで答える",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.9,
      "position": [
        3860,
        440
      ],
      "parameters": {
        "promptType": "define",
        "text": "=お客様からのLINE:\n{{ $(\"問い合わせ文\").item.json.inquiry }}\n\n希望の日: {{ $(\"来店希望を抽出\").item.json.output.desired_date }}（時間の希望: {{ $(\"来店希望を抽出\").item.json.output.time_preference || \"指定なし\" }}）\n\nその日の空いている時間: {{ $(\"来店希望を抽出\").item.json.output.desired_date === \"不明\" ? \"希望の日が分からない\" : ($json.slots.filter(s => s.slot_time).length === 0 ? \"その日は来店の受付がありません\" : ($json.slots.filter(s => s.slot_time && s.booked < s.capacity).map(s => s.slot_time).join(\"、\") || \"すべて埋まっています\")) }}\n\n店の情報:\n店名：インテリアショップ（家具・インテリアの店）\n営業時間：平日 11:00〜19:00、土日祝 10:00〜19:00\n定休日：毎週水曜日（水曜が祝日のときは営業し、翌木曜が休み）\n年末年始の休み：12月31日〜1月3日\n場所：駅の東口から徒歩5分（検証用の架空の店）\n駐車場：3台（無料）。満車のときは近くのコインパーキングをご利用ください\n支払い方法：現金、クレジットカード、交通系IC、QRコード決済\n配送：送料はサイズとお届け先で変わるため、担当者がご案内します",
        "messages": {
          "messageValues": [
            {
              "type": "SystemMessagePromptTemplate",
              "message": "あなたは家具・インテリアの店のスタッフです。来店の空きについての返信を日本語で書いてください。「その日の空いている時間」だけを根拠にしてください。空きがあれば時間を案内し、「ご希望の時間をこのトークでお知らせください。担当者が予約を確定してご連絡します。」と添えてください。このメッセージでは予約は確定していません。その日に受付がないとき、理由が店の情報（定休日や年末年始の休み）から分かるなら、その理由を添えてください。「希望の日が分からない」ときは ESCALATE とだけ出力してください。\n\n守ること:\n- 与えられた情報に書かれていることだけを書く。配送、納期、割引、取り置き、入荷の連絡など、情報に無いことは約束しない\n- 情報だけでは答えが決まらないとき、質問が2つ以上の用件を含むときは、文章を書かずに ESCALATE とだけ出力する\n- LINEのトークなので短く書く。宛名と署名は書かない\n- プレーンテキストで書く。** や # などの記号を使わない\n- 「データ」「検索」「システム」「SKU」などの社内の言葉と、商品コードを書かない\n- 電話番号、メールアドレス、URL など、情報に無い連絡先や連絡手段を案内しない\n- 「お問い合わせありがとうございます。」で始める\n\n本文だけを出力してください。"
            }
          ]
        }
      }
    },
    {
      "id": "f947dc6b-b9e3-4e23-97de-bac45f610dc1",
      "name": "AIの回答",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        4340,
        220
      ],
      "parameters": {}
    },
    {
      "id": "786de620-2ea7-46f6-b00a-9d585a359c45",
      "name": "AIが答えられた？",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        4560,
        220
      ],
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "leftValue": "={{ ($json.text || \"\").trim() }}",
              "rightValue": "ESCALATE",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              }
            },
            {
              "leftValue": "={{ ($json.text || \"\").trim() }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      }
    },
    {
      "id": "15edc044-e1b9-467b-8ab4-e85e34d4e024",
      "name": "AIの回答を返す",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.5,
      "position": [
        4780,
        120
      ],
      "parameters": {
        "method": "POST",
        "url": "https://api.line.me/v2/bot/message/reply",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "contentType": "json",
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ replyToken: $(\"問い合わせを整える\").item.json.replyToken, messages: [{ type: \"text\", text: $(\"AIの回答\").item.json.text.trim() }] }) }}",
        "options": {}
      },
      "onError": "continueRegularOutput"
    },
    {
      "id": "19ee172c-395f-4522-a72c-b24a18edc14b",
      "name": "受付の返事をする",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.5,
      "position": [
        4780,
        340
      ],
      "parameters": {
        "method": "POST",
        "url": "https://api.line.me/v2/bot/message/reply",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "contentType": "json",
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ replyToken: $(\"問い合わせを整える\").item.json.replyToken, messages: [{ type: \"text\", text: \"お問い合わせありがとうございます。担当者が内容を確認して、このトークで改めてご返信いたします。\" }] }) }}",
        "options": {}
      },
      "onError": "continueRegularOutput"
    },
    {
      "id": "c1b093c3-1e47-441d-84ba-0ecbf0fd2866",
      "name": "AIが答えた記録",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        5000,
        120
      ],
      "parameters": {
        "mode": "manual",
        "includeOtherFields": false,
        "assignments": {
          "assignments": [
            {
              "id": "k",
              "name": "status",
              "value": "ai_answered",
              "type": "string"
            },
            {
              "id": "n",
              "name": "note",
              "value": "={{ \"🤖 AIが回答しました\" + ($json.error ? \"（⚠ LINE への返信に失敗しました。担当者が返信してください）\" : \"\") + \"\\n\" + $(\"AIの回答\").item.json.text.trim() }}",
              "type": "string"
            },
            {
              "id": "b",
              "name": "broadcast",
              "value": "={{ !!$json.error }}",
              "type": "boolean"
            }
          ]
        }
      }
    },
    {
      "id": "4bb70dd7-3263-45b8-91ea-982b5de2470e",
      "name": "担当者に回す記録",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        5000,
        340
      ],
      "parameters": {
        "mode": "manual",
        "includeOtherFields": false,
        "assignments": {
          "assignments": [
            {
              "id": "k",
              "name": "status",
              "value": "needs_reply",
              "type": "string"
            },
            {
              "id": "n",
              "name": "note",
              "value": "={{ \"🙋 担当者の返信が必要です。このスレッドに書くと、お客様の LINE に送られます\" + ($json.error ? \"（⚠ 受付の返事も送れていません）\" : \"（受付の返事だけ送りました）\") }}",
              "type": "string"
            },
            {
              "id": "b",
              "name": "broadcast",
              "value": true,
              "type": "boolean"
            }
          ]
        }
      }
    },
    {
      "id": "03f793b3-e784-4dab-9d9b-4a4e9b540acc",
      "name": "Slackに載せる",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        5220,
        220
      ],
      "parameters": {}
    },
    {
      "id": "70fb673d-3070-4b29-8ec2-4030b764d0ae",
      "name": "スレッドを探す",
      "type": "n8n-nodes-base.dataTable",
      "typeVersion": 1.1,
      "position": [
        5440,
        220
      ],
      "alwaysOutputData": true,
      "parameters": {
        "resource": "row",
        "operation": "get",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "matchType": "allConditions",
        "filters": {
          "conditions": [
            {
              "keyName": "line_user_id",
              "condition": "eq",
              "keyValue": "={{ $(\"問い合わせを整える\").item.json.userId }}"
            }
          ]
        },
        "limit": 1
      }
    },
    {
      "id": "377b4f73-1f9e-42f8-9d5b-5934c1700ffe",
      "name": "スレッドがある？",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        5660,
        220
      ],
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "leftValue": "={{ $json.slack_ts }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      }
    },
    {
      "id": "5d529fd2-a354-43dd-a7cd-7932dcbda5ec",
      "name": "スレッドに書く",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.7,
      "position": [
        5880,
        120
      ],
      "parameters": {
        "resource": "message",
        "operation": "post",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "messageType": "text",
        "text": "={{ \"📩 \" + $(\"問い合わせ文\").item.json.inquiry + \"\\n\\n\" + $(\"Slackに載せる\").item.json.note }}",
        "otherOptions": {
          "includeLinkToWorkflow": false,
          "thread_ts": {
            "replyValues": {
              "thread_ts": "={{ $json.slack_ts }}",
              "reply_broadcast": "={{ $(\"Slackに載せる\").item.json.broadcast }}"
            }
          }
        }
      }
    },
    {
      "id": "9dcf9a84-40e4-436d-8489-3b983b6ee840",
      "name": "スレッドの状態を更新",
      "type": "n8n-nodes-base.dataTable",
      "typeVersion": 1.1,
      "position": [
        6100,
        120
      ],
      "parameters": {
        "resource": "row",
        "operation": "update",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "matchType": "allConditions",
        "filters": {
          "conditions": [
            {
              "keyName": "line_user_id",
              "condition": "eq",
              "keyValue": "={{ $(\"問い合わせを整える\").item.json.userId }}"
            }
          ]
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "status": "={{ $(\"Slackに載せる\").item.json.status }}",
            "last_inquiry": "={{ $(\"問い合わせ文\").item.json.inquiry }}"
          },
          "schema": [
            {
              "id": "status",
              "displayName": "status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "last_inquiry",
              "displayName": "last_inquiry",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ]
        }
      }
    },
    {
      "id": "7de9b475-b246-4fe8-819a-664541baf131",
      "name": "LINEの表示名を取得",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.5,
      "position": [
        5880,
        340
      ],
      "onError": "continueRegularOutput",
      "parameters": {
        "method": "GET",
        "url": "=https://api.line.me/v2/bot/profile/{{ $(\"問い合わせを整える\").item.json.userId }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {}
      }
    },
    {
      "id": "37862812-54a4-40db-9631-d10aa816272e",
      "name": "新しいスレッドを作る",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.7,
      "position": [
        6100,
        340
      ],
      "parameters": {
        "resource": "message",
        "operation": "post",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "messageType": "text",
        "text": "={{ \"LINE のお客様：\" + ($json.displayName || \"（名前を取得できませんでした）\") + \"\\n\" + \"📩 \" + $(\"問い合わせ文\").item.json.inquiry + \"\\n\\n\" + $(\"Slackに載せる\").item.json.note }}",
        "otherOptions": {
          "includeLinkToWorkflow": false
        }
      }
    },
    {
      "id": "64f71ad5-d479-4228-a2fe-fb3148af3e14",
      "name": "スレッドを記録",
      "type": "n8n-nodes-base.dataTable",
      "typeVersion": 1.1,
      "position": [
        6320,
        340
      ],
      "parameters": {
        "resource": "row",
        "operation": "insert",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "line_user_id": "={{ $(\"問い合わせを整える\").item.json.userId }}",
            "slack_ts": "={{ $json.message_timestamp }}",
            "status": "={{ $(\"Slackに載せる\").item.json.status }}",
            "last_inquiry": "={{ $(\"問い合わせ文\").item.json.inquiry }}"
          },
          "schema": [
            {
              "id": "line_user_id",
              "displayName": "line_user_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "slack_ts",
              "displayName": "slack_ts",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "status",
              "displayName": "status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "last_inquiry",
              "displayName": "last_inquiry",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ]
        }
      }
    },
    {
      "id": "14a29068-c35c-48b8-b51c-ca43fee0c8ec",
      "name": "Slackのメッセージ",
      "type": "n8n-nodes-base.slackTrigger",
      "typeVersion": 1,
      "position": [
        0,
        1300
      ],
      "webhookId": "f7efd21f-2f7e-47d0-b102-8c00dc3838a2",
      "parameters": {
        "trigger": [
          "message"
        ],
        "watchWorkspace": false,
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "options": {}
      }
    },
    {
      "id": "7972d0f9-cceb-410c-bbbc-07b4d1195c74",
      "name": "人がスレッドに書いた返信だけ",
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.3,
      "position": [
        220,
        1300
      ],
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "leftValue": "={{ $json.thread_ts }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              }
            },
            {
              "leftValue": "={{ $json.thread_ts }}",
              "rightValue": "={{ $json.ts }}",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              }
            },
            {
              "leftValue": "={{ $json.bot_id ?? \"\" }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              }
            },
            {
              "leftValue": "={{ ($json.text ?? \"\").trim() }}",
              "rightValue": "//",
              "operator": {
                "type": "string",
                "operation": "notStartsWith"
              }
            },
            {
              "leftValue": "={{ [\"\", \"thread_broadcast\"].includes($json.subtype ?? \"\") }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      }
    },
    {
      "id": "c8f0be54-08c9-4bd1-8662-71260cf80ab0",
      "name": "お客様を探す",
      "type": "n8n-nodes-base.dataTable",
      "typeVersion": 1.1,
      "position": [
        440,
        1300
      ],
      "parameters": {
        "resource": "row",
        "operation": "get",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "matchType": "allConditions",
        "filters": {
          "conditions": [
            {
              "keyName": "slack_ts",
              "condition": "eq",
              "keyValue": "={{ $json.thread_ts }}"
            }
          ]
        },
        "limit": 1
      }
    },
    {
      "id": "d0c38f6a-8db3-4003-9d5f-01780b8be16f",
      "name": "LINEに送る",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.5,
      "position": [
        660,
        1300
      ],
      "parameters": {
        "method": "POST",
        "url": "https://api.line.me/v2/bot/message/push",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "contentType": "json",
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ to: $json.line_user_id, messages: [{ type: \"text\", text: $(\"Slackのメッセージ\").item.json.text }] }) }}",
        "options": {}
      },
      "onError": "continueRegularOutput"
    },
    {
      "id": "9935feab-0e54-4409-9d56-46550ae7dc93",
      "name": "送れた？",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        880,
        1300
      ],
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "leftValue": "={{ $json.error ? \"ng\" : \"ok\" }}",
              "rightValue": "ok",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      }
    },
    {
      "id": "88829923-3ebb-4942-a701-8042214fc236",
      "name": "送信済みの印を付ける",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.7,
      "position": [
        1100,
        1200
      ],
      "parameters": {
        "resource": "reaction",
        "operation": "add",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "timestamp": "={{ $(\"Slackのメッセージ\").item.json.ts }}",
        "name": "white_check_mark"
      }
    },
    {
      "id": "6eb71b14-32be-453e-aa58-6c86607aec1f",
      "name": "返信済みにする",
      "type": "n8n-nodes-base.dataTable",
      "typeVersion": 1.1,
      "position": [
        1320,
        1200
      ],
      "parameters": {
        "resource": "row",
        "operation": "update",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "matchType": "allConditions",
        "filters": {
          "conditions": [
            {
              "keyName": "slack_ts",
              "condition": "eq",
              "keyValue": "={{ $(\"Slackのメッセージ\").item.json.thread_ts }}"
            }
          ]
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "status": "replied"
          },
          "schema": [
            {
              "id": "status",
              "displayName": "status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ]
        }
      }
    },
    {
      "id": "9bf7c09e-a172-422e-8478-297ec9855385",
      "name": "送れなかったと書く",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.7,
      "position": [
        1100,
        1400
      ],
      "parameters": {
        "resource": "message",
        "operation": "post",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "messageType": "text",
        "text": "={{ \"⚠ この返信は LINE に送れませんでした：\" + JSON.stringify($json.error?.message ?? $json.error) }}",
        "otherOptions": {
          "includeLinkToWorkflow": false,
          "thread_ts": {
            "replyValues": {
              "thread_ts": "={{ $(\"Slackのメッセージ\").item.json.thread_ts }}"
            }
          }
        }
      }
    },
    {
      "id": "1eb1daf5-261a-4c1b-bfa1-588bc6fe5a95",
      "name": "はじめに",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -520,
        0
      ],
      "parameters": {
        "color": 4,
        "width": 460,
        "height": 760,
        "content": "## 取り込んだら最初にやること\n1. 認証情報を作り、各ノードで選ぶ\n   - **Header Auth**：Name `Authorization`、Value `Bearer ` ＋ LINE のチャネルアクセストークン（LINE に送る・取得するノード全部）\n   - **Crypto**：Secret に LINE のチャネルシークレット（署名を計算）\n   - **Anthropic**（Claude Haiku 4.5）\n   - **Slack API**：Access Token にボットのトークン（`xoxb-`）、Signature Secret に Slack アプリの Signing Secret\n2. Data Table を3つ作り、検索・記録のノードで選ぶ（shop_products / shop_visit_slots / line_slack_threads。列は配布ページを参照）\n3. Slack のノード全部で、投稿先のチャンネルを選ぶ（ボットをそのチャンネルに招待しておく）\n4. 「店舗情報で答える」の店の情報を、自分の店の内容に書き換える。「空きで答える」にも同じ情報が入っています\n5. Publish し、LINE Developers の Webhook URL と、Slack アプリの Event Subscriptions（bot event: message.channels）の Request URL に、それぞれの Production URL を入れる（外から https で届く必要があります）\n\n**AI が答えるのは、答えが手元の情報で決まるものだけです。** それ以外は受付の返事だけ返して Slack に回します。"
      }
    },
    {
      "id": "9f572cdf-98ce-4d32-b724-1d3c31b0e3d1",
      "name": "Slackでの返し方",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -520,
        1000
      ],
      "parameters": {
        "color": 6,
        "width": 460,
        "height": 420,
        "content": "## Slack での返し方\n- お客様ごとに1つのスレッドができます。**スレッドに書いた文は、そのままお客様の LINE に送られます**（push。LINE の月の通数を使います）\n- 送れたら、書き込みに ✅ が付きます。付かなければ送れていません\n- **「//」（半角）で始まる書き込みは送りません。** 担当者どうしの相談はこれで書いてください\n- 「チャンネルにも投稿する」を付けた返信も送られます\n- スレッドの外（チャンネルの本流）に書いたものは送りません"
      }
    }
  ],
  "connections": {
    "LINEから受信": {
      "main": [
        [
          {
            "node": "署名を計算",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "署名を計算": {
      "main": [
        [
          {
            "node": "署名が一致？",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "署名が一致？": {
      "main": [
        [
          {
            "node": "イベントを1件ずつに",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "署名が合わないので捨てる",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "イベントを1件ずつに": {
      "main": [
        [
          {
            "node": "同じイベントを捨てる",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "同じイベントを捨てる": {
      "main": [
        [
          {
            "node": "問い合わせを整える",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "問い合わせを整える": {
      "main": [
        [
          {
            "node": "テキストと画像だけ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "テキストと画像だけ": {
      "main": [
        [
          {
            "node": "テキストか画像か",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "テキストか画像か": {
      "main": [
        [
          {
            "node": "テキストの問い合わせ",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "画像を取得",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "テキストの問い合わせ": {
      "main": [
        [
          {
            "node": "問い合わせ文",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "画像を取得": {
      "main": [
        [
          {
            "node": "写真の内容を読む",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "写真の内容を読む": {
      "main": [
        [
          {
            "node": "画像の問い合わせ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "画像の問い合わせ": {
      "main": [
        [
          {
            "node": "問い合わせ文",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "問い合わせ文": {
      "main": [
        [
          {
            "node": "答えが決まっているか",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "答えが決まっているか": {
      "main": [
        [
          {
            "node": "店舗情報で答える",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "商品の種類を抽出",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "来店希望を抽出",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "受付の返事をする",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "受付の返事をする",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "店舗情報で答える": {
      "main": [
        [
          {
            "node": "AIの回答",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "商品の種類を抽出": {
      "main": [
        [
          {
            "node": "在庫を検索",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "在庫を検索": {
      "main": [
        [
          {
            "node": "検索結果をまとめる",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "検索結果をまとめる": {
      "main": [
        [
          {
            "node": "在庫で答える",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "在庫で答える": {
      "main": [
        [
          {
            "node": "在庫の回答",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "在庫の回答": {
      "main": [
        [
          {
            "node": "AIの回答",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "来店希望を抽出": {
      "main": [
        [
          {
            "node": "空き枠を検索",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "空き枠を検索": {
      "main": [
        [
          {
            "node": "枠をまとめる",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "枠をまとめる": {
      "main": [
        [
          {
            "node": "空きで答える",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "空きで答える": {
      "main": [
        [
          {
            "node": "AIの回答",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AIの回答": {
      "main": [
        [
          {
            "node": "AIが答えられた？",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AIが答えられた？": {
      "main": [
        [
          {
            "node": "AIの回答を返す",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "受付の返事をする",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AIの回答を返す": {
      "main": [
        [
          {
            "node": "AIが答えた記録",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "受付の返事をする": {
      "main": [
        [
          {
            "node": "担当者に回す記録",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AIが答えた記録": {
      "main": [
        [
          {
            "node": "Slackに載せる",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "担当者に回す記録": {
      "main": [
        [
          {
            "node": "Slackに載せる",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slackに載せる": {
      "main": [
        [
          {
            "node": "スレッドを探す",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "スレッドを探す": {
      "main": [
        [
          {
            "node": "スレッドがある？",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "スレッドがある？": {
      "main": [
        [
          {
            "node": "スレッドに書く",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "LINEの表示名を取得",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "スレッドに書く": {
      "main": [
        [
          {
            "node": "スレッドの状態を更新",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LINEの表示名を取得": {
      "main": [
        [
          {
            "node": "新しいスレッドを作る",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "新しいスレッドを作る": {
      "main": [
        [
          {
            "node": "スレッドを記録",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Claude Haiku 4.5": {
      "ai_languageModel": [
        [
          {
            "node": "写真の内容を読む",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "答えが決まっているか",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "店舗情報で答える",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "商品の種類を抽出",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "在庫で答える",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "来店希望を抽出",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "空きで答える",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Slackのメッセージ": {
      "main": [
        [
          {
            "node": "人がスレッドに書いた返信だけ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "人がスレッドに書いた返信だけ": {
      "main": [
        [
          {
            "node": "お客様を探す",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "お客様を探す": {
      "main": [
        [
          {
            "node": "LINEに送る",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LINEに送る": {
      "main": [
        [
          {
            "node": "送れた？",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "送れた？": {
      "main": [
        [
          {
            "node": "送信済みの印を付ける",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "送れなかったと書く",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "送信済みの印を付ける": {
      "main": [
        [
          {
            "node": "返信済みにする",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "timezone": "Asia/Tokyo"
  },
  "pinData": {}
}