{
  "name": "Automate contact enrichment with Surfe, Google Sheets & HubSpot",
  "nodes": [
    {
      "id": "0796ab84-bf14-4f51-906e-db01486b2c76",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -460,
        580
      ]
    },
    {
      "id": "0cf2212f-e1f3-4616-ad6b-6c8c00bfe237",
      "name": "Google Drive Trigger",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        -760,
        580
      ]
    },
    {
      "id": "c3e28407-7bb4-4d2a-8009-0621f236efa3",
      "name": "Filter: phone AND email",
      "type": "n8n-nodes-base.filter",
      "position": [
        1240,
        440
      ]
    },
    {
      "id": "23fdf067-cd74-4b04-96df-9241a86570cf",
      "name": "Extract list of peoples from Surfe API response",
      "type": "n8n-nodes-base.code",
      "position": [
        1020,
        440
      ]
    },
    {
      "id": "1b84d64f-85ea-4914-96e2-3321c3ed389d",
      "name": "Is enrichment complete ?",
      "type": "n8n-nodes-base.if",
      "position": [
        800,
        480
      ]
    },
    {
      "id": "735abd1e-66df-4e0c-92e4-803c08edd307",
      "name": "Surfe Bulk Enrichments API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        340,
        580
      ]
    },
    {
      "id": "976ebf8c-8838-41c1-bb8f-f817a9b60ae9",
      "name": "Surfe check enrichement status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        560,
        580
      ]
    },
    {
      "id": "94417a70-a873-491e-88e6-262dcadde94f",
      "name": "Gmail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        120,
        340
      ]
    },
    {
      "id": "ad49f2c1-a9a0-49fa-8853-aef4dc63a453",
      "name": "Split Batch - 500",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -160,
        580
      ]
    },
    {
      "id": "b1c2c48c-5ba6-4a42-ab17-bf69400aa0ac",
      "name": "HubSpot: Create or Update",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        1380,
        1100
      ]
    },
    {
      "id": "5e689b8d-5539-4593-9e18-903b172f4c73",
      "name": "Wait 30 secondes",
      "type": "n8n-nodes-base.wait",
      "position": [
        780,
        940
      ]
    },
    {
      "id": "b6b81b03-77b5-4868-91f6-12d4d9c248d9",
      "name": "Prepare JSON Payload Enrichment Request",
      "type": "n8n-nodes-base.code",
      "position": [
        120,
        580
      ]
    }
  ],
  "connections": {
    "Google Sheets": {
      "main": [
        [
          {
            "node": "Split Batch - 500",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 30 secondes": {
      "main": [
        [
          {
            "node": "Surfe check enrichement status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Batch - 500": {
      "main": [
        [
          {
            "node": "Gmail",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prepare JSON Payload Enrichment Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive Trigger": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter: phone AND email": {
      "main": [
        [
          {
            "node": "HubSpot: Create or Update",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is enrichment complete ?": {
      "main": [
        [
          {
            "node": "Extract list of peoples from Surfe API response",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 30 secondes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HubSpot: Create or Update": {
      "main": [
        [
          {
            "node": "Split Batch - 500",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Surfe Bulk Enrichments API": {
      "main": [
        [
          {
            "node": "Surfe check enrichement status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Surfe check enrichement status": {
      "main": [
        [
          {
            "node": "Is enrichment complete ?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare JSON Payload Enrichment Request": {
      "main": [
        [
          {
            "node": "Surfe Bulk Enrichments API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract list of peoples from Surfe API response": {
      "main": [
        [
          {
            "node": "Filter: phone AND email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}