{
  "name": "Personalized sales outreach from LinkedIn job signals with Apify & Google Gemini",
  "nodes": [
    {
      "id": "0fd7b446-8b69-4fb4-b79e-f69fbe4082ab",
      "name": "Update Sheet with Email",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2560,
        1008
      ]
    },
    {
      "id": "12d544fc-86d7-4cbf-9be7-ed6d4730dbdf",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1936,
        1376
      ]
    },
    {
      "id": "78b63764-9948-40ca-be63-f188ff8faeba",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        2496,
        1376
      ]
    },
    {
      "id": "6e685361-565d-4dc6-9149-a6c2b23fe2c3",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -816,
        160
      ]
    },
    {
      "id": "9af7695c-fb5d-4a23-b7e3-8d26a821b4d1",
      "name": "Remove Duplicates",
      "type": "n8n-nodes-base.removeDuplicates",
      "position": [
        -768,
        496
      ]
    },
    {
      "id": "c1348833-1b28-4270-ae53-4dbcfc93251e",
      "name": "Run the LinkedIn Job Scraper",
      "type": "@apify/n8n-nodes-apify.apify",
      "position": [
        -432,
        96
      ]
    },
    {
      "id": "5e36853c-5e15-42ac-9c7e-95c60aadf9da",
      "name": "Get dataset Items",
      "type": "@apify/n8n-nodes-apify.apify",
      "position": [
        96,
        160
      ]
    },
    {
      "id": "92470dd9-7f01-4795-b36a-8d1553a12e80",
      "name": "Checks Company Size < 250",
      "type": "n8n-nodes-base.if",
      "position": [
        592,
        208
      ]
    },
    {
      "id": "9469d083-1393-4661-bc1a-2626be76b3af",
      "name": "Removes HR Related Industry",
      "type": "n8n-nodes-base.if",
      "position": [
        -400,
        496
      ]
    },
    {
      "id": "13ccb5b9-221b-4be6-ba7c-02c53205fc63",
      "name": "Prepare Final Company Details",
      "type": "n8n-nodes-base.code",
      "position": [
        112,
        496
      ]
    },
    {
      "id": "43d308cf-516a-4acf-8b77-f20a3947f0cb",
      "name": "Checks Domain Existence",
      "type": "n8n-nodes-base.if",
      "position": [
        -800,
        816
      ]
    },
    {
      "id": "c25ec326-deb9-490e-97ab-ebe3521e41a0",
      "name": "Apollo Get Targeted Personnel",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1168,
        1312
      ]
    },
    {
      "id": "b42ec2f9-f178-49e3-aaf8-026fb1b3b360",
      "name": "Apollo Email Finder",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -496,
        1648
      ]
    },
    {
      "id": "dbd59767-6054-4a77-b097-73b537b7404d",
      "name": "Sanitising Email Details",
      "type": "n8n-nodes-base.code",
      "position": [
        16,
        1648
      ]
    },
    {
      "id": "c2d53522-21bb-4d04-b3f5-f6c935356c9a",
      "name": "Structuring Complete Details of Person",
      "type": "n8n-nodes-base.code",
      "position": [
        816,
        896
      ]
    },
    {
      "id": "326bb4c6-ce73-4e76-9576-685319d00b1e",
      "name": "Adding Leads to Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1040,
        560
      ]
    },
    {
      "id": "636f4815-dae0-4628-aa65-775781c405b5",
      "name": "Fetching Leads Data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1488,
        560
      ]
    },
    {
      "id": "bb071500-09fa-492c-a64c-20fdd384e42a",
      "name": "Validates Email Id and Email Content",
      "type": "n8n-nodes-base.if",
      "position": [
        2160,
        576
      ]
    },
    {
      "id": "012dd6c0-612d-4bbb-b690-43282abc2df0",
      "name": "Lead Email Generator",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        2032,
        1008
      ]
    },
    {
      "id": "2c3b430d-d1bb-42d6-ab31-88ced73e58f3",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -912,
        -32
      ],
      "parameters": {
        "width": null,
        "height": 360,
        "content": "## ▶️ Start Workflow\n\n\n**Manually triggers the entire lead generation process.**"
      }
    },
    {
      "id": "0d3f4c5f-c716-40ab-87b3-e5f74f705e65",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -512,
        -176
      ],
      "parameters": {
        "width": 260,
        "height": 440,
        "content": "## Run the LinkedIn Job Scraper from Apify\n\n\nScrape LinkedIn Job Postings:\n\nUses Apify to find companies that are actively hiring based on a specific job search URL."
      }
    },
    {
      "id": "3743dc33-a59f-4ee4-95a2-9956c99c3981",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        16,
        -112
      ],
      "parameters": {
        "width": 260,
        "height": 420,
        "content": "## Get dataset Items\n\nCollect Scraped Data:\n\nRetrieves the list of job postings and company details scraped by Apify."
      }
    },
    {
      "id": "8bb80fc2-cd66-4664-8b44-16fb8776a61c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        -48
      ],
      "parameters": {
        "width": 260,
        "height": 420,
        "content": "## Checks Company Size < 250\n\nFilter by Company Size:\n\nOnly allows companies with fewer than 250 employees to pass through."
      }
    },
    {
      "id": "2425cb33-44ce-411b-a01d-aede93c801b5",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1072,
        496
      ],
      "parameters": {
        "width": null,
        "height": 100,
        "content": "## Rmeove Duplicate Entries\n"
      }
    },
    {
      "id": "e5937705-ff40-41c7-bb0a-3864fac0e9dc",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -448,
        368
      ],
      "parameters": {
        "width": null,
        "height": 120,
        "content": "## Rmeove HR Related Companies"
      }
    },
    {
      "id": "17a39567-8afb-4faa-a29f-ca7522cf3408",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        96,
        368
      ],
      "parameters": {
        "width": null,
        "height": 120,
        "content": "## Prepare Final Company Details"
      }
    },
    {
      "id": "603bc9a8-e1be-49e2-a789-2bc84da68ee2",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -816,
        736
      ],
      "parameters": {
        "width": null,
        "height": 80,
        "content": "## Check domain Existence"
      }
    },
    {
      "id": "ee151293-9743-4df6-bf8c-fab51cf5df10",
      "name": "Limit Companies Search",
      "type": "n8n-nodes-base.limit",
      "position": [
        -128,
        848
      ]
    },
    {
      "id": "6f6e8313-f32e-4bd1-8ff8-973593afd95d",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -176,
        752
      ],
      "parameters": {
        "width": null,
        "height": 80,
        "content": "## Limit Company Search"
      }
    },
    {
      "id": "00d91745-b097-4049-805e-8133294b46fe",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1488,
        1248
      ],
      "parameters": {
        "width": null,
        "height": 260,
        "content": "## Apollo Get Targeted Personnel\n\n\nFind Decision-Makers:\n\nSearches Apollo.io using the company domain to find key contacts (VPs, Directors, etc.)."
      }
    },
    {
      "id": "f7572335-877a-4033-82f8-bb7bda1a38ff",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -848,
        1088
      ],
      "parameters": {
        "width": null,
        "height": 260,
        "content": "## Sanitising Person Details\n\nClean Person Data:\n\nStructures the contact details and removes duplicates to create a clean list of people."
      }
    },
    {
      "id": "786da361-b3f8-45ee-a4d5-4b1a0a00c9c7",
      "name": "Sanitising Person Details",
      "type": "n8n-nodes-base.code",
      "position": [
        -768,
        1360
      ]
    },
    {
      "id": "f847fb0f-f82b-47c9-a493-9e859bc16a4e",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -576,
        1840
      ],
      "parameters": {
        "width": null,
        "height": 260,
        "content": "## Apollo Email Finder\n\nFind Verified Emails:\n\nFor each contact, this node asks Apollo.io to find their professional email address."
      }
    },
    {
      "id": "18a68ac3-c63f-44aa-9169-a080eb1a21ce",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        1840
      ],
      "parameters": {
        "width": null,
        "height": 220,
        "content": "## Sanitising Email Details\n\nIsolate Email Data:\n\nPrepares the found email addresses for merging"
      }
    },
    {
      "id": "2713732b-136d-4f9d-8964-ef5b54adeff6",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        1296
      ],
      "parameters": {
        "width": 280,
        "height": 240,
        "content": "## Merge Data\n\nCombine Data Streams:\n\nMerges the company data, the person data, and the email data together."
      }
    },
    {
      "id": "20fc29b2-1b85-4f55-847f-51161415391b",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        768,
        1056
      ],
      "parameters": {
        "width": 280,
        "height": 240,
        "content": "## Structuring Complete Details of Person\n\nCreate Final Lead Profile:\n\nCombines all three data streams into a single, complete lead record for each person."
      }
    },
    {
      "id": "6a07323e-c5aa-4cfa-8f8b-19662806e35b",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        928,
        352
      ],
      "parameters": {
        "width": 280,
        "height": 240,
        "content": "## Save Leads to Google Sheets\n\nAppends each complete lead profile as a new row in the master spreadsheet."
      }
    },
    {
      "id": "0b81960f-6d52-498d-9bd7-34689431fb88",
      "name": "Sticky Note16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1408,
        336
      ],
      "parameters": {
        "width": 280,
        "height": 260,
        "content": "## Fetching Leads Data\n\nRead Leads for AI:\n\nReads the newly saved leads from the sheet to begin the email generation phase."
      }
    },
    {
      "id": "d19a3c2d-ec40-4263-aa09-799f3ab25e7a",
      "name": "Sticky Note17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2080,
        352
      ],
      "parameters": {
        "width": 280,
        "height": 300,
        "content": "## Validates Email Id and Email Content\n\nCheck Before AI Processing:\n\nFilters for leads that have a valid email but do NOT yet have a generated subject or body."
      }
    },
    {
      "id": "0ccfe835-fc19-4ffa-acf8-644bc6149633",
      "name": "Sticky Note18",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1408,
        1152
      ],
      "parameters": {
        "width": 280,
        "height": 180,
        "content": "## Apply Final Filter\n\nApplies a final condition before sending data to the AI model (e.g., for batching or testing).\n\n"
      }
    },
    {
      "id": "fd60f2ef-f30c-4450-9ce4-273946d0f3ed",
      "name": "Sticky Note19",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1952,
        816
      ],
      "parameters": {
        "width": 360,
        "height": 240,
        "content": "## Lead Email Generator\n\nAI Prompt Engine:\n\nTakes the lead data, combines it with the prompt, and sends it to the Gemini model.\n\n"
      }
    },
    {
      "id": "14f000f8-c23b-43fb-9dc8-53c056d09345",
      "name": "Sticky Note20",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1792,
        1520
      ],
      "parameters": {
        "width": 360,
        "height": 240,
        "content": "## Google Gemini Chat Model\n\nGoogle Gemini Model:\n\nThe AI model that actually writes the email based on the provided data and instructions.\n\n"
      }
    },
    {
      "id": "17ef075d-dde3-4999-9868-f78f867fa322",
      "name": "Sticky Note21",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2448,
        816
      ],
      "parameters": {
        "width": 360,
        "height": 240,
        "content": "## Update Sheet with Email\n\nUpdate Sheet with AI Email:\n\nSaves the generated subject and email body back into the correct row for the lead in Google Sheets.\n\n"
      }
    },
    {
      "id": "d7ec9db4-05eb-4e9c-8916-26b046252611",
      "name": "Sticky Note22",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2416,
        1536
      ],
      "parameters": {
        "width": 360,
        "height": 240,
        "content": "## Structured Output Parser\n\nFormat AI Output:\n\nTakes the raw text from Gemini and structures it into clean JSON (subject and email_body).\n\n"
      }
    },
    {
      "id": "26ab04ae-8f36-4268-ac75-0628e12e321d",
      "name": "Sticky Note23",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2880,
        1200
      ],
      "parameters": {
        "width": 440,
        "height": 240,
        "content": "## Need Help? \n\nWe develop tailored workflow to save youe 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"
      }
    },
    {
      "id": "30bffaa6-f024-4725-a969-06f489de54d1",
      "name": "Merge Data",
      "type": "n8n-nodes-base.merge",
      "position": [
        480,
        1120
      ]
    },
    {
      "id": "db0db762-142e-4ea8-8ff3-f868fd7d262c",
      "name": "Filter for Batching",
      "type": "n8n-nodes-base.filter",
      "position": [
        1520,
        1008
      ]
    }
  ],
  "connections": {
    "Merge Data": {
      "main": [
        [
          {
            "node": "Structuring Complete Details of Person",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get dataset Items": {
      "main": [
        [
          {
            "node": "Checks Company Size < 250",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove Duplicates": {
      "main": [
        [
          {
            "node": "Removes HR Related Industry",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Apollo Email Finder": {
      "main": [
        [
          {
            "node": "Sanitising Email Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetching Leads Data": {
      "main": [
        [
          {
            "node": "Validates Email Id and Email Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter for Batching": {
      "main": [
        [
          {
            "node": "Lead Email Generator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Lead Email Generator": {
      "main": [
        [
          {
            "node": "Update Sheet with Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Adding Leads to Sheets": {
      "main": [
        [
          {
            "node": "Fetching Leads Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit Companies Search": {
      "main": [
        [
          {
            "node": "Merge Data",
            "type": "main",
            "index": 0
          },
          {
            "node": "Apollo Get Targeted Personnel",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Checks Domain Existence": {
      "main": [
        [
          {
            "node": "Limit Companies Search",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Lead Email Generator",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Sanitising Email Details": {
      "main": [
        [
          {
            "node": "Merge Data",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Lead Email Generator",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Checks Company Size < 250": {
      "main": [
        [
          {
            "node": "Remove Duplicates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sanitising Person Details": {
      "main": [
        [
          {
            "node": "Apollo Email Finder",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Removes HR Related Industry": {
      "main": [
        [
          {
            "node": "Prepare Final Company Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run the LinkedIn Job Scraper": {
      "main": [
        [
          {
            "node": "Get dataset Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Apollo Get Targeted Personnel": {
      "main": [
        [
          {
            "node": "Sanitising Person Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Final Company Details": {
      "main": [
        [
          {
            "node": "Checks Domain Existence",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validates Email Id and Email Content": {
      "main": [
        [
          {
            "node": "Filter for Batching",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Run the LinkedIn Job Scraper",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structuring Complete Details of Person": {
      "main": [
        [
          {
            "node": "Adding Leads to Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}