{
  "name": "Generate personalized cold email icebreakers with GPT-4O-mini and Google Sheets",
  "nodes": [
    {
      "id": "6e508452-0193-4fc6-9762-a53d57b5a02a",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -32,
        0
      ]
    },
    {
      "id": "d564d4ce-92c9-4797-868a-697f8a5e9ecd",
      "name": "Get row(s) in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        192,
        0
      ]
    },
    {
      "id": "6574b56d-b207-48a5-bcf7-4f9d54332e52",
      "name": "Message a model",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        624,
        16
      ]
    },
    {
      "id": "0bcf09d1-f467-4578-9abf-981a24baddfe",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        416,
        0
      ]
    },
    {
      "id": "0d808a31-0bf6-4ec5-9491-2e02f805fc14",
      "name": "Update row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        960,
        16
      ]
    },
    {
      "id": "7e71ea4a-af5f-4bf8-8ef0-6fd76d7990b9",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        -320
      ],
      "parameters": {
        "width": 192,
        "height": 272,
        "content": "## Fetch Leads from Google Sheets\nPulls lead data from your Google Sheet.  \nEach row should contain details like:  \n- First name  \n- Last name  \n- Company name  \n- Industry  \n- City  \n- (Any other fie"
      }
    },
    {
      "id": "b4b1fa0f-8f4e-4d82-941e-b01f1cf0d888",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -320
      ],
      "parameters": {
        "width": 192,
        "height": 272,
        "content": "## Workflow Trigger\nThis workflow runs on-demand when you click **Execute Workflow**.  \nUse it whenever you want to enrich your Google Sheet with fresh personalization for leads.  \n"
      }
    },
    {
      "id": "c1310003-7c1c-43b1-af57-02ae1684836f",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        592,
        -320
      ],
      "parameters": {
        "width": 288,
        "height": 272,
        "content": "## Generate Personalization with AI\nUses OpenAI to create two fields:  \n- `icebreaker` → a short, natural, friendly opening line for your cold email.  \n- `shortenedCompanyName` → a simplified company "
      }
    },
    {
      "id": "baefc452-c9d5-422c-acce-9c3444afbb37",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        368,
        -320
      ],
      "parameters": {
        "width": 192,
        "height": 272,
        "content": "## Process Each Lead\nThis node loops through your sheet **one lead at a time**.  \nThis prevents errors with Google Sheets or the AI model.  \n\n✅ Ensures each lead gets its own personalized icebreaker a"
      }
    },
    {
      "id": "81fbe23c-c5d5-4900-9d11-a5251ebfba8c",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        912,
        -320
      ],
      "parameters": {
        "width": 192,
        "height": 272,
        "content": "## Save Results into Google Sheets\nWrites the AI-generated results back into your Google Sheet.  \n\n- Map `icebreaker` to your sheet’s personalization column (or create one).  \n- Map `shortenedCompanyN"
      }
    }
  ],
  "connections": {
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Message a model",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Message a model": {
      "main": [
        [
          {
            "node": "Update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}