{
  "name": "Enrich seller data with email & domain lookup using Bright Data & Google Search",
  "nodes": [
    {
      "id": "45b55e87-08a0-44e5-a220-5d9110ac364e",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1960,
        480
      ]
    },
    {
      "id": "6daee671-8b07-4101-b57a-5dd7a9966c5e",
      "name": "Postgres1",
      "type": "n8n-nodes-base.postgres",
      "position": [
        3000,
        480
      ]
    },
    {
      "id": "b79a33a6-3d15-44cf-b043-3e33cdb09cbf",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        3620,
        1300
      ]
    },
    {
      "id": "b4e9b540-49f4-48d5-abf9-5008412a86bc",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1960,
        720
      ]
    },
    {
      "id": "4847e2e0-8abe-4d10-b04b-85b4ee318c83",
      "name": "Postgres2",
      "type": "n8n-nodes-base.postgres",
      "position": [
        3020,
        1020
      ]
    },
    {
      "id": "e513e68c-9fe6-48e9-98c9-fd2787926619",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        -680,
        660
      ]
    },
    {
      "id": "5fa56857-8607-430d-ac9e-0105f377cfbe",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        2320,
        840
      ]
    },
    {
      "id": "426cf1bc-f5e5-4f59-b727-b8baa5b715bb",
      "name": "Postgres3",
      "type": "n8n-nodes-base.postgres",
      "position": [
        3000,
        660
      ]
    },
    {
      "id": "e399a71c-46d2-4930-89a6-f976987ed3b3",
      "name": "Switch1",
      "type": "n8n-nodes-base.switch",
      "position": [
        2580,
        840
      ]
    },
    {
      "id": "00cfa54d-3776-4564-8a22-d15b27b8effe",
      "name": "Postgres4",
      "type": "n8n-nodes-base.postgres",
      "position": [
        3000,
        840
      ]
    },
    {
      "id": "dbe77304-ba70-49d7-81ee-3afffcae7820",
      "name": "Wait1",
      "type": "n8n-nodes-base.wait",
      "position": [
        420,
        560
      ]
    },
    {
      "id": "34d5cbe7-2c3f-4bfd-888b-e0a4f81cd962",
      "name": "Edit Fields3",
      "type": "n8n-nodes-base.set",
      "position": [
        1680,
        720
      ]
    },
    {
      "id": "759cac41-3a78-499d-b529-8ae6f4bb51ea",
      "name": "Process by Batch",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -960,
        640
      ]
    },
    {
      "id": "2a432d7a-cbe8-4334-b8c2-febfe5696c83",
      "name": "BrightData",
      "type": "n8n-nodes-brightdata.brightData",
      "position": [
        -120,
        240
      ]
    },
    {
      "id": "db49e284-72b4-41b7-8ca1-96335c46e11f",
      "name": "BrightData1",
      "type": "n8n-nodes-brightdata.brightData",
      "position": [
        800,
        720
      ]
    },
    {
      "id": "312ff218-353d-4d2c-a7e4-6a2bc133f828",
      "name": "HTML",
      "type": "n8n-nodes-base.html",
      "position": [
        40,
        240
      ]
    },
    {
      "id": "e1ec0679-fde7-4a62-b162-dc3a6be50b8e",
      "name": "HTML1",
      "type": "n8n-nodes-base.html",
      "position": [
        980,
        720
      ]
    },
    {
      "id": "ea68bca8-7f10-49d3-a14d-e46cc4c793ba",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        360,
        240
      ]
    },
    {
      "id": "02b202cd-1a45-49a5-997a-35a692598f02",
      "name": "Filter",
      "type": "n8n-nodes-base.filter",
      "position": [
        500,
        240
      ]
    },
    {
      "id": "f15a901a-5225-4450-949b-6fb5769c6564",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        660,
        240
      ]
    },
    {
      "id": "a403ff04-ed4e-43f4-abd6-261173b7d63d",
      "name": "Code2",
      "type": "n8n-nodes-base.code",
      "position": [
        1140,
        720
      ]
    },
    {
      "id": "4fd9ec2d-14e4-4765-bdad-1e33dd93d8c1",
      "name": "Split Out1",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1280,
        720
      ]
    },
    {
      "id": "69e9a05d-9b30-409e-a94b-888828aa5dc1",
      "name": "Filter1",
      "type": "n8n-nodes-base.filter",
      "position": [
        1400,
        720
      ]
    },
    {
      "id": "a317567a-1d69-41b8-bab1-f656627381e4",
      "name": "If2",
      "type": "n8n-nodes-base.if",
      "position": [
        1900,
        720
      ]
    },
    {
      "id": "6ec5cc13-8e67-43a7-bec3-81b8ba8121b7",
      "name": "Aggregate1",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1540,
        720
      ]
    },
    {
      "id": "3f62b698-1948-45cf-bf70-467dd36e7c81",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        40
      ],
      "parameters": {
        "width": 1000,
        "height": 460,
        "content": "## Search Domain+Email in Google using Bright Data\nIf the domain exist, use the search query \"{{$json.domain}}+email\"."
      }
    },
    {
      "id": "30aa345b-90d1-4012-a3ba-81194ad676a1",
      "name": "Check if email exists",
      "type": "n8n-nodes-base.if",
      "position": [
        920,
        240
      ]
    },
    {
      "id": "4da7a7a8-3eca-4f20-af2f-9fc0baf9b9b0",
      "name": "Extract Emails",
      "type": "n8n-nodes-base.code",
      "position": [
        200,
        240
      ]
    },
    {
      "id": "43557ff1-642c-41b3-b6e9-cfc5de650428",
      "name": "Read the Database",
      "type": "n8n-nodes-base.postgres",
      "position": [
        -1280,
        640
      ]
    },
    {
      "id": "5ae7d1e1-c626-4553-85c0-07c5f3ea96c6",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        560
      ],
      "parameters": {
        "width": 1140,
        "height": 460,
        "content": "## Search Seller Name+Address+Email in Google using Bright Data\nIf the domain exist, use the search query \"{{$json.seller_name}}+{{ $json.seller_address }}+email\"."
      }
    },
    {
      "id": "7dfb9013-7c0e-43d0-ba44-afb02ed0834e",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2240,
        340
      ],
      "parameters": {
        "width": 980,
        "height": 960,
        "content": "## Clean up the data and save it to Postgres database"
      }
    },
    {
      "id": "2034fa79-9c65-4cd8-9b74-f9f9301310f5",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1340,
        460
      ],
      "parameters": {
        "width": 960,
        "height": 540,
        "content": "## Read and iterate through the database\n"
      }
    }
  ],
  "connections": {
    "If2": {
      "main": [
        [
          {
            "node": "Postgres1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code": {
      "main": [
        [
          {
            "node": "Switch1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTML": {
      "main": [
        [
          {
            "node": "Extract Emails",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Process by Batch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code2": {
      "main": [
        [
          {
            "node": "Split Out1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTML1": {
      "main": [
        [
          {
            "node": "Code2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "BrightData1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "BrightData",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "BrightData1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Postgres2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter1": {
      "main": [
        [
          {
            "node": "Aggregate1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch1": {
      "main": [
        [
          {
            "node": "Postgres3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Postgres4",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Postgres4",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Postgres2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Check if email exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Postgres1": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Postgres2": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Postgres3": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Postgres4": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate1": {
      "main": [
        [
          {
            "node": "Edit Fields3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "BrightData": {
      "main": [
        [
          {
            "node": "HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out1": {
      "main": [
        [
          {
            "node": "Filter1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "BrightData1": {
      "main": [
        [
          {
            "node": "HTML1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields3": {
      "main": [
        [
          {
            "node": "If2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Emails": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process by Batch": {
      "main": [
        [],
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Read the Database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read the Database": {
      "main": [
        [
          {
            "node": "Process by Batch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if email exists": {
      "main": [
        [
          {
            "node": "Postgres1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Read the Database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}