{
  "name": "Qualify lead lists and find professional emails with OpenAI and Google Sheets",
  "nodes": [
    {
      "id": "b8e4e5ba-00e2-4a27-94ca-45677f7f0ee2",
      "name": "Watch For New Leads",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        -608,
        1872
      ]
    },
    {
      "id": "e0be8b6d-02bd-4d35-aa61-f9c0271b4881",
      "name": "Read Lead Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -384,
        1872
      ]
    },
    {
      "id": "dacbacba-8ff0-439c-a83b-0e0f3492ad07",
      "name": "Normalize Lead Data",
      "type": "n8n-nodes-base.set",
      "position": [
        -160,
        1872
      ]
    },
    {
      "id": "dfc85f4e-b5bf-4587-bf04-8a258dbe2dd2",
      "name": "Batch Leads",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        64,
        1872
      ]
    },
    {
      "id": "0d1cda8b-ce5a-4fed-909e-bf5dfce4ea04",
      "name": "Find Email via OpenAI",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        400,
        1888
      ]
    },
    {
      "id": "e39b6db4-74d8-4bd7-b101-80f4b7fb9c01",
      "name": "Rate Limit Delay",
      "type": "n8n-nodes-base.wait",
      "position": [
        752,
        1888
      ]
    },
    {
      "id": "771dc58e-ab45-4454-b345-434e3db6b2b1",
      "name": "Parse Email Results",
      "type": "n8n-nodes-base.set",
      "position": [
        1008,
        1888
      ]
    },
    {
      "id": "4fd2271a-4b2c-4de7-9f61-834d700ee662",
      "name": "Has Valid Email?",
      "type": "n8n-nodes-base.if",
      "position": [
        496,
        1520
      ]
    },
    {
      "id": "9f258023-f2df-4722-a23d-48f664e9b4a0",
      "name": "Save Qualified Lead",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        752,
        1376
      ]
    },
    {
      "id": "d916daa6-7c65-42fb-84cb-34733c6a30b5",
      "name": "Save Unqualified Lead",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        752,
        1616
      ]
    },
    {
      "id": "41db010d-81f6-4d39-b5a3-879d4f12bd71",
      "name": "Main Description",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1344,
        1328
      ],
      "parameters": {
        "width": 660,
        "height": 784,
        "content": "## Qualify Lead Lists & Find Professional Emails\n\nDrop a lead list into Google Drive. This workflow reads every row, uses OpenAI to find professional emails, and splits leads into Qualified and Unqual"
      }
    },
    {
      "id": "819bc1a3-4781-4c42-be8f-766942e18f6d",
      "name": "Section - Ingest",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -656,
        1776
      ],
      "parameters": {
        "width": 644,
        "height": 320,
        "content": "### Ingest leads\nWatches a Google Drive folder for new spreadsheets, reads all rows, and normalizes fields into a consistent format."
      }
    },
    {
      "id": "1bfca190-b028-4e0e-8ef6-80531fc8415f",
      "name": "Section - Find Emails",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        1776
      ],
      "parameters": {
        "width": 1180,
        "height": 320,
        "content": "### Find & parse emails\nProcesses leads in batches of 3 with rate limiting. OpenAI searches for a verified professional email and returns email, source, and confidence score."
      }
    },
    {
      "id": "4dd8d3fc-5b8b-48eb-b6b8-9786dab04ef7",
      "name": "Section - Route Results",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        448,
        1280
      ],
      "parameters": {
        "width": 544,
        "height": 484,
        "content": "### Route results\nChecks if a valid email was found. Qualified leads (with email) and unqualified leads (without) are written to separate tabs on the same sheet."
      }
    },
    {
      "id": "477271b1-227c-45a9-b3ef-df985c5ce3a7",
      "name": "Warning",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -656,
        1632
      ],
      "parameters": {
        "width": 244,
        "height": 120,
        "content": "**Dont forget to** Connect your Google Drive, Sheets, and OpenAI credentials and update the folder ID in the trigger node before activating this workflow."
      }
    }
  ],
  "connections": {
    "Batch Leads": {
      "main": [
        [
          {
            "node": "Has Valid Email?",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Find Email via OpenAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Lead Sheet": {
      "main": [
        [
          {
            "node": "Normalize Lead Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has Valid Email?": {
      "main": [
        [
          {
            "node": "Save Qualified Lead",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Save Unqualified Lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rate Limit Delay": {
      "main": [
        [
          {
            "node": "Parse Email Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Lead Data": {
      "main": [
        [
          {
            "node": "Batch Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Email Results": {
      "main": [
        [
          {
            "node": "Batch Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Watch For New Leads": {
      "main": [
        [
          {
            "node": "Read Lead Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Email via OpenAI": {
      "main": [
        [
          {
            "node": "Rate Limit Delay",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}