{
  "name": "Send predefined personalized emails to leads from Google Sheets using SendGrid",
  "nodes": [
    {
      "id": "ac2e7948-6d2e-4e6c-9dea-bb536c284bd1",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1376,
        -224
      ]
    },
    {
      "id": "ce1155a0-de1c-49e3-ad62-332d80591259",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -704,
        -224
      ]
    },
    {
      "id": "7ba408be-13d0-4b97-8953-b979cee79622",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        -32,
        -288
      ]
    },
    {
      "id": "4d002700-b772-4134-b356-e321a667baeb",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        640,
        -224
      ]
    },
    {
      "id": "75427d7b-8904-41f3-b0e5-214864fc5471",
      "name": "Parse Email Template from DB",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -480,
        -224
      ]
    },
    {
      "id": "07fc2e28-3552-4169-9e00-a40962587694",
      "name": "Pick a random template",
      "type": "n8n-nodes-base.code",
      "position": [
        -256,
        -224
      ]
    },
    {
      "id": "04898505-3810-454d-a874-ed0c0b7abc1f",
      "name": "Limit",
      "type": "n8n-nodes-base.limit",
      "position": [
        -928,
        -224
      ]
    },
    {
      "id": "9a0b6308-74f9-4b6e-aaa2-9b6171e7cef6",
      "name": "Get row(s) in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1152,
        -224
      ]
    },
    {
      "id": "51cb6840-cf3d-46c7-a155-c0a6c1571d7c",
      "name": "Send an email",
      "type": "n8n-nodes-base.sendGrid",
      "position": [
        416,
        -288
      ]
    },
    {
      "id": "8e899e27-9aea-4eb5-9e66-433be11268e9",
      "name": "Fix Variables",
      "type": "n8n-nodes-base.set",
      "position": [
        192,
        -288
      ]
    },
    {
      "id": "8ebfe20b-4238-4e55-9066-1802265f7f76",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1424,
        -880
      ],
      "parameters": {
        "width": 784,
        "height": 608,
        "content": "## 📧 Email Workflow with SendGrid & Predefined Email Templates\n### ✉️ Using Predefined Templates\nThis workflow provides a **scalable and reliable** solution for sending **personalized** emails to clie"
      }
    },
    {
      "id": "d8ff919b-9064-46d4-aa88-b589ce134ed4",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        208,
        -816
      ],
      "parameters": {
        "width": 480,
        "height": 464,
        "content": "## 🧩 Extend This Workflow Further\nThis workflow handles sending predefined, personalized emails to clients using **SendGrid**. To build a **complete email automation system**, you can integrate this w"
      }
    }
  ],
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Fix Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fix Variables": {
      "main": [
        [
          {
            "node": "Send an email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send an email": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Parse Email Template from DB",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pick a random template": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Parse Email Template from DB": {
      "main": [
        [
          {
            "node": "Pick a random template",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}