{
  "name": "Track menstrual cycles and send Gmail phase reminders with GPT-4o and Google Sheets",
  "nodes": [
    {
      "id": "679a5cab-eb40-461f-b221-8c4702acdc2c",
      "name": "Calculate Cycle Dates",
      "type": "n8n-nodes-base.code",
      "position": [
        -112,
        -16
      ]
    },
    {
      "id": "a5a8ca61-18b8-452c-a291-5ec7c510c2af",
      "name": "Build Welcome Email",
      "type": "n8n-nodes-base.code",
      "position": [
        304,
        -16
      ]
    },
    {
      "id": "2869a51e-4fbe-4dd3-b7bf-3b529555c63e",
      "name": "Send Welcome Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        512,
        -16
      ]
    },
    {
      "id": "e0eeb76d-dba1-4564-ad8a-334f5ad364a1",
      "name": "Daily 8AM Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -400,
        320
      ]
    },
    {
      "id": "d7c87250-1136-4b92-982a-a3388c0facfb",
      "name": "Build Reminder Email",
      "type": "n8n-nodes-base.code",
      "position": [
        752,
        304
      ]
    },
    {
      "id": "baa29ebc-f4db-4ca3-a1ec-1fa0e2a0db88",
      "name": "Send Reminder Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        960,
        304
      ]
    },
    {
      "id": "741fc1fb-e0b8-41dd-a95f-762816416ca4",
      "name": "Log to Send Log",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1392,
        304
      ]
    },
    {
      "id": "dff6bf49-17d0-4a22-866d-8babb2c28e46",
      "name": "Weekly Sunday 9AM Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -400,
        720
      ]
    },
    {
      "id": "19f3e83e-c717-4928-9956-887873a795c4",
      "name": "Send Wellness Digest",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1104,
        720
      ]
    },
    {
      "id": "38e19bed-dd3d-491b-bf97-f0e5bed902ec",
      "name": "Log to Send Log1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1376,
        720
      ]
    },
    {
      "id": "0d94d46b-1172-45aa-9d5f-57d10abfeee4",
      "name": "Cycle Wellness Form",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -352,
        -16
      ]
    },
    {
      "id": "c17d3fc9-5382-4122-865c-0cb63c67104f",
      "name": "Save to Subscribers",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        96,
        -16
      ]
    },
    {
      "id": "eb8c683c-422b-4820-9756-8a1aa83adad3",
      "name": "Read All Subscribers",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -176,
        320
      ]
    },
    {
      "id": "611b0434-0ad5-45e6-8e70-1ff8c1529154",
      "name": "Filter Active Subscribers",
      "type": "n8n-nodes-base.filter",
      "position": [
        80,
        320
      ]
    },
    {
      "id": "10f858df-f10e-4a96-9b5b-ee59328a80a8",
      "name": "Calculate Today's Phase",
      "type": "n8n-nodes-base.code",
      "position": [
        288,
        320
      ]
    },
    {
      "id": "048ff18a-cee7-442f-8cb9-0a284da42a4e",
      "name": "IF Email to Send",
      "type": "n8n-nodes-base.if",
      "position": [
        496,
        320
      ]
    },
    {
      "id": "28ffc1f6-b3cb-4544-aa7b-b85f56e36c5a",
      "name": "Update Last Email Sent",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1184,
        304
      ]
    },
    {
      "id": "1d810899-b02a-4c4b-829a-7f85067d40a7",
      "name": "Read All Subscribers1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -160,
        720
      ]
    },
    {
      "id": "1384ff73-3ff8-45bc-ab40-18506487ac3f",
      "name": "Filter Active Subscribers1",
      "type": "n8n-nodes-base.filter",
      "position": [
        80,
        720
      ]
    },
    {
      "id": "5b2a9a48-d1a4-4faf-a84f-8319abdbb3b7",
      "name": "Calculate Phase & Build Prompt",
      "type": "n8n-nodes-base.code",
      "position": [
        304,
        720
      ]
    },
    {
      "id": "9bb474c4-2c90-48f3-a95d-d71c80cbb2e4",
      "name": "Wellness Coach",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        512,
        720
      ]
    },
    {
      "id": "745e553c-cd0f-4ea9-8d1a-373663c9e114",
      "name": "Parse & Build Wellness Email",
      "type": "n8n-nodes-base.code",
      "position": [
        864,
        720
      ]
    },
    {
      "id": "6f3100af-2cc2-44fe-af82-4ffc4ed6aca4",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1232,
        -528
      ],
      "parameters": {
        "width": 384,
        "height": 592,
        "content": "## Weekly Automation\n\nEvery woman's cycle is different. This workflow \ntracks each subscriber's unique cycle, sends \nperfectly timed reminders before every phase, and \ndelivers personalized weekly wel"
      }
    },
    {
      "id": "680fc0ba-37a1-4db8-975a-706cc321cf0b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -496,
        -128
      ],
      "parameters": {
        "width": 1216,
        "height": 304,
        "content": "Triggered when a subscriber submits the form. Collects name, email, last period date, and cycle length. Calculates next period, ovulation day, fertile window, and PMS start date automatically. Saves f"
      }
    },
    {
      "id": "8519a174-db23-4674-909b-f53cd7c28d73",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -496,
        208
      ],
      "parameters": {
        "width": 2112,
        "height": 352,
        "content": "Runs every morning at 8AM. Reads all active subscribers, calculates today's cycle phase for each one, and sends the right email only on the right day — period incoming (3 days before), period start, o"
      }
    },
    {
      "id": "6b394e20-d3f8-4cd5-8872-5a6c05641b7e",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        608
      ],
      "parameters": {
        "width": 2128,
        "height": 288,
        "content": "Runs every Sunday at 9AM. Calculates each subscriber's current cycle phase and generates a fully personalized wellness email using GPT-4o with energy, nutrition, movement, and mindset tips specific to"
      }
    }
  ],
  "connections": {
    "Wellness Coach": {
      "main": [
        [
          {
            "node": "Parse & Build Wellness Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF Email to Send": {
      "main": [
        [
          {
            "node": "Build Reminder Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily 8AM Trigger": {
      "main": [
        [
          {
            "node": "Read All Subscribers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Welcome Email": {
      "main": [
        [
          {
            "node": "Send Welcome Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cycle Wellness Form": {
      "main": [
        [
          {
            "node": "Calculate Cycle Dates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save to Subscribers": {
      "main": [
        [
          {
            "node": "Build Welcome Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Reminder Email": {
      "main": [
        [
          {
            "node": "Update Last Email Sent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Reminder Email": {
      "main": [
        [
          {
            "node": "Send Reminder Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read All Subscribers": {
      "main": [
        [
          {
            "node": "Filter Active Subscribers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Wellness Digest": {
      "main": [
        [
          {
            "node": "Log to Send Log1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Cycle Dates": {
      "main": [
        [
          {
            "node": "Save to Subscribers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read All Subscribers1": {
      "main": [
        [
          {
            "node": "Filter Active Subscribers1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Last Email Sent": {
      "main": [
        [
          {
            "node": "Log to Send Log",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Today's Phase": {
      "main": [
        [
          {
            "node": "IF Email to Send",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Active Subscribers": {
      "main": [
        [
          {
            "node": "Calculate Today's Phase",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Weekly Sunday 9AM Trigger": {
      "main": [
        [
          {
            "node": "Read All Subscribers1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Active Subscribers1": {
      "main": [
        [
          {
            "node": "Calculate Phase & Build Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse & Build Wellness Email": {
      "main": [
        [
          {
            "node": "Send Wellness Digest",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Phase & Build Prompt": {
      "main": [
        [
          {
            "node": "Wellness Coach",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}