{
  "name": "Review scraper copy",
  "nodes": [
    {
      "parameters": {
        "workflowInputs": {
          "values": [
            {
              "name": "Company name"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "typeVersion": 1.1,
      "position": [
        0,
        0
      ],
      "id": "b0b5635c-6a3a-495e-b70f-aba6bbe5459b",
      "name": "When Executed by Another Workflow"
    },
    {
      "parameters": {
        "url": "={{ $json.results[0].url }}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        420,
        0
      ],
      "id": "e83f6899-308d-4855-89ee-65a8cddb5430",
      "name": "HTTP Request1"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.tavily.com/search",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "Authorization",
              "value": "=Bearer <api key>"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"query\": \"{{ $('When Executed by Another Workflow').item.json['Company name'] }}'s trustpilot'\",\n  \"topic\": \"general\",\n  \"search_depth\": \"basic\",\n  \"max_results\": 1,\n  \"time_range\": null,\n  \"days\": 3,\n  \"include_answer\": true,\n  \"include_raw_content\": false,\n  \"include_images\": false,\n  \"include_image_descriptions\": false,\n  \"include_domains\": [],\n  \"exclude_domains\": []\n}\n",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        220,
        0
      ],
      "id": "2d919232-1aa6-4f9f-8230-60fa4e7c97f4",
      "name": "HTTP Request2"
    },
    {
      "parameters": {
        "html": "={{ $json.data }}",
        "options": {}
      },
      "type": "n8n-nodes-base.markdown",
      "typeVersion": 1,
      "position": [
        620,
        0
      ],
      "id": "feed4e2a-febf-488b-b39c-15e4d864982c",
      "name": "Markdown"
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list",
          "cachedResultName": "GPT-4O-MINI"
        },
        "messages": {
          "values": [
            {
              "content": "=I want you to look through this scraped trustpilot data and output to me a summary of the reviews has been scraped. output just the summary no explanation.\n\nhere is the data:\n {{ $json.data }}"
            }
          ]
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        840,
        0
      ],
      "id": "440c61fe-029c-485e-b580-10afbae3dd79",
      "name": "OpenAI",
      "credentials": {
        "openAiApi": {
          "id": "xX6Qn7dUJHcs40V9",
          "name": "OpenAi account"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "HTTP Request2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request2": {
      "main": [
        [
          {
            "node": "HTTP Request1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request1": {
      "main": [
        [
          {
            "node": "Markdown",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Markdown": {
      "main": [
        [
          {
            "node": "OpenAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "9f851b53-b84b-415e-80cb-f17853381320",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "8711ef6aba5ff6781b8ed3c0d9d8ad1fb3b9e4be41f1c9a056c02209236d4a91"
  },
  "id": "J9lnqCNSOhNpmLDC",
  "tags": [
    {
      "createdAt": "2025-05-05T18:28:14.726Z",
      "updatedAt": "2025-05-05T18:28:14.726Z",
      "id": "5l1iny0IJjZ0zdzn",
      "name": "Research agent"
    }
  ]
}