{
  "name": "Email newsletter system with SendGrid, Google Sheets & freemium rate limiting",
  "nodes": [
    {
      "id": "741dae62-be44-4cd8-9639-65bc91e8931e",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        752,
        -448
      ],
      "parameters": {
        "width": 704,
        "height": 784,
        "content": "## 2. Check if user has used up the 5 free email limit daily. Send error message if exceeded"
      }
    },
    {
      "id": "f8443dd0-cc38-4be6-922d-2cde7fbd1e79",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1472,
        -304
      ],
      "parameters": {
        "width": 688,
        "height": 752,
        "content": "## 3. Update database, send email and notification to self"
      }
    },
    {
      "id": "ccbb2d36-3adf-4c93-bc9b-3ab0b1f5df19",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -96,
        -288
      ],
      "parameters": {
        "width": 816,
        "height": 528,
        "content": "## 1. Receive data from newsletter page, validate if free or pro user. Process free user and send pro user's message"
      }
    },
    {
      "id": "a2934194-5a52-4097-b508-1d45c5204aa4",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -864,
        -432
      ],
      "parameters": {
        "width": 720,
        "height": 816,
        "content": "## Email Newsletter Builder with Rate Limiting and User Tracking\n\n## How it works\n- **Webhook1** receives the data from the email newsletter page - attached below\n- **Check mode1** if the user is a pr"
      }
    },
    {
      "id": "76e322ad-897b-4317-bbd0-9150ab41af36",
      "name": "Check Limit Logic",
      "type": "n8n-nodes-base.code",
      "position": [
        1104,
        -176
      ]
    },
    {
      "id": "f2088732-d7b7-430b-9194-0a3d1a9c350b",
      "name": "Google Sheets Read",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        352,
        -160
      ]
    },
    {
      "id": "f12ded09-2154-4c7a-9bdd-df9833bd9038",
      "name": "Send Email (Pro)",
      "type": "n8n-nodes-base.sendGrid",
      "position": [
        96,
        64
      ]
    },
    {
      "id": "195d91d2-f052-4594-8bc7-327ea919b662",
      "name": "Webhook1",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -80,
        -144
      ]
    },
    {
      "id": "dd8de3a3-85c7-4f88-9c4c-105a3928b80f",
      "name": "Check Mode1",
      "type": "n8n-nodes-base.if",
      "position": [
        112,
        -144
      ]
    },
    {
      "id": "d0503c3a-1b59-4771-bea2-c3fbc73eb8ea",
      "name": "Check User Exists1",
      "type": "n8n-nodes-base.if",
      "position": [
        832,
        -160
      ]
    },
    {
      "id": "491d70ea-b8e2-41cb-a3a2-d2721ef2df21",
      "name": "Create New User1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1520,
        208
      ]
    },
    {
      "id": "8ca68822-b69f-485d-9a69-6582b2ef4e56",
      "name": "Can Send?1",
      "type": "n8n-nodes-base.if",
      "position": [
        1296,
        -176
      ]
    },
    {
      "id": "d341ce13-b80a-41ff-8a6a-9b300c215555",
      "name": "Update User Count1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1520,
        -192
      ]
    },
    {
      "id": "11b470ce-97a3-4f64-8474-f9693193361e",
      "name": "Send Email (Demo)1",
      "type": "n8n-nodes-base.sendGrid",
      "position": [
        1776,
        0
      ]
    },
    {
      "id": "6f68ad76-39de-4eee-9205-26ce321c34ba",
      "name": "Success Response (Demo)1",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1984,
        0
      ]
    },
    {
      "id": "904b1aed-c33f-4dd7-847b-26f0ef727cc9",
      "name": "Limit Reached Response1",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1296,
        -352
      ]
    },
    {
      "id": "834e8273-61ed-4959-83da-aec736a3297c",
      "name": "Success Response (Pro)1",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        336,
        64
      ]
    },
    {
      "id": "f8182866-68ae-49cf-81d8-b2ac8bd3add4",
      "name": "Telegram Notification1",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1792,
        -192
      ]
    },
    {
      "id": "f08a3491-0e66-40a3-8f9a-44b299f638fc",
      "name": "Check User Exists2",
      "type": "n8n-nodes-base.code",
      "position": [
        576,
        -160
      ]
    }
  ],
  "connections": {
    "Webhook1": {
      "main": [
        [
          {
            "node": "Check Mode1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Can Send?1": {
      "main": [
        [
          {
            "node": "Update User Count1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Limit Reached Response1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Mode1": {
      "main": [
        [
          {
            "node": "Google Sheets Read",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Email (Pro)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create New User1": {
      "main": [
        [
          {
            "node": "Telegram Notification1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Email (Demo)1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Email (Pro)": {
      "main": [
        [
          {
            "node": "Success Response (Pro)1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Limit Logic": {
      "main": [
        [
          {
            "node": "Can Send?1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check User Exists1": {
      "main": [
        [
          {
            "node": "Check Limit Logic",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create New User1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check User Exists2": {
      "main": [
        [
          {
            "node": "Check User Exists1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets Read": {
      "main": [
        [
          {
            "node": "Check User Exists2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Email (Demo)1": {
      "main": [
        [
          {
            "node": "Success Response (Demo)1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update User Count1": {
      "main": [
        [
          {
            "node": "Send Email (Demo)1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Telegram Notification1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}