{
  "id": "7xkEgEP44GHwgc2N",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "7  scrape reviews from trustpilot",
  "tags": [],
  "nodes": [
    {
      "id": "a15211f7-505b-4f2a-ba53-c029f2e9b54a",
      "name": "Set Trustpilot company URL",
      "type": "n8n-nodes-base.set",
      "position": [
        -60,
        -140
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "2cf9cb42-883e-40da-9785-47755c9c6e9a",
              "name": "URL",
              "type": "string",
              "value": "https://www.trustpilot.com/review/hubspot.com"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "65afe387-1264-4e71-8308-00f9c7229806",
      "name": "Manual Start",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -220,
        -140
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "a8b8737b-592e-4b0f-abd5-844f8c0213ea",
      "name": "Agent : Fetch and analyze reviews",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        220,
        -140
      ],
      "parameters": {
        "text": "=`You are a web scraper connected to Bright Data's MCP tool using the scrape_as_markdown function.\n\nScrape the latest 5 reviews from the Trustpilot company page at this URL:\n{{ $json.URL }}\n\nUse the scrape_as_markdown tool with these parameters:\n{\n  \"url\": {{ $json.URL }},\n  \"max_items\": 5\n}\n\nAfter scraping, analyze each review and return a JSON array of 5 objects with these fields:\n\n- reviewer (string)\n- date (string)\n- rating (number)\n- sentiment (one of \"positive\", \"neutral\", or \"negative\")\n- mainIssue (string \u2014 summarize complaint or praise)\n- reviewText (string)\n\nReturn only valid JSON.\n`\n",
        "options": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2
    },
    {
      "id": "1d8b112c-7917-4f61-8b6e-3d6d98ce1947",
      "name": "Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        160,
        120
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "eb5f2d9a-aed9-48a1-ad61-7903b333314c",
      "name": "Bright Data MCP Scrapper",
      "type": "n8n-nodes-mcp.mcpClientTool",
      "position": [
        300,
        100
      ],
      "parameters": {
        "toolName": "scrape_as_markdown",
        "operation": "executeTool",
        "toolParameters": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Tool_Parameters', ``, 'json') }}"
      },
      "credentials": {
        "mcpClientApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "4c2639af-44c4-4579-beaa-cff5a9b50ae1",
      "name": "Splits Reviews into separate Objects",
      "type": "n8n-nodes-base.code",
      "position": [
        640,
        -140
      ],
      "parameters": {
        "jsCode": "// Access the first item in the input (AI Agent output)\nconst outputArray = $('Agent : Fetch and analyze reviews').first().json.output;\n\n// Map each review to a separate item (with `.json` wrapping)\nreturn outputArray.map(review => ({ json: review }));\n\n"
      },
      "typeVersion": 2,
      "alwaysOutputData": true
    },
    {
      "id": "1e4f0309-ac91-4ad7-836c-552b291db2e6",
      "name": "Save Reviews to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        860,
        -140
      ],
      "parameters": {
        "columns": {
          "value": {
            "date ": "={{ $json.date }}",
            "rating": "={{ $json.rating }}",
            "reviewer": "={{ $json.reviewer }}",
            "mainIssue ": "={{ $json.mainIssue }}",
            "reviewText": "={{ $json.reviewText }}",
            "sentiment ": "={{ $json.sentiment }}"
          },
          "schema": [
            {
              "id": "reviewer",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "reviewer",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "date ",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "date ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "rating",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "rating",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "sentiment ",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "sentiment ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "mainIssue ",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "mainIssue ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "reviewText",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "reviewText",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1dlaEmLIzSgTxH0whWJnx51lPHyb34bGxMSQig5KI7CQ/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1dlaEmLIzSgTxH0whWJnx51lPHyb34bGxMSQig5KI7CQ",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1dlaEmLIzSgTxH0whWJnx51lPHyb34bGxMSQig5KI7CQ/edit?usp=drivesdk",
          "cachedResultName": "scraped reviews from trustpilot"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "8d3de4f3-b17e-4607-a4d2-75e2bb3dafb8",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        -440
      ],
      "parameters": {
        "color": 3,
        "width": 340,
        "height": 480,
        "content": "\ud83d\udd39 SECTION 1: \ud83d\udea6 Start & Input Company URL\n\ud83e\udde9 Includes Nodes:\n\n\ud83d\udd18 Trigger: Manual Start\n\n\ud83c\udfe2 Set Company Profile URL\n\n\ud83d\udc63 What It Does:\nThis is your starting point. You manually click \"Execute workflow\" in n8n to begin the automation. The second node takes the company\u2019s Trustpilot URL as input \u2014 this tells the AI agent which business page to scrape reviews from."
      },
      "typeVersion": 1
    },
    {
      "id": "157a1838-08dd-4866-a770-14d9c91c52c9",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        -820
      ],
      "parameters": {
        "color": 5,
        "width": 400,
        "height": 880,
        "content": "\ud83e\udd16 SECTION 2: \ud83e\udde0 AI Agent \u2013 Scrape, Analyze & Summarize Trustpilot Reviews\n\ud83e\udde9 Includes Nodes:\n\n\ud83e\udd16 Agent: Fetch & Analyze Reviews\n\n\ud83e\udde0 Chat Model (AI Reasoning)\n\n\ud83c\udf10 Bright Data MCP Client\n\n\ud83e\uddfe JSON Review Formatter\n\nHere\u2019s what happens step-by-step:\n\n\ud83e\udde0 The AI reads the Trustpilot company URL that you set earlier.\n\n\ud83c\udf10 The Bright Data MCP tool visits the company\u2019s Trustpilot page using real mobile proxies to safely and accurately scrape the 5 most recent customer reviews.\n\n\ud83e\udde0 The AI then performs multiple tasks:\n\n\ud83d\udcd6 Reads each review and extracts the reviewer\u2019s name, rating, and date.\n\n\u2764\ufe0f Performs sentiment analysis (Is the review positive, negative, or neutral?).\n\n\ud83d\udd01 Identifies recurring topics across reviews (e.g. \u201clate delivery\u201d, \u201camazing support\u201d).\n\n\ud83e\uddf5 Summarizes the main customer concern or praise in 1-2 lines.\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "30970761-128a-4f35-86ca-ace27105edfd",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        600,
        -680
      ],
      "parameters": {
        "color": 6,
        "width": 420,
        "height": 740,
        "content": "\ud83d\udcca SECTION 3: \ud83d\udce6 Split Reviews & \ud83d\udce5 Save to Google Sheets\n\ud83e\udde9 Includes Nodes:\n\n\ud83d\udd0d Function: Split Reviews into Objects\n\n\ud83d\udce5 Google Sheets: Append Reviews\n\nHere\u2019s how it works:\n\ud83d\udd0d The Function node (Split Reviews into Objects) receives the JSON array of all 5 reviews from the AI agent.\n\ud83d\udc49 It loops through the array and separates each review into its own distinct object.\n\nThis ensures:\n\nEach review has its own data record\n\nClean and structured data per review\n\nCompatibility with downstream systems like spreadsheets, CRMs, or dashboards\n\n\ud83d\udce5 The Google Sheets node receives these separate review objects and writes them to your Google Sheet, one row per review.\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "afd73d97-fb10-4c7a-bb8c-7cc9cdcfc379",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1900,
        -560
      ],
      "parameters": {
        "color": 4,
        "width": 1300,
        "height": 1820,
        "content": "    Analyze Review Site Sentiment\n\n\u2728 Built in n8n | AI-Powered | No-Code Automation\n\n\ud83d\ude80 Workflow Overview\nThis workflow automates the process of retrieving, analyzing, summarizing, and saving customer reviews from any Trustpilot company page. It enables you to extract key insights from real users without manual effort or coding.\n\n\ud83d\udee0\ufe0f Tools Used:\n\nn8n (No-code automation builder)\n\nBright Data MCP (Mobile proxy scraper)\n\nOpenAI (for AI-powered reasoning and sentiment analysis)\n\nGoogle Sheets (for storing the results)\n\n\ud83e\udde9 Workflow Sections\n\ud83d\udd39 SECTION 1: \ud83d\udfe2 Start & Input Company URL\n\ud83e\udde9 Nodes:\n\n\ud83d\udd18 Manual Start\n\n\ud83c\udfe2 Set Trustpilot Company URL\n\n\ud83c\udfaf Description:\nThis section allows the user to trigger the workflow manually and provide a specific Trustpilot company profile URL as input.\n\n\ud83d\udccc Key Benefits:\n\nSimple to use \u2014 just paste the company URL\n\nReusable for any business\n\nNo backend modifications required to target a new company\n\n\ud83e\udd16 SECTION 2: \ud83e\udde0 AI Agent \u2014 Scrape, Analyze & Summarize\n\ud83e\udde9 Nodes:\n\n\ud83e\udd16 Agent: Fetch and Analyze Reviews\n\n\ud83e\udde0 Chat Model (AI Reasoning)\n\n\ud83c\udf10 Bright Data MCP Scraper (executeTool)\n\n\ud83e\uddfe JSON Review Formatter (Output Parser)\n\n\ud83c\udfaf Description:\nThis is the intelligence core of the workflow. It uses the AI agent and Bright Data proxy tool to:\n\nAccess the Trustpilot page and scrape the 5 most recent customer reviews\n\nAnalyze each review for sentiment (positive, neutral, or negative)\n\nIdentify recurring topics or issues mentioned in reviews\n\nGenerate a brief summary representing the general customer sentiment\n\n\ud83d\udccc Key Benefits:\n\nNo scraping scripts required\n\nIntelligent insight extraction\n\nWorks reliably using real mobile IPs (bypasses protection)\n\n\ud83d\udcca SECTION 3: \ud83d\udd0d Split Reviews & \ud83d\udce5 Save to Google Sheets\n\ud83e\udde9 Nodes:\n\n\ud83d\udd0d Splits Reviews into Separate Objects\n\n\ud83d\udcc4 Save Reviews to Google Sheets\n\n\ud83c\udfaf Description:\nThis section structures and stores the data. After the AI returns reviews in array format, the function node splits them into separate objects. Each review is then stored as an individual row in Google Sheets.\n\n\ud83d\udccc Key Benefits:\n\nClean, row-by-row storage for easy review\n\nCompatible with reporting and dashboard tools\n\nMaintains historical record of customer feedback\n\n\u2705 Workflow Summary\nSection\tWhat It Does\n1\ufe0f\u20e3 Input\tAllows user to manually trigger and set company URL\n2\ufe0f\u20e3 AI Agent\tScrapes, analyzes, identifies themes, and summarizes data\n3\ufe0f\u20e3 Output\tSplits and saves review data to a structured spreadsheet"
      },
      "typeVersion": 1
    },
    {
      "id": "55a5aa8e-c5e5-443d-b71a-4dc2ae3438bb",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1900,
        -900
      ],
      "parameters": {
        "color": 4,
        "width": 1300,
        "height": 320,
        "content": "=======================================\n            WORKFLOW ASSISTANCE\n=======================================\nFor any questions or support, please contact:\n    Yaron@nofluff.online\n\nExplore more tips and tutorials here:\n   - YouTube: https://www.youtube.com/@YaronBeen/videos\n   - LinkedIn: https://www.linkedin.com/in/yaronbeen/\n=======================================\n"
      },
      "typeVersion": 1
    },
    {
      "id": "bff313ed-572b-47ec-bdb3-4299bc78bfb5",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1060,
        -680
      ],
      "parameters": {
        "color": 7,
        "width": 380,
        "height": 240,
        "content": "## I\u2019ll receive a tiny commission if you join Bright Data through this link\u2014thanks for fueling more free content!\n\n### https://get.brightdata.com/1tndi4600b25"
      },
      "typeVersion": 1
    },
    {
      "id": "4640997a-7f82-4d97-bf1d-60f063038c0d",
      "name": "Auto-fixing Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
      "position": [
        420,
        120
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "784fad38-2ad5-4e31-b6ea-e594a3da6bba",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        420,
        320
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "17616722-c86c-4741-a1ea-2e30cc2ff420",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        580,
        320
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"array\",\n  \"items\": {\n    \"type\": \"object\",\n    \"properties\": {\n      \"reviewer\": { \"type\": \"string\" },\n      \"date\": { \"type\": \"string\" },\n      \"rating\": { \"type\": \"number\" },\n      \"sentiment\": {\n        \"type\": \"string\",\n        \"enum\": [\"positive\", \"neutral\", \"negative\"]\n      },\n      \"mainIssue\": { \"type\": \"string\" },\n      \"reviewText\": { \"type\": \"string\" }\n    },\n    \"required\": [\"reviewer\", \"date\", \"rating\", \"sentiment\", \"mainIssue\", \"reviewText\"]\n  }\n}"
      },
      "typeVersion": 1.3
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "cc92153a-30c0-4c8b-9c09-8196a98935ee",
  "connections": {
    "Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Agent : Fetch and analyze reviews",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Manual Start": {
      "main": [
        [
          {
            "node": "Set Trustpilot company URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Bright Data MCP Scrapper": {
      "ai_tool": [
        [
          {
            "node": "Agent : Fetch and analyze reviews",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Auto-fixing Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Agent : Fetch and analyze reviews",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Set Trustpilot company URL": {
      "main": [
        [
          {
            "node": "Agent : Fetch and analyze reviews",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Agent : Fetch and analyze reviews": {
      "main": [
        [
          {
            "node": "Splits Reviews into separate Objects",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Splits Reviews into separate Objects": {
      "main": [
        [
          {
            "node": "Save Reviews to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}