{
  "nodes": [
    {
      "name": "Webhook - Capture User Data",
      "type": "n8n-nodes-base.webhook",
      "position": [
        0,
        0
      ],
      "parameters": {
        "path": "creators-create-user-with-group",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2.1
    },
    {
      "name": "Curseduca - Create User & Assign Group",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        260,
        0
      ],
      "parameters": {
        "url": "https://prof.curseduca.pro/members",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"name\": \"{{ $json.body.name }}\",\n  \"email\": \"{{ $json.body.email }}\",\n  \"group\": { \"id\": {{$json.body.groupId}} },\n  \"notifications\": [ { \"type\": \"EMAIL\" } ],\n  \"sendMemberRegisteredEmail\": true\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "api_key",
              "value": "<API_KEY>"
            },
            {
              "name": "Authorization",
              "value": "Bearer <BEARER_TOKEN>"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "name": "\u26a0\ufe0f Setup Instructions",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        260,
        -200
      ],
      "parameters": {
        "content": "\u26a0\ufe0f Setup Instructions:\n- Replace <API_KEY> and <BEARER_TOKEN> in headers\n- Send `groupId` along with `name` and `email` in the webhook body"
      },
      "typeVersion": 1
    },
    {
      "name": "\ud83d\udce9 Example Payload",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -260,
        0
      ],
      "parameters": {
        "content": "\ud83d\udce9 Example Webhook Body:\n{\n  \"name\": \"Jane Doe\",\n  \"email\": \"jane@example.com\",\n  \"groupId\": 123\n}"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Webhook - Capture User Data": {
      "main": [
        [
          {
            "node": "Curseduca - Create User & Assign Group",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}