{
  "name": "Scrape Apollo leads with BrowserAct, draft Gemini emails, and save to Sheets",
  "nodes": [
    {
      "id": "84aa57d5-f612-41d0-922a-afb68c84da7a",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -64,
        -672
      ],
      "parameters": {
        "width": 1814,
        "height": 832,
        "content": "\n\nThis workflow creates a fully automated B2B lead generation & outreach pipeline. It combines **BrowserAct** (for scraping) with **Google Gemini AI** (for writing) to automate the entire prospecting "
      }
    },
    {
      "id": "bb066dca-a05a-4798-a048-554398681909",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -64,
        160
      ],
      "parameters": {
        "width": 400,
        "height": 320,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\nTitle: Data collection\n\nText: Accepts target role and location inputs via a form, then triggers a BrowserAct workflow to perform a real-browser search and scrape contact data from Apollo."
      }
    },
    {
      "id": "fabd1269-acaa-406e-9bc9-4b9dcdaf3c07",
      "name": "Receive Lead Criteria",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        0,
        112
      ]
    },
    {
      "id": "eb461384-7ed7-443a-a09c-1060e76134b8",
      "name": "Scrape Apollo via BrowserAct",
      "type": "n8n-nodes-browseract.browserAct",
      "position": [
        192,
        112
      ]
    },
    {
      "id": "6a962e82-03de-430f-8f1c-e8a26b15f291",
      "name": "Clean & Flatten JSON",
      "type": "n8n-nodes-base.code",
      "position": [
        400,
        112
      ]
    },
    {
      "id": "fae89d3e-4bbd-4f7b-8182-9ce6fa79be32",
      "name": "Map Columns",
      "type": "n8n-nodes-base.set",
      "position": [
        1136,
        112
      ]
    },
    {
      "id": "d231f3f9-e3cf-428d-83f8-7abfe613df47",
      "name": "Save to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1344,
        112
      ]
    },
    {
      "id": "a82c3e62-5381-44de-bff5-a2836eebe854",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        336,
        160
      ],
      "parameters": {
        "width": 944,
        "height": 320,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n**Title:** AI Enrichment & Processing\n\n**Text:**\n1. **Clean:** Standardizes the raw scraped JSON data.\n2. **AI Write:** Uses **Google Gemini** to analyze each lead and generate a personal"
      }
    },
    {
      "id": "325d49e5-9b43-45d0-ae60-b02d58d5996f",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1280,
        160
      ],
      "parameters": {
        "width": 464,
        "height": 320,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n**Title:** Storage & Notification\n\n**Text:**\n1. **Save:** Appends the verified lead profile + AI email draft to **Google Sheets**.\n2. **Notify:** Sends a summary report to your **Gmail** o"
      }
    },
    {
      "id": "91918acc-424b-414f-a844-ab0b8232961f",
      "name": "Basic LLM Chain",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        592,
        112
      ]
    },
    {
      "id": "bd333a82-bbe9-414a-8294-a3600b362f09",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        736,
        240
      ]
    },
    {
      "id": "da01a792-359a-4df8-995c-85488ad3bba0",
      "name": "Send a message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1552,
        112
      ]
    },
    {
      "id": "2e075597-3f31-460e-9ff2-cfe9d3206c48",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        912,
        -48
      ]
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Map Columns",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Map Columns": {
      "main": [
        [
          {
            "node": "Save to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Basic LLM Chain": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Clean & Flatten JSON": {
      "main": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive Lead Criteria": {
      "main": [
        [
          {
            "node": "Scrape Apollo via BrowserAct",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save to Google Sheets": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Scrape Apollo via BrowserAct": {
      "main": [
        [
          {
            "node": "Clean & Flatten JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}