AutomationFlowsWeb Scraping › Line Bot Webhook - Working

Line Bot Webhook - Working

LINE Bot Webhook - Working. Uses httpRequest. Webhook trigger; 5 nodes.

Webhook trigger★★★★☆ complexity5 nodesHTTP Request
Web Scraping Trigger: Webhook Nodes: 5 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "LINE Bot Webhook - Working",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "line-bot",
        "responseMode": "responseNode"
      },
      "id": "line-webhook",
      "name": "LINE Bot Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        200,
        200
      ]
    },
    {
      "parameters": {
        "jsCode": "// \u8655\u7406LINE\u8a0a\u606f\u4e26\u6e96\u5099\u56de\u8986\nconst body = $input.all()[0].json;\n\n// \u6aa2\u67e5\u662f\u5426\u6709\u4e8b\u4ef6\nif (!body.events || body.events.length === 0) {\n  return {\n    json: {\n      type: 'no_events',\n      skip: true\n    }\n  };\n}\n\nconst event = body.events[0];\n\n// \u53ea\u8655\u7406\u8a0a\u606f\u4e8b\u4ef6\nif (event.type === 'message') {\n  const replyToken = event.replyToken;\n  const userId = event.source.userId;\n  const messageText = event.message.text || '\u975e\u6587\u5b57\u8a0a\u606f';\n  \n  return {\n    json: {\n      replyToken: replyToken,\n      userId: userId,\n      receivedMessage: messageText,\n      replyMessage: `\u2705 OK - \u6536\u5230\u60a8\u7684\u8a0a\u606f\uff1a${messageText}`,\n      type: 'message_reply'\n    }\n  };\n}\n\n// \u975e\u8a0a\u606f\u4e8b\u4ef6\nreturn {\n  json: {\n    type: 'other_event',\n    skip: true\n  }\n};"
      },
      "id": "process-message",
      "name": "Process Message",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        400,
        200
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "message-condition",
              "leftValue": "={{ $json.type }}",
              "rightValue": "message_reply",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "check-reply-needed",
      "name": "Need Reply?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        600,
        200
      ]
    },
    {
      "parameters": {
        "url": "https://api.line.me/v2/bot/message/reply",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "Authorization",
              "value": "Bearer \u8acb\u66ff\u63db\u70ba\u60a8\u7684CHANNEL_ACCESS_TOKEN"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "replyToken",
              "value": "={{ $json.replyToken }}"
            },
            {
              "name": "messages",
              "value": "=[{\"type\": \"text\", \"text\": \"{{ $json.replyMessage }}\"}]"
            }
          ]
        },
        "options": {}
      },
      "id": "send-reply-to-user",
      "name": "Send Reply to User",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        800,
        150
      ]
    },
    {
      "parameters": {
        "respondWith": "text",
        "responseBody": "OK"
      },
      "id": "line-response",
      "name": "LINE Platform Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        800,
        250
      ]
    }
  ],
  "connections": {
    "LINE Bot Webhook": {
      "main": [
        [
          {
            "node": "Process Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Message": {
      "main": [
        [
          {
            "node": "Need Reply?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Need Reply?": {
      "main": [
        [
          {
            "node": "Send Reply to User",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "LINE Platform Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Reply to User": {
      "main": [
        [
          {
            "node": "LINE Platform Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {},
  "staticData": null,
  "tags": [],
  "triggerCount": 1,
  "updatedAt": "2025-07-31T00:00:00.000Z"
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

LINE Bot Webhook - Working. Uses httpRequest. Webhook trigger; 5 nodes.

Source: https://github.com/ZHAO-XIAN/smart_note/blob/4c62f11be8dc1a96f4280c601f4f93114c0b887b/n8n-workflows/LINE_Bot_Working.json — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Web Scraping

This n8n template provides enterprise-level version control for your workflows using GitHub integration. Stop losing hours to broken workflows and manual exports – get proper commit history, visual di

n8n, Execute Workflow Trigger, HTTP Request +1
Web Scraping

This flow creates dummy files for every item added in your *Arrs (Radarr/Sonarr) with the tag .

HTTP Request, Ssh
Web Scraping

eek-Go v2 (Batch-Then-Review). Uses httpRequest. Webhook trigger; 75 nodes.

HTTP Request
Web Scraping

This workflow receives webhook requests from a content calendar and uses the X API v2 to publish text posts, threads, image/video posts, and polls, as well as delete existing posts and run a credentia

HTTP Request
Web Scraping

This workflow acts as a central API gateway for all technical indicator agents in the Binance Spot Market Quant AI system. It listens for incoming webhook requests and dynamically routes them to the c

HTTP Request