{
  "name": "AI-powered lead generation system with email personalization and LinkedIn",
  "nodes": [
    {
      "id": "527f31ed-e87c-450e-8db9-befe4f560c29",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -2220,
        2160
      ]
    },
    {
      "id": "b091d1d3-4a86-4464-88cb-9bba8247f631",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -1800,
        2160
      ]
    },
    {
      "id": "591dd146-f7c5-4327-991f-553f95ff2507",
      "name": "Companies Recovery",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1360,
        2160
      ]
    },
    {
      "id": "4cee9f5e-762b-40e3-850d-4bea4e358aa2",
      "name": "Filter Score and State",
      "type": "n8n-nodes-base.filter",
      "position": [
        -1160,
        2160
      ]
    },
    {
      "id": "ab23d372-06ec-4351-8f9f-b9ed5779db86",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -640,
        2160
      ]
    },
    {
      "id": "26d91167-6488-4a90-b7e1-fc46a22f58aa",
      "name": "Find Employees",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -420,
        2160
      ]
    },
    {
      "id": "af94a547-1dd5-4d28-8375-0afe92f3994c",
      "name": "Check profiles Found",
      "type": "n8n-nodes-base.if",
      "position": [
        -200,
        2160
      ]
    },
    {
      "id": "f776e58c-ec9f-4317-bdc8-754d35b7e424",
      "name": "Split Profiles",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        40,
        2160
      ]
    },
    {
      "id": "a0935fd0-b693-49de-a90f-a1d2085d947d",
      "name": "Get Email",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        480,
        2160
      ]
    },
    {
      "id": "495a8283-e3c0-4ea2-9acb-548125c2ce8f",
      "name": "Get Profile details",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        260,
        2160
      ]
    },
    {
      "id": "e1490ca1-2909-458b-958d-209a93c80317",
      "name": "Create Personalization",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1020,
        2160
      ]
    },
    {
      "id": "e1d18c75-9695-402d-aadd-ec9a7730b5e5",
      "name": "Generate Emails Messages",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1380,
        2160
      ]
    },
    {
      "id": "e0b48005-689d-4787-8d82-d9c9a79f0141",
      "name": "Generate Emails Subjects",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1740,
        2160
      ]
    },
    {
      "id": "a3cb6e48-6ca4-40f0-9b1a-0afae64f33e8",
      "name": "Keep relevant information",
      "type": "n8n-nodes-base.code",
      "position": [
        700,
        2160
      ]
    },
    {
      "id": "3cb270ad-30aa-4d8d-a405-cf85c8f45d80",
      "name": "Add lead(s)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2100,
        2160
      ]
    },
    {
      "id": "f87cffea-66d2-4839-b99a-bf3cf327967c",
      "name": "Lead(s) found",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2300,
        2160
      ]
    },
    {
      "id": "46d11554-545b-4eef-89df-462c1cf3f5af",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2300,
        1880
      ],
      "parameters": {
        "width": 1520,
        "height": 460,
        "content": "## Data recovery\nHere, we retrieve the companies from the first automation, filtering them by their score (min. 7). Feel free to remove this filter or modify it. However, it is mandatory to keep the s"
      }
    },
    {
      "id": "81f67e40-ccd2-405a-8498-46b7e2061076",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        1880
      ],
      "parameters": {
        "width": 1600,
        "height": 460,
        "content": "## Find the decision makers\nHere, for each company, we find the decision-makers (you can customize the job titles in the Google Sheet), then we enrich each profile, and finally, we find their email.\n\n"
      }
    },
    {
      "id": "6c4e2ff0-b274-4ced-837c-2793221820bd",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        940,
        1880
      ],
      "parameters": {
        "width": 1560,
        "height": 460,
        "content": "## Email generation and storage\nIn this section, we generate the cold email sequence, then store all the information in our Google Sheet, and finally, update the company's status.\n\nFor more context an"
      }
    },
    {
      "id": "8d0d97aa-ec10-44ba-a772-cf68d5f4c657",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -120,
        2340
      ],
      "parameters": {
        "width": 400,
        "height": 260,
        "content": "## Exit"
      }
    },
    {
      "id": "df380fac-a327-4ab0-91fa-8686389b4bfe",
      "name": "Limit",
      "type": "n8n-nodes-base.limit",
      "position": [
        -960,
        2160
      ]
    },
    {
      "id": "4b52c6a4-a050-45d3-918b-f23df9f97bc7",
      "name": "Process Each Company",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        20,
        1100
      ]
    },
    {
      "id": "9f18ad76-89d8-452c-ad18-bd86c5559177",
      "name": "Get Company Info",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        240,
        1100
      ]
    },
    {
      "id": "51553d5e-f61f-4c23-b390-c3f6a2d92b76",
      "name": "Filter Valid Companies",
      "type": "n8n-nodes-base.if",
      "position": [
        440,
        1100
      ]
    },
    {
      "id": "c0fea429-5620-440f-bdc9-fc1d7ee32dbf",
      "name": "Is New Company?",
      "type": "n8n-nodes-base.if",
      "position": [
        880,
        1100
      ]
    },
    {
      "id": "bf81fc2b-3bfc-4e83-a9fc-c997db7eee01",
      "name": "Search Companies",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -500,
        1100
      ]
    },
    {
      "id": "5edc2d62-71a0-46d2-96ab-6cc70d6e37c0",
      "name": "Extract Company Data",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -300,
        1100
      ]
    },
    {
      "id": "26a2cfb1-a4e8-49cd-ac1b-9f9db5dc78b6",
      "name": "Check If Company Exists",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        660,
        1100
      ]
    },
    {
      "id": "0aa49615-1e7a-4c3a-85d8-9756fb67881e",
      "name": "AI Company Scoring",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1220,
        1100
      ]
    },
    {
      "id": "ed5f6a15-5284-4594-8aca-86327038bc8c",
      "name": "Add Company to CRM",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1580,
        1100
      ]
    },
    {
      "id": "bd105774-d426-459d-8f50-ea0a4bcf95aa",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1700,
        820
      ],
      "parameters": {
        "width": 1580,
        "height": 460,
        "content": "## LinkedIn company search\nThis section initiates the workflow and searches for your target companies on LinkedIn using the Ghost Genius API.\n\nYou can filter and refine your search by customizing the "
      }
    },
    {
      "id": "8e641e38-a6c4-4768-a640-346db5044b74",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1120,
        820
      ],
      "parameters": {
        "width": 680,
        "height": 460,
        "content": "## AI scoring and storage\nThis section scores the company and stores it in a Google Sheet.\n\nIt's important to properly fill in the \"Settings\" sheet at the beginning of the workflow to get a result rel"
      }
    },
    {
      "id": "10bb1319-98b9-45fd-8f35-b127b6bc97a8",
      "name": "Aggregate1",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -1220,
        1100
      ]
    },
    {
      "id": "2d73b959-0088-455d-8af7-16e834e3f051",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -60,
        820
      ],
      "parameters": {
        "width": 1120,
        "height": 460,
        "content": "## Company data processing \nThis section processes each company individually.\n\nWe retrieve all the company information using Get Company Details by using the LinkedIn link obtained from the previous s"
      }
    },
    {
      "id": "f7d3e1fd-580f-4b21-8c62-8c614897f9e6",
      "name": "Start",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1620,
        1100
      ]
    },
    {
      "id": "084a6aae-552e-42de-a363-987a1aedc55e",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1820,
        680
      ],
      "parameters": {
        "width": 3820,
        "height": 920,
        "content": "# Search LinkedIn companies, score them with AI, and send to your CRM"
      }
    },
    {
      "id": "5f1e2de8-10cd-421a-806b-b3895c9618a9",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2380,
        1740
      ],
      "parameters": {
        "width": 5000,
        "height": 920,
        "content": "# Find decision-makers, get verified emails, and generate 3 cold emails with AI\n"
      }
    },
    {
      "id": "d14c5fe0-d645-4633-8b9f-90b41ec46386",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1000,
        140
      ],
      "parameters": {
        "width": 720,
        "height": 420,
        "content": "## Introduction\nWelcome to my template! Before explaining how to set it up, here's some **important information:**\n\nThis template is divided into two automations that complement each other.\n\nThe first"
      }
    },
    {
      "id": "c231d4b7-49ff-4bb7-95a0-be2061b1cc8e",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -220,
        140
      ],
      "parameters": {
        "width": 600,
        "height": 420,
        "content": "## Setup\n- **[Watch this video](https://www.youtube.com/watch?v=0EsdmETsZGE)**\n\n- Create a copy of this [Google Sheet](https://docs.google.com/spreadsheets/d/1j8AHiPiHEXVOkUhO2ms-lw1Ygu1eWIWW-8Qe1OoHp"
      }
    },
    {
      "id": "6fe93d40-8512-4ace-9e30-402acbf93e49",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        440,
        140
      ],
      "parameters": {
        "width": 600,
        "height": 420,
        "content": "## Tools \n**(You can use the API and CRM of your choice; this is only a suggestion)**\n\n- API Linkedin: [Ghost Genius API](https://ghostgenius.fr) \n\n- API Documentation: [Documentation](https://ghostge"
      }
    },
    {
      "id": "1c0cc83e-d59e-486e-9131-09949c58930b",
      "name": "Make the perfect request",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -860,
        1100
      ]
    },
    {
      "id": "ab27f2a8-0ac3-4450-96c8-be0a21dd18ce",
      "name": "Get Settings",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1420,
        1100
      ]
    },
    {
      "id": "fe218ee4-c06b-48c0-b47f-db5321fbfe39",
      "name": "Get Settings1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -2020,
        2160
      ]
    },
    {
      "id": "c4ad0b09-a510-45f8-a851-3b01ea95ef8e",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -1060,
        1100
      ]
    },
    {
      "id": "bb99d5d0-0e6e-4346-9167-433775e80bb3",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -920,
        1280
      ],
      "parameters": {
        "width": 400,
        "height": 260,
        "content": "## Exit"
      }
    },
    {
      "id": "da3811ad-fcd2-47db-afa9-fe1bfca1ce51",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1500,
        2340
      ],
      "parameters": {
        "width": 400,
        "height": 260,
        "content": "## Exit"
      }
    },
    {
      "id": "e4ed5a84-f464-40d2-b1ff-eb3059270d77",
      "name": "If1",
      "type": "n8n-nodes-base.if",
      "position": [
        -1600,
        2160
      ]
    },
    {
      "id": "3921bf36-d8a9-4864-b1e7-4891f4aaeed2",
      "name": "Missing API Key or Account ID1",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        -1340,
        2420
      ]
    },
    {
      "id": "2dc2a7e0-380f-4182-babe-06de9445f78d",
      "name": "Missing API Key or Account ID",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        -760,
        1360
      ]
    },
    {
      "id": "7285df69-42cf-4df5-8d5e-1efcddd9683a",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        0
      ],
      "parameters": {
        "width": 300,
        "height": 80,
        "content": "# [Free Assistance](https://cal.com/soufiane-ghostgenius/workflows-setup-x-ghost-genius-copy)"
      }
    },
    {
      "id": "02a044ae-38a5-4141-a2d8-fdcd025c3ccc",
      "name": "No decision maker found",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        40,
        2420
      ]
    },
    {
      "id": "2a7cdc10-da88-4c49-95d7-efa8c6e75de5",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -220,
        0
      ],
      "parameters": {
        "width": null,
        "height": 80,
        "content": "# [Setup Video](https://www.youtube.com/watch?v=0EsdmETsZGE)"
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Make the perfect request",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Missing API Key or Account ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "Companies Recovery",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Missing API Key or Account ID1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start": {
      "main": [
        [
          {
            "node": "Get Settings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Email": {
      "main": [
        [
          {
            "node": "Keep relevant information",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate1": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add lead(s)": {
      "main": [
        [
          {
            "node": "Lead(s) found",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Settings": {
      "main": [
        [
          {
            "node": "Aggregate1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Settings1": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Lead(s) found": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Employees": {
      "main": [
        [
          {
            "node": "Check profiles Found",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Profiles": {
      "main": [
        [
          {
            "node": "Get Profile details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is New Company?": {
      "main": [
        [
          {
            "node": "AI Company Scoring",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Process Each Company",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Find Employees",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Company Info": {
      "main": [
        [
          {
            "node": "Filter Valid Companies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get Settings1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Companies": {
      "main": [
        [
          {
            "node": "Extract Company Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Company Scoring": {
      "main": [
        [
          {
            "node": "Add Company to CRM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add Company to CRM": {
      "main": [
        [
          {
            "node": "Process Each Company",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Companies Recovery": {
      "main": [
        [
          {
            "node": "Filter Score and State",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Profile details": {
      "main": [
        [
          {
            "node": "Get Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check profiles Found": {
      "main": [
        [
          {
            "node": "Split Profiles",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No decision maker found",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Company Data": {
      "main": [
        [
          {
            "node": "Process Each Company",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Each Company": {
      "main": [
        [],
        [
          {
            "node": "Get Company Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Personalization": {
      "main": [
        [
          {
            "node": "Generate Emails Messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Score and State": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Valid Companies": {
      "main": [
        [
          {
            "node": "Check If Company Exists",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Process Each Company",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check If Company Exists": {
      "main": [
        [
          {
            "node": "Is New Company?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "No decision maker found": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Emails Messages": {
      "main": [
        [
          {
            "node": "Generate Emails Subjects",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Emails Subjects": {
      "main": [
        [
          {
            "node": "Add lead(s)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Make the perfect request": {
      "main": [
        [
          {
            "node": "Search Companies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Keep relevant information": {
      "main": [
        [
          {
            "node": "Create Personalization",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}