競合価格モニタリング(ウェブスクレイピング、Google Sheets および Discord アラート)

上級

これはMarket Research分野の自動化ワークフローで、21個のノードを含みます。主にIf, Code, Html, Discord, HttpRequestなどのノードを使用。 競価監視にネットスクレイピング、Google シート、Discord アラートを使用

前提条件
  • Discord Bot Token または Webhook
  • ターゲットAPIの認証情報が必要な場合あり
  • Google Sheets API認証情報

カテゴリー

ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "meta": {
    "instanceId": "bfc245d93526dceb7636f8b1e64128b218e1b1dd93d65d163c189ecbc1cc0b90",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "646a8d10-7ded-4f80-aa17-86c53bddbc43",
      "name": "スケジュールトリガー",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -680,
        140
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "c5199922-2c7e-4752-b016-b9c7715f6ed1",
      "name": "Discord1",
      "type": "n8n-nodes-base.discord",
      "position": [
        560,
        180
      ],
      "webhookId": "1afc816c-6d68-499b-936a-f76b220dd651",
      "parameters": {
        "content": "Price checks complete.",
        "options": {},
        "authentication": "webhook"
      },
      "credentials": {
        "discordWebhookApi": {
          "id": "R7mNwWe0jAFbTAB9",
          "name": "Discord Webhook account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "e21bf2ed-e964-479e-9097-3b35d834d9ee",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        780,
        380
      ],
      "parameters": {
        "width": 660,
        "height": 380,
        "content": "## setting checked column to \"0\" for next day checks"
      },
      "typeVersion": 1
    },
    {
      "id": "f5dbaff2-5cdc-474c-8f6e-0ec299730a0f",
      "name": "付箋1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        500,
        120
      ],
      "parameters": {
        "color": 4,
        "width": 200,
        "height": 200,
        "content": "price checks completed message to discord"
      },
      "typeVersion": 1
    },
    {
      "id": "b5d5c422-af74-408a-b060-3e5bf8c6578d",
      "name": "未チェック行の取得",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -300,
        140
      ],
      "parameters": {
        "options": {
          "returnFirstMatch": true
        },
        "filtersUI": {
          "values": [
            {
              "lookupValue": "0",
              "lookupColumn": "checked"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/16-hEaIl8Tng5SB5jbpu26kT7G-g1cFM5_w2AILwT3Pc/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "16-hEaIl8Tng5SB5jbpu26kT7G-g1cFM5_w2AILwT3Pc",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/16-hEaIl8Tng5SB5jbpu26kT7G-g1cFM5_w2AILwT3Pc/edit?usp=drivesdk",
          "cachedResultName": "price-check-sheet"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "b57GlApcZwTGd5nZ",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.6,
      "alwaysOutputData": true
    },
    {
      "id": "cee99b2f-6d63-40dc-bbfc-d98dc6bd3449",
      "name": "HTTP 商品ページへのリクエスト",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        420,
        -105
      ],
      "parameters": {
        "url": "={{ $json['Competitor URL'] }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "0b842eec-6f2d-4c62-ab00-403164951e64",
      "name": "ページからの価格抽出",
      "type": "n8n-nodes-base.html",
      "position": [
        640,
        -105
      ],
      "parameters": {
        "options": {},
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "price",
              "cssSelector": ".price_color"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "cce7d4e7-98a5-4c70-b90f-007ee6402e94",
      "name": "価格を数値に変換するコード",
      "type": "n8n-nodes-base.code",
      "position": [
        860,
        -105
      ],
      "parameters": {
        "jsCode": "const priceStr = $input.first().json.price\nconst priceNumber = parseFloat(priceStr.replace(\"£\", \"\").trim());\n\nreturn [{ json: { price: priceNumber } }];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "f74511f8-a89b-44ab-be06-74bc6522cec5",
      "name": "自社価格より高い?",
      "type": "n8n-nodes-base.if",
      "position": [
        1080,
        -105
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "37f18553-eb25-4f11-9803-73db6f67091c",
              "operator": {
                "type": "number",
                "operation": "lt"
              },
              "leftValue": "={{ $json.price }}",
              "rightValue": "={{ $('get unchecked row').item.json['my Price'] }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "d597ca2e-2e41-45c0-a8da-b1285bde2cd6",
      "name": "Discord 価格アラート",
      "type": "n8n-nodes-base.discord",
      "position": [
        1300,
        -180
      ],
      "webhookId": "56fe5f69-c879-4d1d-b436-588bf79e3d43",
      "parameters": {
        "content": "=competitor has decreased price on product: {{ $('get unchecked row').item.json['Product Name'] }}\n\nour price: {{ $('get unchecked row').item.json['my Price'] }}\ncompetitor's price:{{ $('Code to convert price into number').item.json.price }}",
        "options": {},
        "authentication": "webhook"
      },
      "credentials": {
        "discordWebhookApi": {
          "id": "R7mNwWe0jAFbTAB9",
          "name": "Discord Webhook account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "ded0c28b-e4d1-494a-bd6f-e2b88bb12c61",
      "name": "ステータスを1に更新",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1520,
        95
      ],
      "parameters": {
        "columns": {
          "value": {
            "checked": "1",
            "Product Name": "={{ $('get unchecked row').item.json['Product Name'] }}",
            "competitor price": "={{ $('Code to convert price into number').item.json.price }}"
          },
          "schema": [
            {
              "id": "Product Name",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Product Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "my Price",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "my Price",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Competitor URL",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Competitor URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "competitor price",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "competitor price",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "checked",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "checked",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Product Name"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/16-hEaIl8Tng5SB5jbpu26kT7G-g1cFM5_w2AILwT3Pc/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "16-hEaIl8Tng5SB5jbpu26kT7G-g1cFM5_w2AILwT3Pc",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/16-hEaIl8Tng5SB5jbpu26kT7G-g1cFM5_w2AILwT3Pc/edit?usp=drivesdk",
          "cachedResultName": "price-check-sheet"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "b57GlApcZwTGd5nZ",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "6b784dd4-681b-4e80-83ca-80dbe0e1e519",
      "name": "ステータス行の取得",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        840,
        520
      ],
      "parameters": {
        "options": {
          "returnFirstMatch": true
        },
        "filtersUI": {
          "values": [
            {
              "lookupValue": "1",
              "lookupColumn": "checked"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/16-hEaIl8Tng5SB5jbpu26kT7G-g1cFM5_w2AILwT3Pc/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "16-hEaIl8Tng5SB5jbpu26kT7G-g1cFM5_w2AILwT3Pc",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/16-hEaIl8Tng5SB5jbpu26kT7G-g1cFM5_w2AILwT3Pc/edit?usp=drivesdk",
          "cachedResultName": "price-check-sheet"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "b57GlApcZwTGd5nZ",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.6,
      "alwaysOutputData": true
    },
    {
      "id": "af9aea9b-5370-439f-8bf7-84159b3bb1cf",
      "name": "行が返された?",
      "type": "n8n-nodes-base.if",
      "position": [
        1060,
        440
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "998fc0d0-8d33-43cb-b6e8-f9516c28b55f",
              "operator": {
                "type": "object",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "af494912-3a5a-4b78-a0c4-57a3f1be5af6",
      "name": "ステータスを0に戻す",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1280,
        520
      ],
      "parameters": {
        "columns": {
          "value": {
            "checked": "0",
            "Product Name": "={{ $json[\"Product Name\"] }}"
          },
          "schema": [
            {
              "id": "Product Name",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Product Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "my Price",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "my Price",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Competitor URL",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Competitor URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "competitor price",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "competitor price",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "checked",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "checked",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Product Name"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/16-hEaIl8Tng5SB5jbpu26kT7G-g1cFM5_w2AILwT3Pc/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "16-hEaIl8Tng5SB5jbpu26kT7G-g1cFM5_w2AILwT3Pc",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/16-hEaIl8Tng5SB5jbpu26kT7G-g1cFM5_w2AILwT3Pc/edit?usp=drivesdk",
          "cachedResultName": "price-check-sheet"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "b57GlApcZwTGd5nZ",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "6c1fe1cd-56af-4c51-91b3-d5eaa9ce2948",
      "name": "付箋2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -820,
        40
      ],
      "parameters": {
        "width": 300,
        "height": 280,
        "content": "## start at desired schedule\n### daily in this example"
      },
      "typeVersion": 1
    },
    {
      "id": "2a156baa-d3fc-4d73-8241-d6021ddf1514",
      "name": "付箋3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        360,
        -220
      ],
      "parameters": {
        "width": 860,
        "height": 300,
        "content": "## get price from competitor's product page and convert into number\n"
      },
      "typeVersion": 1
    },
    {
      "id": "5e3db4b8-4bb7-477e-873c-ac77a5536ce1",
      "name": "付箋4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -340,
        -20
      ],
      "parameters": {
        "width": 180,
        "height": 340,
        "content": "## get un checked roe\n- ### extract name, page-url, our price"
      },
      "typeVersion": 1
    },
    {
      "id": "644a8dbc-6f7b-49cb-bc7b-96157db7a4ea",
      "name": "行が存在する?",
      "type": "n8n-nodes-base.if",
      "position": [
        100,
        140
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "8dd1be30-0d27-4c75-9d0b-c0db05a0fb4f",
              "operator": {
                "type": "object",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json}}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "2bae4c20-dabc-4833-9524-46308c3017b3",
      "name": "付箋5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1260,
        -380
      ],
      "parameters": {
        "color": 3,
        "width": 180,
        "height": 380,
        "content": "## discord alert \n- ### our price is greater than competition"
      },
      "typeVersion": 1
    },
    {
      "id": "5e289971-7536-4c4f-a508-eb8af7e63fb9",
      "name": "付箋6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1480,
        -20
      ],
      "parameters": {
        "width": 260,
        "height": 260,
        "content": "## set checked to 1"
      },
      "typeVersion": 1
    },
    {
      "id": "107fdca7-f641-4237-851a-776b63f5949c",
      "name": "付箋7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        -100
      ],
      "parameters": {
        "width": 260,
        "height": 360,
        "content": "## if unchecked row exist?\n- ### yes? (then extracts data)\n- ### else sends message checks are done and set checks to 0 for next day checks "
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "c5199922-2c7e-4752-b016-b9c7715f6ed1": {
      "main": [
        [
          {
            "node": "6b784dd4-681b-4e80-83ca-80dbe0e1e519",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "644a8dbc-6f7b-49cb-bc7b-96157db7a4ea": {
      "main": [
        [
          {
            "node": "cee99b2f-6d63-40dc-bbfc-d98dc6bd3449",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "c5199922-2c7e-4752-b016-b9c7715f6ed1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "af9aea9b-5370-439f-8bf7-84159b3bb1cf": {
      "main": [
        [
          {
            "node": "af494912-3a5a-4b78-a0c4-57a3f1be5af6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6b784dd4-681b-4e80-83ca-80dbe0e1e519": {
      "main": [
        [
          {
            "node": "af9aea9b-5370-439f-8bf7-84159b3bb1cf",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "646a8d10-7ded-4f80-aa17-86c53bddbc43": {
      "main": [
        [
          {
            "node": "b5d5c422-af74-408a-b060-3e5bf8c6578d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b5d5c422-af74-408a-b060-3e5bf8c6578d": {
      "main": [
        [
          {
            "node": "644a8dbc-6f7b-49cb-bc7b-96157db7a4ea",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ded0c28b-e4d1-494a-bd6f-e2b88bb12c61": {
      "main": [
        [
          {
            "node": "b5d5c422-af74-408a-b060-3e5bf8c6578d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d597ca2e-2e41-45c0-a8da-b1285bde2cd6": {
      "main": [
        [
          {
            "node": "ded0c28b-e4d1-494a-bd6f-e2b88bb12c61",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "af494912-3a5a-4b78-a0c4-57a3f1be5af6": {
      "main": [
        [
          {
            "node": "6b784dd4-681b-4e80-83ca-80dbe0e1e519",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0b842eec-6f2d-4c62-ab00-403164951e64": {
      "main": [
        [
          {
            "node": "cce7d4e7-98a5-4c70-b90f-007ee6402e94",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f74511f8-a89b-44ab-be06-74bc6522cec5": {
      "main": [
        [
          {
            "node": "d597ca2e-2e41-45c0-a8da-b1285bde2cd6",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "ded0c28b-e4d1-494a-bd6f-e2b88bb12c61",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "cee99b2f-6d63-40dc-bbfc-d98dc6bd3449": {
      "main": [
        [
          {
            "node": "0b842eec-6f2d-4c62-ab00-403164951e64",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "cce7d4e7-98a5-4c70-b90f-007ee6402e94": {
      "main": [
        [
          {
            "node": "f74511f8-a89b-44ab-be06-74bc6522cec5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

このワークフローの使い方は?

上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。

このワークフローはどんな場面に適していますか?

上級 - 市場調査

有料ですか?

このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。

ワークフロー情報
難易度
上級
ノード数21
カテゴリー1
ノードタイプ8
難易度説明

上級者向け、16ノード以上の複雑なワークフロー

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34