{
  "name": "Send subscription renewal reminders with Email and ClickUp",
  "nodes": [
    {
      "id": "6528965f-aa90-4b6c-ac4c-60bfeeb1ef9f",
      "name": "📒 Workflow Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -672,
        -80
      ],
      "parameters": {
        "width": 566,
        "height": 706,
        "content": "## How it works\nThis workflow listens for a Webhook call and immediately queries a ClickUp list that stores all active customer subscriptions. It calculates how many days remain until each subscriptio"
      }
    },
    {
      "id": "648c1471-7fd3-48bb-a739-a9663af369e3",
      "name": "Trigger & Data Fetch",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -64,
        -80
      ],
      "parameters": {
        "width": 530,
        "height": 718,
        "content": "## Trigger & Data Fetch\nThis section starts the automation every time the webhook is hit. After optional default parameters are set, the ClickUp node pulls every task in the configured list—effectivel"
      }
    },
    {
      "id": "df975e2a-82ab-486e-9a02-68ce6f385e94",
      "name": "Processing & Filtering",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        464,
        -80
      ],
      "parameters": {
        "width": 722,
        "height": 718,
        "content": "## Processing & Filtering\nThe *Filter Expiring & Build Data* code node converts UNIX due-dates into ISO strings, calculates **daysLeft**, and emits two separate outputs: ➀ a list of subscriptions that"
      }
    },
    {
      "id": "441bceb5-9fb8-44f1-999f-62e1403bec80",
      "name": "Notifications & Reporting",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1184,
        -80
      ],
      "parameters": {
        "width": 1250,
        "height": 718,
        "content": "## Notifications & Reporting\nIf at least one renewal reminder went out, the workflow builds an HTML summary listing each customer, days left, and due date, then emails that report to your admin addres"
      }
    },
    {
      "id": "01fbe124-54ef-43a6-a681-020854625e06",
      "name": "Incoming Request",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -16,
        320
      ]
    },
    {
      "id": "4be4bfce-c8a2-44a3-9103-2fdccd49e412",
      "name": "Set Defaults",
      "type": "n8n-nodes-base.set",
      "position": [
        208,
        304
      ]
    },
    {
      "id": "8c62cf19-72d0-4f71-9c99-76869162fee2",
      "name": "Filter Expiring & Build Data",
      "type": "n8n-nodes-base.code",
      "position": [
        544,
        288
      ]
    },
    {
      "id": "5209eeca-53a5-4eae-a5c5-d1a772ec0595",
      "name": "Split per Subscription",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        784,
        160
      ]
    },
    {
      "id": "3d4ac165-d2f1-4cdd-9720-917d7e790a18",
      "name": "Prepare Reminder Email",
      "type": "n8n-nodes-base.set",
      "position": [
        1264,
        80
      ]
    },
    {
      "id": "91761b47-e3b5-41fa-8471-7e622500b5b6",
      "name": "Throttle Reminders",
      "type": "n8n-nodes-base.wait",
      "position": [
        1552,
        48
      ]
    },
    {
      "id": "fb104676-0af7-4fc0-8d9d-3b1b28d1d8c9",
      "name": "Send Reminder Email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1792,
        80
      ]
    },
    {
      "id": "4eb2cc81-0567-4b6d-a99c-a6043f2018b2",
      "name": "Log Reminder Status",
      "type": "n8n-nodes-base.set",
      "position": [
        1968,
        80
      ]
    },
    {
      "id": "c62f5422-acc7-4bc5-8c51-6e12d9334c0a",
      "name": "Any Reminders Sent?",
      "type": "n8n-nodes-base.if",
      "position": [
        1008,
        288
      ]
    },
    {
      "id": "b837f97e-e59f-46aa-8a69-460f76bf95a9",
      "name": "Build Admin Summary",
      "type": "n8n-nodes-base.code",
      "position": [
        1680,
        256
      ]
    },
    {
      "id": "4db7aa08-fd1d-4c55-acd4-85c859506034",
      "name": "Send Admin Summary",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1872,
        256
      ]
    },
    {
      "id": "35aec01b-9358-4693-a672-b51aceb93913",
      "name": "Prepare No-Expiry Email",
      "type": "n8n-nodes-base.set",
      "position": [
        1392,
        480
      ]
    },
    {
      "id": "21fbcd30-05d8-417f-a113-d46ded6a395a",
      "name": "Send No-Expiry Email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1632,
        480
      ]
    },
    {
      "id": "001c98f6-ecfc-4596-9302-a76a67ed1a9a",
      "name": "Cleanup Execution",
      "type": "n8n-nodes-base.code",
      "position": [
        2160,
        320
      ]
    }
  ],
  "connections": {
    "Set Defaults": {
      "main": [
        [
          {
            "node": "Filter Expiring & Build Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Incoming Request": {
      "main": [
        [
          {
            "node": "Set Defaults",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Admin Summary": {
      "main": [
        [
          {
            "node": "Cleanup Execution",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Throttle Reminders": {
      "main": [
        [
          {
            "node": "Send Reminder Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Any Reminders Sent?": {
      "main": [
        [
          {
            "node": "Build Admin Summary",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prepare No-Expiry Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Admin Summary": {
      "main": [
        [
          {
            "node": "Send Admin Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Reminder Email": {
      "main": [
        [
          {
            "node": "Log Reminder Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send No-Expiry Email": {
      "main": [
        [
          {
            "node": "Cleanup Execution",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Reminder Email": {
      "main": [
        [
          {
            "node": "Throttle Reminders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split per Subscription": {
      "main": [
        [
          {
            "node": "Prepare Reminder Email",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Any Reminders Sent?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare No-Expiry Email": {
      "main": [
        [
          {
            "node": "Send No-Expiry Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Expiring & Build Data": {
      "main": [
        [
          {
            "node": "Split per Subscription",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}