{
  "name": "AEGIS Pro \ubb34\ub8cc \uccb4\ud5d8 \uc790\ub3d9\ud654",
  "nodes": [
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "databaseId": "b208216d-652d-4f89-bf63-7c421b05a4b8",
        "filters": {
          "filters": [
            {
              "key": "\uc0c1\ud0dc|select",
              "condition": "equals",
              "value": "\uc2e0\uccad\uc644\ub8cc"
            }
          ]
        },
        "options": {}
      },
      "id": "notion-trigger",
      "name": "\ub178\uc158 \uc2e0\uccad \uac10\uc9c0",
      "type": "n8n-nodes-base.notionTrigger",
      "typeVersion": 1,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://rgsucvzwsaynyzrsrlad.supabase.co/functions/v1/activate-pro-trial",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "x-webhook-secret",
              "value": "aegis-pro-trial-2026"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ username: $json['AEGIS ID'], email: $json['\uc774\uba54\uc77c'], name: $json['\uc774\ub984'] }) }}",
        "options": {}
      },
      "id": "supabase-activate",
      "name": "Supabase Pro \ud65c\uc131\ud654 + \uc54c\ub9bc",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        480,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": false,
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "check-success",
              "leftValue": "={{ $json.success }}",
              "rightValue": true,
              "operator": {
                "type": "boolean",
                "operation": "true"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "check-result",
      "name": "\uc131\uacf5 \uc5ec\ubd80 \ud655\uc778",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        720,
        300
      ]
    },
    {
      "parameters": {
        "resource": "databasePage",
        "operation": "update",
        "pageId": "={{ $('\ub178\uc158 \uc2e0\uccad \uac10\uc9c0').item.json.id }}",
        "propertiesUi": {
          "propertyValues": [
            {
              "key": "\uc0c1\ud0dc|select",
              "selectValue": "Pro \uc801\uc6a9\ub428"
            },
            {
              "key": "Pro \uc2dc\uc791\uc77c|date",
              "date": "={{ new Date().toISOString().split('T')[0] }}"
            },
            {
              "key": "Pro \ub9cc\ub8cc\uc77c|date",
              "date": "={{ new Date(Date.now() + 30*24*60*60*1000).toISOString().split('T')[0] }}"
            }
          ]
        }
      },
      "id": "notion-update-success",
      "name": "\ub178\uc158 \uc0c1\ud0dc \uc5c5\ub370\uc774\ud2b8 (\uc131\uacf5)",
      "type": "n8n-nodes-base.notion",
      "typeVersion": 2.2,
      "position": [
        960,
        200
      ]
    },
    {
      "parameters": {
        "resource": "databasePage",
        "operation": "update",
        "pageId": "={{ $('\ub178\uc158 \uc2e0\uccad \uac10\uc9c0').item.json.id }}",
        "propertiesUi": {
          "propertyValues": [
            {
              "key": "\uc0c1\ud0dc|select",
              "selectValue": "\uc624\ub958"
            },
            {
              "key": "\uba54\ubaa8|rich_text",
              "textContent": "={{ '\uc624\ub958: ' + JSON.stringify($json) }}"
            }
          ]
        }
      },
      "id": "notion-update-fail",
      "name": "\ub178\uc158 \uc0c1\ud0dc \uc5c5\ub370\uc774\ud2b8 (\uc624\ub958)",
      "type": "n8n-nodes-base.notion",
      "typeVersion": 2.2,
      "position": [
        960,
        420
      ]
    }
  ],
  "connections": {
    "\ub178\uc158 \uc2e0\uccad \uac10\uc9c0": {
      "main": [
        [
          {
            "node": "Supabase Pro \ud65c\uc131\ud654 + \uc54c\ub9bc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Supabase Pro \ud65c\uc131\ud654 + \uc54c\ub9bc": {
      "main": [
        [
          {
            "node": "\uc131\uacf5 \uc5ec\ubd80 \ud655\uc778",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\uc131\uacf5 \uc5ec\ubd80 \ud655\uc778": {
      "main": [
        [
          {
            "node": "\ub178\uc158 \uc0c1\ud0dc \uc5c5\ub370\uc774\ud2b8 (\uc131\uacf5)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "\ub178\uc158 \uc0c1\ud0dc \uc5c5\ub370\uc774\ud2b8 (\uc624\ub958)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}