{
  "name": "Daily habit RPG: Gamified Gmail reminders with quest system and progress tracking",
  "nodes": [
    {
      "id": "96f82310-1477-4793-9a50-0a7a34d89a73",
      "name": "📋 Workflow Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        720
      ],
      "parameters": {
        "width": 450,
        "height": 1092,
        "content": "# 🎮 Gamified Daily Habit Tracker\n\n## What it does\nTransform your daily habits into an RPG adventure! This workflow sends a beautifully formatted HTML email every morning that gamifies your routine wit"
      }
    },
    {
      "id": "98196975-15f2-4ead-9146-89bc43877e24",
      "name": "Daily Morning Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -400,
        1248
      ]
    },
    {
      "id": "17352aae-c538-49c2-894f-0b63cb693fc0",
      "name": "Step 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -448,
        912
      ],
      "parameters": {
        "width": 200,
        "height": 326,
        "content": "## ⏰ Step 1: Schedule Trigger\n\nRuns every day at 6:00 AM\n\n**To customize:**\n- Double-click the node\n- Change `triggerAtHour` value\n- Save and activate"
      }
    },
    {
      "id": "56b21455-24e2-4533-844a-cd5c254ab37b",
      "name": "Initialize Player Stats",
      "type": "n8n-nodes-base.code",
      "position": [
        -192,
        1248
      ]
    },
    {
      "id": "ba2a9373-8291-457b-ae13-ddb2e9d14ad5",
      "name": "Step 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        944
      ],
      "parameters": {
        "width": 200,
        "height": 294,
        "content": "## 🎲 Step 2: Player Stats\n\nGenerates random player stats for demo.\n\n**In production:**\n- Connect to database\n- Load actual user progress\n- Track real achievements"
      }
    },
    {
      "id": "203c212b-0e3f-4a8a-98f6-43f77a755f60",
      "name": "Generate Daily Quests",
      "type": "n8n-nodes-base.code",
      "position": [
        0,
        1248
      ]
    },
    {
      "id": "fe4739d8-66fa-4cc0-bb57-7b6504cbc289",
      "name": "Step 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        896
      ],
      "parameters": {
        "width": 200,
        "height": 340,
        "content": "## 📜 Step 3: Quest Generation\n\n**Customizable habits:**\n- Weekday routines\n- Weekend special quests\n- Monday goal-setting\n- Random bonus quests\n\n**Edit the `questDatabase` object to add your own habit"
      }
    },
    {
      "id": "8edb1029-bbc7-4198-8854-eee469dee183",
      "name": "Fetch Daily Quote",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        192,
        1248
      ]
    },
    {
      "id": "3384083e-6928-4015-9fac-d4ac609a1726",
      "name": "Step 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        992
      ],
      "parameters": {
        "width": 200,
        "height": 246,
        "content": "## 💭 Step 4: Daily Quote\n\nFetches motivational quote from free API\n\n**No API key required!**\n\nFalls back to default quote if API fails"
      }
    },
    {
      "id": "4425309a-9372-4a54-b70d-7a3a26b1a716",
      "name": "Process Game Stats",
      "type": "n8n-nodes-base.code",
      "position": [
        400,
        1248
      ]
    },
    {
      "id": "69262e55-3a6b-4c49-a31f-f0e67d853217",
      "name": "Step 5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        352,
        1024
      ],
      "parameters": {
        "width": 200,
        "height": 214,
        "content": "## 🏆 Step 5: Achievements\n\nCalculates:\n- Player rank (D to SSS)\n- Achievement unlocks\n- XP progress\n- Daily motivation"
      }
    },
    {
      "id": "556d383e-0f22-437b-a291-252f7f8a304c",
      "name": "Create Email Template",
      "type": "n8n-nodes-base.code",
      "position": [
        592,
        1248
      ]
    },
    {
      "id": "f8e9dff5-1667-4a6e-a0f5-69098e348774",
      "name": "Step 6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        544,
        976
      ],
      "parameters": {
        "width": 200,
        "height": 262,
        "content": "## 📧 Step 6: Email Template\n\nCreates beautiful HTML email with:\n- Player stats dashboard\n- Progress bars\n- Quest list\n- Achievements\n- Responsive design"
      }
    },
    {
      "id": "4de3578b-c920-442b-9603-fe40ac5dcfc4",
      "name": "Send Quest Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        800,
        1248
      ]
    },
    {
      "id": "febfefec-9a85-42ed-9b95-f82703fb0a14",
      "name": "Step 7 - IMPORTANT",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        752,
        912
      ],
      "parameters": {
        "width": 200,
        "height": 324,
        "content": "## ⚠️ Step 7: Gmail Setup\n\n**REQUIRED:**\n1. Click \"Create New\" in credentials\n2. Connect your Gmail via OAuth2\n3. Update recipient email address\n4. Test with \"Execute Workflow\"\n5. Activate when ready"
      }
    },
    {
      "id": "1c8c98b6-a0cc-4829-8ce3-e4783a9428cc",
      "name": "Log Execution Stats",
      "type": "n8n-nodes-base.code",
      "position": [
        1008,
        1248
      ]
    },
    {
      "id": "488f5c40-c3f4-4cef-909e-c2a590df0c53",
      "name": "Step 8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        1008
      ],
      "parameters": {
        "width": 200,
        "height": 230,
        "content": "## ✅ Step 8: Logging\n\nTracks execution stats.\n\n**Optional:** Connect to database or Google Sheets to store progress history"
      }
    }
  ],
  "connections": {
    "Send Quest Email": {
      "main": [
        [
          {
            "node": "Log Execution Stats",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Daily Quote": {
      "main": [
        [
          {
            "node": "Process Game Stats",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Game Stats": {
      "main": [
        [
          {
            "node": "Create Email Template",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Email Template": {
      "main": [
        [
          {
            "node": "Send Quest Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily Morning Trigger": {
      "main": [
        [
          {
            "node": "Initialize Player Stats",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Daily Quests": {
      "main": [
        [
          {
            "node": "Fetch Daily Quote",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Initialize Player Stats": {
      "main": [
        [
          {
            "node": "Generate Daily Quests",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}