{
  "name": "Generate personalized sales emails with LinkedIn data & Claude 3.7 via OpenRouter",
  "nodes": [
    {
      "id": "ad859b3e-dc9e-4016-b9c5-3585eb2fb43e",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -240,
        -100
      ]
    },
    {
      "id": "cb022f15-5f65-4e14-885e-ab394c3b56ef",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        820,
        -80
      ]
    },
    {
      "id": "b358d396-0a34-41fe-9b54-038b0e8256d8",
      "name": "Only People Links",
      "type": "n8n-nodes-base.filter",
      "position": [
        620,
        -80
      ]
    },
    {
      "id": "7b52cb25-50bf-4398-96d5-ee38dc978576",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        380,
        -240
      ],
      "parameters": {
        "width": 840,
        "height": 400,
        "content": "## Get Person Profile data from LinkedIn\n- Apify => Google search for \"{{ First Name }} {{ Last Name }} {{ Company }} site:linkedin.com\"\n- Does a RegEx to filter people pages (assumes the first result"
      }
    },
    {
      "id": "3d49a9fb-1a85-4bf1-9d82-5afa85b7dc2b",
      "name": "Aggregate1",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1000,
        500
      ]
    },
    {
      "id": "0d529556-abca-44ee-8f59-35d7c0458a38",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        380,
        200
      ],
      "parameters": {
        "width": 1300,
        "height": 520,
        "content": "## Get Company Profile data from LinkedIn\n- Apify => Google search for {{ Company }} site:linkedin.com\n- Does a RegEx to filter company pages (assumes the first result is correct)\n- Apify => Fetch mat"
      }
    },
    {
      "id": "5f9cda61-14be-4af2-aa7c-442ca90d7941",
      "name": "Get LinkedIn Person",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1000,
        0
      ]
    },
    {
      "id": "8b725ed1-8595-4cf2-80d4-fadb5e2a344e",
      "name": "Only Company Links",
      "type": "n8n-nodes-base.filter",
      "position": [
        820,
        500
      ]
    },
    {
      "id": "bf62897a-7f7c-45dc-b142-dd34f30a0a09",
      "name": "Current Company Exists?",
      "type": "n8n-nodes-base.if",
      "position": [
        400,
        360
      ]
    },
    {
      "id": "20b6b7d5-4082-4f38-a596-7c36fa46020d",
      "name": "Google Search for Company LinkedIn",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        620,
        500
      ]
    },
    {
      "id": "425bb1e7-6fa3-46f7-91b1-137d76c27a50",
      "name": "Google Search for Person LinkedIn",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        420,
        -80
      ]
    },
    {
      "id": "e72d6c81-2bb8-4d10-86f3-51dabae509c9",
      "name": "Get LinkedIn Company",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1460,
        560
      ]
    },
    {
      "id": "fe92e0aa-7b45-4355-81ec-5a7531816637",
      "name": "Get Leads",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -40,
        -100
      ]
    },
    {
      "id": "562dab6b-7aeb-436c-8573-821f330c55c5",
      "name": "Set Company URL",
      "type": "n8n-nodes-base.set",
      "position": [
        1200,
        340
      ]
    },
    {
      "id": "3b1f1c2a-1c7b-4419-8954-99ab719f1a15",
      "name": "Set Company URL1",
      "type": "n8n-nodes-base.set",
      "position": [
        1200,
        500
      ]
    },
    {
      "id": "a0802c94-1b9c-44bf-a454-5a17ec5d0a85",
      "name": "Generate Personalized Email",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        560,
        900
      ]
    },
    {
      "id": "24c40f62-d345-477d-b8ae-a56b37f8df5a",
      "name": "OpenRouter Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        560,
        1060
      ]
    },
    {
      "id": "6b3dc07d-0eb0-4017-b2d6-698b81996578",
      "name": "Gmail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        900,
        1060
      ]
    },
    {
      "id": "141db351-ecd4-42ea-92f0-0f5645c00e26",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        380,
        760
      ],
      "parameters": {
        "width": 720,
        "height": 460,
        "content": "## Write + Send the email\n- SET YOUR DATA HERE\n- LLM drafts your email\n- Send the enail from your Gmail account"
      }
    },
    {
      "id": "ed19dc93-966d-431d-b13a-2cba3c5d8e63",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        880
      ],
      "parameters": {
        "width": 190,
        "height": 220,
        "content": "## Set your data\nSet data about your company here so that the bot will customize your offer based on your lead."
      }
    },
    {
      "id": "1ea7f29d-393f-4631-9dc7-ab37f1d93188",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        720,
        1060
      ]
    },
    {
      "id": "89554e8e-5516-4341-bf52-2c9c834bda29",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        180,
        -100
      ]
    },
    {
      "id": "d6fd7250-7536-48f6-9add-cf60af83f141",
      "name": "Set Data",
      "type": "n8n-nodes-base.set",
      "position": [
        400,
        900
      ]
    }
  ],
  "connections": {
    "Gmail": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Data": {
      "main": [
        [
          {
            "node": "Generate Personalized Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Get LinkedIn Person",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Leads": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate1": {
      "main": [
        [
          {
            "node": "Set Company URL1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Google Search for Person LinkedIn",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Company URL": {
      "main": [
        [
          {
            "node": "Get LinkedIn Company",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Company URL1": {
      "main": [
        [
          {
            "node": "Get LinkedIn Company",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Only People Links": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Only Company Links": {
      "main": [
        [
          {
            "node": "Aggregate1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get LinkedIn Person": {
      "main": [
        [
          {
            "node": "Current Company Exists?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get LinkedIn Company": {
      "main": [
        [
          {
            "node": "Set Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Personalized Email",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Current Company Exists?": {
      "main": [
        [
          {
            "node": "Set Company URL",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Google Search for Company LinkedIn",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Generate Personalized Email",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Generate Personalized Email": {
      "main": [
        [
          {
            "node": "Gmail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Search for Person LinkedIn": {
      "main": [
        [
          {
            "node": "Only People Links",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Search for Company LinkedIn": {
      "main": [
        [
          {
            "node": "Only Company Links",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Get Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}