私のワークフロー11

中級

これはMarket Research分野の自動化ワークフローで、11個のノードを含みます。主にIf, Set, Code, Wait, SplitOutなどのノードを使用。 RapidAPIでAmazon製品レビューをGoogleシートにバッチで書き出し

前提条件
  • ターゲットAPIの認証情報が必要な場合あり
  • Google Sheets API認証情報

カテゴリー

ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "id": "UXqw9glm6hQ45Yxz",
  "meta": {
    "instanceId": "36fee986cc83112881fb12ec7cc2d0221d7bddd71c11715c196899b114e8b0d2"
  },
  "name": "My workflow 11",
  "tags": [],
  "nodes": [
    {
      "id": "85865a9c-c8db-48fc-be37-e44b9488ca83",
      "name": "アイテムをループ処理",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1392,
        640
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "7bf88274-96e0-47fe-830b-81b894fce53a",
      "name": "待機1",
      "type": "n8n-nodes-base.wait",
      "position": [
        1616,
        400
      ],
      "webhookId": "eeca318b-8f89-47c5-aaa0-ab4e6c88ab19",
      "parameters": {
        "amount": 3.7
      },
      "typeVersion": 1.1
    },
    {
      "id": "b98f4bf4-1a89-4e3e-bab1-b27730797d43",
      "name": "待機2",
      "type": "n8n-nodes-base.wait",
      "position": [
        2288,
        496
      ],
      "webhookId": "bca3f33a-5dc6-42c7-b05b-8430f194b32d",
      "parameters": {
        "amount": 60
      },
      "typeVersion": 1.1
    },
    {
      "id": "875c965f-fcbb-476f-9d53-3ff0a7a2dcdb",
      "name": "レビューを分割",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        2288,
        304
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "data.reviews"
      },
      "typeVersion": 1
    },
    {
      "id": "482ca5b2-a96a-49b3-bf8b-656b1973dcfc",
      "name": "ステータスが「OK」かつレビューを含む場合",
      "type": "n8n-nodes-base.if",
      "position": [
        2064,
        400
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "264bc7f0-0b3a-412c-b7fd-de676e20442b",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{$json.status == 'OK'}}",
              "rightValue": "="
            },
            {
              "id": "5827107b-d356-4672-9adf-505c86c09989",
              "operator": {
                "type": "array",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.data.reviews }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "ca6e3a19-8678-4fcd-9af3-bd730b827735",
      "name": "レビューを保存",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2512,
        464
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "url",
          "value": "={{ $('On form submission').item.json[\"Tab URL to insert reviews\"] }}"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1XsPm7V9cf9jufJ6flUXTVO2Kzaj_KOyl1_h7AZTomCM",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XsPm7V9cf9jufJ6flUXTVO2Kzaj_KOyl1_h7AZTomCM/edit?usp=drivesdk",
          "cachedResultName": "Amazon Reviews Database"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wOT0EGRAXG51Ihtb",
          "name": "Google Sheets account (Augra)"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "f92603d0-4224-4cab-9740-903edd0f0189",
      "name": "HTTP リクエスト",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        1840,
        400
      ],
      "parameters": {
        "url": "https://real-time-amazon-data.p.rapidapi.com/product-reviews",
        "options": {},
        "sendQuery": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "country",
              "value": "={{ $json.country }}"
            },
            {
              "name": "asin",
              "value": "={{ $json.asin }}"
            },
            {
              "name": "page",
              "value": "={{ $json.page }}"
            },
            {
              "name": "sort_by",
              "value": "={{ $json.sort_by }}"
            },
            {
              "name": "star_rating",
              "value": "={{ $json.star_rating }}"
            },
            {
              "name": "verified_purchases_only",
              "value": "true"
            },
            {
              "name": "images_or_videos_only",
              "value": "false"
            },
            {
              "name": "current_format_only",
              "value": "false"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "x-rapidapi-host",
              "value": "real-time-amazon-data.p.rapidapi.com"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "pbRNzyVKUKmlfaEd",
          "name": "(Nateskin) Real-Time Amazon Data"
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.2
    },
    {
      "id": "b14a05fb-024d-4209-a779-9621e5f61172",
      "name": "フォーム送信時",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        720,
        640
      ],
      "webhookId": "3d70d5ff-d975-4b50-8a3e-315d6a4b6110",
      "parameters": {
        "options": {},
        "formTitle": "Amazon Product Reviews Scraper",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Brand name",
              "placeholder": "MANSCAPED",
              "requiredField": true
            },
            {
              "fieldLabel": "Product / Model Name",
              "placeholder": "The Lawn Mower® 3.0 Plus ",
              "requiredField": true
            },
            {
              "fieldLabel": "Amazon Product URL",
              "placeholder": "https://www.amazon.com/MANSCAPED%C2%AE-Lawn-Mower%C2%AE-Groin-Trimmer/dp/B0CQB9Y9LR?th=1",
              "requiredField": true
            },
            {
              "fieldLabel": "Tab URL to insert reviews",
              "placeholder": "https://docs.google.com/spreadsheets/d/1XsPm7V9cf9jufJ6flUXTVO2Kzaj_KOyl1_h7AZTomCM/edit?gid=1804331607#gid=1804331607",
              "requiredField": true
            }
          ]
        },
        "formDescription": "Which brand's feedback would you like to research on?"
      },
      "typeVersion": 2.2
    },
    {
      "id": "1d5e0f0e-6bfc-44ed-98b9-41f9f942e283",
      "name": "定数を設定",
      "type": "n8n-nodes-base.set",
      "position": [
        944,
        640
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "76a26d62-f4ef-4e23-9b38-6d48a857b6a4",
              "name": "asin",
              "type": "string",
              "value": "={{ $json[\"Amazon Product URL\"].match(/\\/dp\\/([A-Z0-9]{10})/)[1] }}"
            },
            {
              "id": "3eaff8f4-2c95-4571-b55f-724c2a65dd5c",
              "name": "country",
              "type": "string",
              "value": "US"
            },
            {
              "id": "1f7c745d-cbcd-4cc0-9135-82d8b1579108",
              "name": "brand_name",
              "type": "string",
              "value": "={{ $json['Brand name'] }}"
            },
            {
              "id": "9a106cd5-b43a-4015-8237-ecb7ce4f9e3d",
              "name": "product_name",
              "type": "string",
              "value": "={{ $json['Product / Model Name'] }}"
            },
            {
              "id": "50fbc48b-6485-44a1-b486-fad58c2783d1",
              "name": "last_scraped",
              "type": "string",
              "value": "={{ $json.submittedAt }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "7ff1aa7b-a2f2-49a0-932f-8a828199b249",
      "name": "パラメータセットを構築",
      "type": "n8n-nodes-base.code",
      "onError": "continueErrorOutput",
      "position": [
        1168,
        640
      ],
      "parameters": {
        "jsCode": "const asin          = $input.first().json.asin;\nconst country       = $input.first().json.country;\n\nconst items = [];\n\n// 1. Core harvest  (50 calls)\n['1_STARS','2_STARS','3_STARS','4_STARS','5_STARS'].forEach(rating => {\n  for (let page=1; page<=10; page++) {\n    items.push({ asin, country, star_rating: rating,\n                 sort_by: 'MOST_RECENT', page });\n  }\n});\n\n// 3. Spotlight extremes  (20 calls)\n['1_STARS','5_STARS'].forEach(rating => {\n  for (let page=1; page<=10; page++) {\n    items.push({ asin, country, star_rating: rating,\n                 sort_by: 'TOP_REVIEWS', page });\n  }\n});\n\nreturn items.map(i => ({json: i}));\n"
      },
      "typeVersion": 2
    },
    {
      "id": "222653cb-0c94-4b9e-885b-ef3003790fa9",
      "name": "付箋メモ",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 576,
        "height": 1472,
        "content": "## 🧾 Amazon Product Reviews Scraper – User Manual\n\n### 📥 1. On Form Submission\n\n* When filling in the form, ensure that the **Tab URL** entered matches the **exact URL** of the corresponding tab in the Google Sheet you want to populate.\n* If there's a mismatch, the data **will not be stored** in the correct sheet.\n\n---\n\n### 🔍 2. What This Workflow Does\n\n* For each ASIN, the scraper pulls:\n\n  * **MOST RECENT** reviews → 100 per star rating (1⭐ to 5⭐)\n  * **TOP REVIEWS** → 100 for only 1⭐ and 5⭐\n* This means:\n\n  * 50 API calls for MOST RECENT (5 ratings × 10 pages each)\n  * 20 API calls for TOP REVIEWS (2 ratings × 10 pages each)\n  * **Total: 70 API calls per product**\n\n---\n\n### 🔑 3. How to Get Your RapidAPI Key\n\n1. Go to: [RapidAPI Playground](https://rapidapi.com/letscrape-6bRBa3QguO5/api/real-time-amazon-data/playground/endpoint_1e42cec2-07bd-49bf-bde6-563c03f27bb3)\n2. Log in or sign up for a RapidAPI account.\n3. Click **\"Test Endpoint\"** → this auto-generates your API Key.\n4. Click the **“Code Snippet”** tab → copy your `X-RapidAPI-Key`.\n5. Paste this into your n8n HTTP Request credentials under `httpHeaderAuth`.\n\n---\n\nHere’s the updated section with the correct error message:\n\n---\n\n### ⚠️ 4. Known Failure Cases\n\n#### 🔸 *Fails at* → `If status \"OK\" and contains reviews`\n\nTwo main causes:\n\n1. **Not enough reviews available**\n   The workflow assumes **10 pages** of reviews exist for each star rating.\n   If Amazon doesn't have that many, the step will fail silently at the conditional check.\n\n2. **RapidAPI quota limit exceeded**\n   If you've hit your monthly quota, the API will return an error like:\n\n   ```\n   The service is receiving too many requests from you  \n   You have exceeded the MONTHLY quota for Requests on your current plan, BASIC.  \n   Error 429\n   ```\n\n   You can verify this by checking the logs for an `Error 429` and reviewing your quota at [RapidAPI Dashboard](https://rapidapi.com/developer/dashboard).\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "3b3852dc-5ca6-4ac2-81c1-0a128538416e",
  "connections": {
    "7bf88274-96e0-47fe-830b-81b894fce53a": {
      "main": [
        [
          {
            "node": "f92603d0-4224-4cab-9740-903edd0f0189",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b98f4bf4-1a89-4e3e-bab1-b27730797d43": {
      "main": [
        [
          {
            "node": "85865a9c-c8db-48fc-be37-e44b9488ca83",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f92603d0-4224-4cab-9740-903edd0f0189": {
      "main": [
        [
          {
            "node": "482ca5b2-a96a-49b3-bf8b-656b1973dcfc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1d5e0f0e-6bfc-44ed-98b9-41f9f942e283": {
      "main": [
        [
          {
            "node": "7ff1aa7b-a2f2-49a0-932f-8a828199b249",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ca6e3a19-8678-4fcd-9af3-bd730b827735": {
      "main": [
        [
          {
            "node": "85865a9c-c8db-48fc-be37-e44b9488ca83",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "85865a9c-c8db-48fc-be37-e44b9488ca83": {
      "main": [
        [],
        [
          {
            "node": "7bf88274-96e0-47fe-830b-81b894fce53a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "875c965f-fcbb-476f-9d53-3ff0a7a2dcdb": {
      "main": [
        [
          {
            "node": "ca6e3a19-8678-4fcd-9af3-bd730b827735",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b14a05fb-024d-4209-a779-9621e5f61172": {
      "main": [
        [
          {
            "node": "1d5e0f0e-6bfc-44ed-98b9-41f9f942e283",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7ff1aa7b-a2f2-49a0-932f-8a828199b249": {
      "main": [
        [
          {
            "node": "85865a9c-c8db-48fc-be37-e44b9488ca83",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "482ca5b2-a96a-49b3-bf8b-656b1973dcfc": {
      "main": [
        [
          {
            "node": "875c965f-fcbb-476f-9d53-3ff0a7a2dcdb",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "b98f4bf4-1a89-4e3e-bab1-b27730797d43",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

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

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

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

中級 - 市場調査

有料ですか?

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

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

経験者向け、6-15ノードの中程度の複雑さのワークフロー

作成者
Hunyao

Hunyao

@hun-yao

Hun Yao is a founder-engineer obsessed with building scalable automation that actually moves the needle - with a focus in the E-commerce space. A self-taught product builder with roots in marketing and AI, he uses n8n as his playground to ship MVPs fast - turning modular workflows into elegant, revenue-generating systems.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34