Mi flujo de trabajo 11

Intermedio

Este es unMarket Researchflujo de automatización del dominio deautomatización que contiene 11 nodos.Utiliza principalmente nodos como If, Set, Code, Wait, SplitOut. Exportar en masa reseñas de productos de Amazon a Google Sheets a través de RapidAPI

Requisitos previos
  • Pueden requerirse credenciales de autenticación para la API de destino
  • Credenciales de API de Google Sheets
Vista previa del flujo de trabajo
Visualización de las conexiones entre nodos, con soporte para zoom y panorámica
Exportar flujo de trabajo
Copie la siguiente configuración JSON en n8n para importar y usar este flujo de trabajo
{
  "id": "UXqw9glm6hQ45Yxz",
  "meta": {
    "instanceId": "36fee986cc83112881fb12ec7cc2d0221d7bddd71c11715c196899b114e8b0d2"
  },
  "name": "My workflow 11",
  "tags": [],
  "nodes": [
    {
      "id": "85865a9c-c8db-48fc-be37-e44b9488ca83",
      "name": "Recorrer elementos",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1392,
        640
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "7bf88274-96e0-47fe-830b-81b894fce53a",
      "name": "Esperar1",
      "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": "Esperar2",
      "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": "Split Out Reviews",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        2288,
        304
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "data.reviews"
      },
      "typeVersion": 1
    },
    {
      "id": "482ca5b2-a96a-49b3-bf8b-656b1973dcfc",
      "name": "If status \"OK\" and contains reviews",
      "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": "Store reviews",
      "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": "Solicitud 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": "On form submission",
      "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": "Establecer Constants",
      "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": "Build Parameter Establecers",
      "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": "Nota adhesiva",
      "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": {
    "Wait1": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait2": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "482ca5b2-a96a-49b3-bf8b-656b1973dcfc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Constants": {
      "main": [
        [
          {
            "node": "Build Parameter Sets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ca6e3a19-8678-4fcd-9af3-bd730b827735": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Wait1",
            "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": "Set Constants",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Parameter Sets": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "482ca5b2-a96a-49b3-bf8b-656b1973dcfc": {
      "main": [
        [
          {
            "node": "875c965f-fcbb-476f-9d53-3ff0a7a2dcdb",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Preguntas frecuentes

¿Cómo usar este flujo de trabajo?

Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.

¿En qué escenarios es adecuado este flujo de trabajo?

Intermedio - Investigación de mercado

¿Es de pago?

Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.

Información del flujo de trabajo
Nivel de dificultad
Intermedio
Número de nodos11
Categoría1
Tipos de nodos10
Descripción de la dificultad

Adecuado para usuarios con experiencia intermedia, flujos de trabajo de complejidad media con 6-15 nodos

Autor
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.

Enlaces externos
Ver en n8n.io

Compartir este flujo de trabajo

Categorías

Categorías: 34