{
  "name": "Generate personalized cold email icebreakers with GPT-4 Mini, Apify & LinkedIn",
  "nodes": [
    {
      "id": "49891093-0149-475d-ad6a-b80832087c47",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -48,
        80
      ]
    },
    {
      "id": "947b70ae-4cab-4c36-b4f4-27d36d78915e",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        864,
        80
      ]
    },
    {
      "id": "5f132e78-5a48-45b2-a777-87983fb5a647",
      "name": "Call Apify LinkedIn API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1408,
        96
      ]
    },
    {
      "id": "b411411c-96b9-48b8-8d4d-b4884912336c",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1632,
        96
      ]
    },
    {
      "id": "e8a9b61d-4cf8-4b0e-a10d-ba83d212ae07",
      "name": "Generate Personalized Icebreaker",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2192,
        96
      ]
    },
    {
      "id": "50ae1e60-f2cb-491e-8d02-20d8c31e91e6",
      "name": "Append Enriched Icebreaker",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1888,
        656
      ]
    },
    {
      "id": "7263e986-8992-4f26-9df1-4c00a1a0d73a",
      "name": "Update Un-enriched List",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2320,
        656
      ]
    },
    {
      "id": "1bc1dfa6-e4b3-45d4-b30c-9b953c21a0b5",
      "name": "hasEmail?",
      "type": "n8n-nodes-base.filter",
      "position": [
        480,
        80
      ]
    },
    {
      "id": "1abc54ec-ae6b-460c-b560-d5e2bef27458",
      "name": "Simplify Fields for AI Agent",
      "type": "n8n-nodes-base.set",
      "position": [
        1952,
        96
      ]
    },
    {
      "id": "330e4c8f-376d-4738-87ee-50877f64f162",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -864,
        -304
      ],
      "parameters": {
        "width": 672,
        "height": 720,
        "content": "\n## Cold Email Icebreaker for Personalization\n\nThis workflow does the following tasks:\n\n1. Takes in your raw leads - You might get these leads from anywhere. For best case, get your leads from Apollo "
      }
    },
    {
      "id": "3c4c4919-81c6-4ad5-a7dd-594271fd59c1",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        -96
      ],
      "parameters": {
        "width": 560,
        "height": 400,
        "content": "## Pre-process raw leads\n- Connect your Google Sheet account with n8n.\n- Choose the file that contains your downloaded CSV raw lead.\n- Discard leads that do not have work email"
      }
    },
    {
      "id": "7b97c7f6-4d1e-4cd3-a73e-3f9894e340d7",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1120,
        -96
      ],
      "parameters": {
        "width": 672,
        "height": 400,
        "content": "## Get data from LinkedIn, and clean it.\nIn the \"Set Apify Tokens\" Node do the following: \n1. set the apifyAPIKey with your own Apify API key [(get it from here)](https://console.apify.com/settings/in"
      }
    },
    {
      "id": "2651f7b6-fd1f-41cd-bb78-68046d3a8bab",
      "name": "Get Raw Un-enriched Leads",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        256,
        80
      ]
    },
    {
      "id": "1754f0ae-6be9-4a8a-9087-fa41824fd999",
      "name": "Set Apify Tokens",
      "type": "n8n-nodes-base.set",
      "position": [
        1200,
        96
      ]
    },
    {
      "id": "93c3718a-df70-4dc2-ad86-5db621f0984c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1840,
        -96
      ],
      "parameters": {
        "width": 672,
        "height": 400,
        "content": "## Generate personalized icebreaker\n- Cleans content to feed into AI agent\n- The AI agent goes through the scraped data and writes hyper-personalized icebreaker for cold email\n- Change the system prom"
      }
    },
    {
      "id": "713a09f1-b3a2-42fa-9bfd-8dd11ca4a01b",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1840,
        448
      ],
      "parameters": {
        "width": 672,
        "height": 400,
        "content": "## Append & Update Google Sheet\n- The \"Append Enriched Icebreaker\" node appends the icebreaker along with the respective lead info into a new Google Sheet.\n- The \"Update Un-enriched List\" node updates"
      }
    }
  ],
  "connections": {
    "Aggregate": {
      "main": [
        [
          {
            "node": "Simplify Fields for AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "hasEmail?": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Set Apify Tokens",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Apify Tokens": {
      "main": [
        [
          {
            "node": "Call Apify LinkedIn API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call Apify LinkedIn API": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Un-enriched List": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Raw Un-enriched Leads": {
      "main": [
        [
          {
            "node": "hasEmail?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append Enriched Icebreaker": {
      "main": [
        [
          {
            "node": "Update Un-enriched List",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simplify Fields for AI Agent": {
      "main": [
        [
          {
            "node": "Generate Personalized Icebreaker",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Personalized Icebreaker": {
      "main": [
        [
          {
            "node": "Append Enriched Icebreaker",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Get Raw Un-enriched Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}