{
  "name": "Automate lead gen & email outreach with Apify, Apollo.io, GPT-4 & Google Sheets",
  "nodes": [
    {
      "id": "f2504ef0-8458-46c6-9816-0258404752da",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1660,
        740
      ]
    },
    {
      "id": "2c8e08d1-cf17-4a75-ae44-5ffa8d8da861",
      "name": "Run an Actor",
      "type": "@apify/n8n-nodes-apify.apify",
      "position": [
        -1220,
        680
      ]
    },
    {
      "id": "0b75e57c-d4aa-4dd7-b9da-22096b93082d",
      "name": "Get dataset items",
      "type": "@apify/n8n-nodes-apify.apify",
      "position": [
        -780,
        660
      ]
    },
    {
      "id": "d7748505-cf02-43bc-8c26-e5ce17728335",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        1180,
        1140
      ]
    },
    {
      "id": "3b082405-c1c2-4372-959f-cfecae090642",
      "name": "Apollo - Get Company Details",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1320,
        1380
      ]
    },
    {
      "id": "3fe3b835-d09a-4390-85d2-08627f91521a",
      "name": "Code1",
      "type": "n8n-nodes-base.code",
      "position": [
        720,
        1340
      ]
    },
    {
      "id": "acfae4be-9ccd-4a69-9350-da9c4a75e3f4",
      "name": "Get Email",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        440,
        820
      ]
    },
    {
      "id": "53b2536e-1250-4adc-84cd-fa9c788c9e6e",
      "name": "Apollo - Get User",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -760,
        1380
      ]
    },
    {
      "id": "3fdf95ad-c64f-4498-86d6-af8392cfdaa1",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        160,
        1640
      ]
    },
    {
      "id": "5b5b807b-aa77-4574-b5a8-ee3f364daeb8",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -200,
        840
      ]
    },
    {
      "id": "fa4b43de-f7f9-4d80-b3dd-77edbf0c63b2",
      "name": "Get row(s) in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2320,
        1080
      ]
    },
    {
      "id": "af218570-e707-4447-b156-b45cd0e4d904",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        2780,
        1060
      ]
    },
    {
      "id": "69abd956-6f0d-4be4-a515-3d17b63bdc85",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        3340,
        1220
      ]
    },
    {
      "id": "0e77fe58-69c4-4256-adb1-d68a38161c69",
      "name": "Message a model",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        3320,
        840
      ]
    },
    {
      "id": "937f0554-0d59-4c09-ae16-a04dc9988779",
      "name": "Update row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        4040,
        1140
      ]
    },
    {
      "id": "80bad05a-ecc2-4527-ad29-4fcd9826950a",
      "name": "Append or update row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1800,
        1100
      ]
    },
    {
      "id": "9b8c0620-1ed3-49db-a1c9-c6b640b67512",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1740,
        520
      ],
      "parameters": {
        "width": 280,
        "height": 380,
        "content": "## Click to Execute flow \n\n**Step 1: Start the workflow\n \n\n\nThis node manually triggers the entire lead generation and outreach process.\n"
      }
    },
    {
      "id": "7bd61df1-ad56-4507-8807-967fa98b6479",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1320,
        340
      ],
      "parameters": {
        "width": 320,
        "height": 520,
        "content": "## Run the Actor from Apify\n\n**Step 2: Scrape Funded Companies from Crunchbase\n \n\n\nThis node runs an Apify Actor to scrape a predefined Crunchbase search for recently funded companies.\n\n It automatica"
      }
    },
    {
      "id": "00c86e8d-1564-4f54-b7cc-d8a2aa305f74",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -900,
        340
      ],
      "parameters": {
        "width": 320,
        "height": 520,
        "content": "## Get dataset items\n\n**Step 3:  Collect the Scraped Company Data \n \n\n\nThis node retrieves the list of companies that the Apify Actor successfully scraped in the previous step.\n\nIt gathers the raw dat"
      }
    },
    {
      "id": "e9ddee77-9282-4f66-a7fc-32dd1acf13cb",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1360,
        1020
      ],
      "parameters": {
        "width": 340,
        "height": 560,
        "content": "## Apollo - Get Company Details\n\n**Step 4:  Enrich Company Details via Apollo.io\n \n\n\nThis node takes each company name from the Apify data and searches for it in Apollo.io to retrieve its full profile"
      }
    },
    {
      "id": "7e3c86e0-2ef5-4cdc-8584-58cc01b3cf38",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -860,
        1000
      ],
      "parameters": {
        "width": 320,
        "height": 580,
        "content": "## Apollo - Apollo - Get User\n\n**Step 5:  Find Key Decision-Makers\n \n\n\nUsing the company domain from the previous step, this node searches Apollo.io for specific people based on seniority (VP, Head, D"
      }
    },
    {
      "id": "af647a84-677a-4912-98a8-daf504337cef",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        540
      ],
      "parameters": {
        "width": 320,
        "height": 440,
        "content": "## Split Out\n\n**Step 6:  Process Each Person Individually\n \n\nThe previous node returns a list of people for each company. This node splits that list so that every individual person becomes a separate "
      }
    },
    {
      "id": "137a82c4-3d2c-44b7-a118-00753065f90c",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        300,
        580
      ],
      "parameters": {
        "width": 320,
        "height": 400,
        "content": "## Get Email\" (Apollo)\n\n**Step 7:  Find the Contact's Email Address\n \n\nFor each individual person, this node makes a specific API call to Apollo.io to find and verify their professional email address."
      }
    },
    {
      "id": "9e0ffc63-30dd-43a9-bdfa-39eb5ea18942",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        100,
        1400
      ],
      "parameters": {
        "width": 320,
        "height": 400,
        "content": "## Merge\n\n**Step 8:  Re-combine People & Emails\n \n\nThis node brings together the initial list of people with the email addresses found in the previous step, ensuring all data is correctly associated."
      }
    },
    {
      "id": "b713e67f-db31-4007-9169-17a780c7fde8",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        620,
        1080
      ],
      "parameters": {
        "width": 320,
        "height": 400,
        "content": "## Code1 node\n\n**Step 9:   Consolidate Enriched Data\n \n\nThis custom JavaScript node cleanly merges the company data, people data, and the newly found emails into a unified structure."
      }
    },
    {
      "id": "82989a4f-5442-40a1-a72f-bb3a928fd69c",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1060,
        840
      ],
      "parameters": {
        "width": 300,
        "height": 440,
        "content": "## Code node\n\n**Step 10:  Structure Data for Google Sheets.\n\n \nThis node takes all the enriched information and formats it into a final, clean JSON object, mapping each piece of data (e.g., company.na"
      }
    },
    {
      "id": "abe48428-0004-42ef-985c-671fd4a4b7d3",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1680,
        840
      ],
      "parameters": {
        "width": 320,
        "height": 440,
        "content": "## Append or update row in sheet\n\n**Step 11:  Build the Master Lead List in Google Sheets\n\nThis node takes the structured lead data and adds it as a new row to your master Google Sheet, creating your "
      }
    },
    {
      "id": "520c24d2-44d4-4cf5-b33d-cbcb4bb33123",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2200,
        820
      ],
      "parameters": {
        "width": 320,
        "height": 440,
        "content": "## Get row(s) in sheet\n\n**Step 12:  Read Leads for AI Email Generation\n\nAfter building the list, this node reads all the rows back from the Google Sheet to begin the second phase of the workflow: emai"
      }
    },
    {
      "id": "c018d50c-de9d-4d51-86f3-b180c66f5909",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2680,
        780
      ],
      "parameters": {
        "width": 320,
        "height": 440,
        "content": "## IF Node\n\n**Step 13:  Check if Email Is Already Written\n\nThis node checks a simple but critical condition: is the \"Personalised Email\" column for this lead empty?\n\nIt prevents the workflow from over"
      }
    },
    {
      "id": "12fc8c2a-3d48-4eaa-904a-c2eef1a06ec2",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3280,
        480
      ],
      "parameters": {
        "width": 320,
        "height": 480,
        "content": "## Message a model\" (OpenAI)\n\n**Step 14:   Generate AI-Personalized Email\n\nIf the email column is empty, this node sends the lead's data (company, job title, industry) to OpenAI (GPT-4) with a detaile"
      }
    },
    {
      "id": "22211539-ad4e-4dc2-ac44-ee3fd101b0c0",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3920,
        820
      ],
      "parameters": {
        "width": 320,
        "height": 480,
        "content": "## Update row in sheet\n\n**Step 15:   Save the AI Email to the Sheet\n\nOnce OpenAI generates the email, this node updates the lead's row in Google Sheets, pasting the new email content into the \"Persona"
      }
    },
    {
      "id": "50bed6ba-c33a-4538-8c1b-9da913b25368",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3500,
        1420
      ],
      "parameters": {
        "width": 320,
        "height": 320,
        "content": "## Need Help?\n\n\nWe develop tailored workflow to save your valuable time. Should you have any questions or wish to explore more custom automation solutions, we would be happy to connect\n\n\n### Email: ge"
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Message a model",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code": {
      "main": [
        [
          {
            "node": "Append or update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code1": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Code1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Email": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Get Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run an Actor": {
      "main": [
        [
          {
            "node": "Get dataset items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Message a model": {
      "main": [
        [
          {
            "node": "Update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Apollo - Get User": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get dataset items": {
      "main": [
        [
          {
            "node": "Apollo - Get Company Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Apollo - Get Company Details": {
      "main": [
        [
          {
            "node": "Apollo - Get User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append or update row in sheet": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Run an Actor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}