{
  "name": "LINE Follow Handler",
  "nodes": [
    {
      "parameters": {},
      "id": "execute-workflow-trigger",
      "name": "Execute Workflow Trigger",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "typeVersion": 1,
      "position": [
        250,
        300
      ],
      "notes": "\u89aa\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u304b\u3089\u547c\u3073\u51fa\u3055\u308c\u308b\u30c8\u30ea\u30ac\u30fc"
    },
    {
      "parameters": {
        "operation": "read",
        "documentId": {
          "__rl": true,
          "value": "16qhVQNDn_5Y1Ayw_H0ziUw1nu2b70o6IcRn1rr4Pa94",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "Master_User_Config",
          "mode": "name"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "line_user_id",
              "lookupValue": "={{ $('Execute Workflow Trigger').item.json.body.events[0].source.userId }}"
            }
          ]
        },
        "options": {}
      },
      "id": "lookup-existing-user",
      "name": "\u65e2\u5b58\u30e6\u30fc\u30b6\u30fc\u78ba\u8a8d",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.4,
      "position": [
        450,
        300
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "notes": "\u91cd\u8907\u767b\u9332\u9632\u6b62\uff1a\u65e2\u306b\u767b\u9332\u6e08\u307f\u304b\u78ba\u8a8d",
      "alwaysOutputData": true
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "condition-new-user",
              "leftValue": "={{ !$input.first().json.line_user_id }}",
              "rightValue": true,
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {
          "alwaysOutputData": false
        }
      },
      "id": "if-new-user",
      "name": "IF \u65b0\u898f\u30e6\u30fc\u30b6\u30fc",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        650,
        300
      ],
      "notes": "\u65b0\u898f\u30e6\u30fc\u30b6\u30fc\u304b\u65e2\u5b58\u30e6\u30fc\u30b6\u30fc\u304b\u3092\u5224\u5b9a"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "16qhVQNDn_5Y1Ayw_H0ziUw1nu2b70o6IcRn1rr4Pa94",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "Master_User_Config",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "line_user_id": "={{ $('Execute Workflow Trigger').item.json.body.events[0].source.userId }}",
            "customer_name": "\u672a\u8a2d\u5b9a",
            "drive_folder_id": "",
            "sheet_id": "",
            "accounting_soft": "freee",
            "registration_date": "={{ $now.toISO() }}"
          }
        },
        "options": {}
      },
      "id": "add-user-to-sheet",
      "name": "\u65b0\u898f\u30e6\u30fc\u30b6\u30fc\u767b\u9332",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.4,
      "position": [
        850,
        200
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "notes": "Master_User_Config\u306b\u65b0\u898f\u30e6\u30fc\u30b6\u30fc\u3092\u8ffd\u52a0\uff08registration_date\u542b\u3080\uff09"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.line.me/v2/bot/message/reply",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"replyToken\": \"{{ $('Execute Workflow Trigger').item.json.body.events[0].replyToken }}\",\n  \"messages\": [\n    {\n      \"type\": \"text\",\n      \"text\": \"\u2705 \u53cb\u3060\u3061\u8ffd\u52a0\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\uff01\\n\\n\u81ea\u52d5\u767b\u9332\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002\\n\u7ba1\u7406\u8005\u304c\u8a2d\u5b9a\u3092\u5b8c\u4e86\u6b21\u7b2c\u3001\u9818\u53ce\u66f8\u753b\u50cf\u3092\u9001\u4fe1\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\\n\\n\u3057\u3070\u3089\u304f\u304a\u5f85\u3061\u304f\u3060\u3055\u3044\u3002\"\n    }\n  ]\n}",
        "options": {}
      },
      "id": "line-reply-welcome",
      "name": "LINE\u8fd4\u4fe1\uff08\u65b0\u898f\u30e6\u30fc\u30b6\u30fc\uff09",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1050,
        200
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "notes": "\u65b0\u898f\u30e6\u30fc\u30b6\u30fc\u306b\u30a6\u30a7\u30eb\u30ab\u30e0\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u4fe1"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.line.me/v2/bot/message/reply",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"replyToken\": \"{{ $('Execute Workflow Trigger').item.json.body.events[0].replyToken }}\",\n  \"messages\": [\n    {\n      \"type\": \"text\",\n      \"text\": \"\u65e2\u306b\u767b\u9332\u6e08\u307f\u3067\u3059\u3002\\n\\n\u9818\u53ce\u66f8\u753b\u50cf\u3092\u9001\u4fe1\u3057\u3066\u3054\u5229\u7528\u304f\u3060\u3055\u3044\u3002\"\n    }\n  ]\n}",
        "options": {}
      },
      "id": "line-reply-existing",
      "name": "LINE\u8fd4\u4fe1\uff08\u65e2\u5b58\u30e6\u30fc\u30b6\u30fc\uff09",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        850,
        400
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "notes": "\u65e2\u5b58\u30e6\u30fc\u30b6\u30fc\u306b\u767b\u9332\u6e08\u307f\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u4fe1"
    }
  ],
  "connections": {
    "Execute Workflow Trigger": {
      "main": [
        [
          {
            "node": "\u65e2\u5b58\u30e6\u30fc\u30b6\u30fc\u78ba\u8a8d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u65e2\u5b58\u30e6\u30fc\u30b6\u30fc\u78ba\u8a8d": {
      "main": [
        [
          {
            "node": "IF \u65b0\u898f\u30e6\u30fc\u30b6\u30fc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF \u65b0\u898f\u30e6\u30fc\u30b6\u30fc": {
      "main": [
        [
          {
            "node": "\u65b0\u898f\u30e6\u30fc\u30b6\u30fc\u767b\u9332",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "LINE\u8fd4\u4fe1\uff08\u65e2\u5b58\u30e6\u30fc\u30b6\u30fc\uff09",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u65b0\u898f\u30e6\u30fc\u30b6\u30fc\u767b\u9332": {
      "main": [
        [
          {
            "node": "LINE\u8fd4\u4fe1\uff08\u65b0\u898f\u30e6\u30fc\u30b6\u30fc\uff09",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "tags": [
    {
      "name": "LINE Bot",
      "id": "line-bot"
    }
  ],
  "triggerCount": 0,
  "updatedAt": "2026-01-19T00:00:00.000Z",
  "versionId": "1"
}