{
  "name": "MamVibe \u2014 User Registered",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "user-registered",
        "responseMode": "onReceived",
        "responseCode": 200,
        "options": {}
      },
      "id": "webhook-trigger",
      "name": "Webhook: User Registered",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "condition-lang",
              "leftValue": "={{ $json.body.languagePreference }}",
              "rightValue": "bg",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "language-switch",
      "name": "Is Bulgarian?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        480,
        300
      ]
    },
    {
      "parameters": {
        "fromEmail": "noreply@mamvibe.bg",
        "toEmail": "={{ $('Webhook: User Registered').item.json.body.email }}",
        "subject": "\u0414\u043e\u0431\u0440\u0435 \u0434\u043e\u0448\u043b\u0438 \u0432 MamVibe, {{ $('Webhook: User Registered').item.json.body.displayName }}!",
        "emailType": "html",
        "html": "<div style=\"font-family: 'Segoe UI', Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px;\">\n  <div style=\"text-align: center; padding: 20px 0;\">\n    <h1 style=\"color: #e91e8c; margin: 0;\">MamVibe</h1>\n  </div>\n  <div style=\"background: #fff; border-radius: 12px; padding: 30px; border: 1px solid #f0f0f0;\">\n    <h2 style=\"color: #333; margin-top: 0;\">\u0417\u0434\u0440\u0430\u0432\u0435\u0439\u0442\u0435, {{ $('Webhook: User Registered').item.json.body.displayName }}! \ud83c\udf89</h2>\n    <p style=\"color: #555; font-size: 16px; line-height: 1.6;\">\n      \u0414\u043e\u0431\u0440\u0435 \u0434\u043e\u0448\u043b\u0438 \u0432 <strong>MamVibe</strong> \u2014 \u043c\u044f\u0441\u0442\u043e\u0442\u043e, \u043a\u044a\u0434\u0435\u0442\u043e \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430\u0442\u0430 \u0441\u043f\u043e\u0434\u0435\u043b\u044f\u0442 \u0438 \u043d\u0430\u043c\u0438\u0440\u0430\u0442 \u0434\u0435\u0442\u0441\u043a\u0438 \u0430\u0440\u0442\u0438\u043a\u0443\u043b\u0438.\n    </p>\n    <p style=\"color: #555; font-size: 16px; line-height: 1.6;\">\n      \u0412\u0430\u0448\u0438\u044f\u0442 \u043f\u0440\u043e\u0444\u0438\u043b (<strong>{{ $('Webhook: User Registered').item.json.body.profileType }}</strong>) \u0435 \u0441\u044a\u0437\u0434\u0430\u0434\u0435\u043d \u0443\u0441\u043f\u0435\u0448\u043d\u043e.\n    </p>\n    <div style=\"text-align: center; margin: 30px 0;\">\n      <a href=\"https://mamvibe.bg\" style=\"background: #e91e8c; color: white; padding: 14px 32px; text-decoration: none; border-radius: 8px; font-size: 16px; font-weight: 600;\">\u0420\u0430\u0437\u0433\u043b\u0435\u0434\u0430\u0439\u0442\u0435 \u043e\u0431\u044f\u0432\u0438\u0442\u0435</a>\n    </div>\n    <p style=\"color: #888; font-size: 14px;\">\u0410\u043a\u043e \u0438\u043c\u0430\u0442\u0435 \u0432\u044a\u043f\u0440\u043e\u0441\u0438, \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u0433\u043e\u0432\u043e\u0440\u0435\u0442\u0435 \u043d\u0430 \u0442\u043e\u0437\u0438 \u0438\u043c\u0435\u0439\u043b.</p>\n  </div>\n  <div style=\"text-align: center; padding: 20px 0; color: #aaa; font-size: 12px;\">\n    &copy; 2026 MamVibe. \u0412\u0441\u0438\u0447\u043a\u0438 \u043f\u0440\u0430\u0432\u0430 \u0437\u0430\u043f\u0430\u0437\u0435\u043d\u0438.\n  </div>\n</div>",
        "options": {}
      },
      "id": "email-bg",
      "name": "Welcome Email (BG)",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2.1,
      "position": [
        720,
        200
      ],
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "fromEmail": "noreply@mamvibe.bg",
        "toEmail": "={{ $('Webhook: User Registered').item.json.body.email }}",
        "subject": "Welcome to MamVibe, {{ $('Webhook: User Registered').item.json.body.displayName }}!",
        "emailType": "html",
        "html": "<div style=\"font-family: 'Segoe UI', Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px;\">\n  <div style=\"text-align: center; padding: 20px 0;\">\n    <h1 style=\"color: #e91e8c; margin: 0;\">MamVibe</h1>\n  </div>\n  <div style=\"background: #fff; border-radius: 12px; padding: 30px; border: 1px solid #f0f0f0;\">\n    <h2 style=\"color: #333; margin-top: 0;\">Hi {{ $('Webhook: User Registered').item.json.body.displayName }}! \ud83c\udf89</h2>\n    <p style=\"color: #555; font-size: 16px; line-height: 1.6;\">\n      Welcome to <strong>MamVibe</strong> \u2014 the place where families share and find baby items.\n    </p>\n    <p style=\"color: #555; font-size: 16px; line-height: 1.6;\">\n      Your profile (<strong>{{ $('Webhook: User Registered').item.json.body.profileType }}</strong>) has been created successfully.\n    </p>\n    <div style=\"text-align: center; margin: 30px 0;\">\n      <a href=\"https://mamvibe.bg\" style=\"background: #e91e8c; color: white; padding: 14px 32px; text-decoration: none; border-radius: 8px; font-size: 16px; font-weight: 600;\">Browse Listings</a>\n    </div>\n    <p style=\"color: #888; font-size: 14px;\">If you have any questions, just reply to this email.</p>\n  </div>\n  <div style=\"text-align: center; padding: 20px 0; color: #aaa; font-size: 12px;\">\n    &copy; 2026 MamVibe. All rights reserved.\n  </div>\n</div>",
        "options": {}
      },
      "id": "email-en",
      "name": "Welcome Email (EN)",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2.1,
      "position": [
        720,
        400
      ],
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "fromEmail": "noreply@mamvibe.bg",
        "toEmail": "admin@mamvibe.bg",
        "subject": "New user registered: {{ $('Webhook: User Registered').item.json.body.displayName }}",
        "emailType": "html",
        "html": "<div style=\"font-family: 'Segoe UI', Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px;\">\n  <div style=\"background: #fff; border-radius: 12px; padding: 30px; border: 1px solid #f0f0f0;\">\n    <h2 style=\"color: #333; margin-top: 0;\">New User Registration</h2>\n    <table style=\"width: 100%; border-collapse: collapse; font-size: 15px;\">\n      <tr>\n        <td style=\"padding: 8px 0; color: #888; width: 140px;\">Name</td>\n        <td style=\"padding: 8px 0; color: #333; font-weight: 600;\">{{ $('Webhook: User Registered').item.json.body.displayName }}</td>\n      </tr>\n      <tr>\n        <td style=\"padding: 8px 0; color: #888;\">Email</td>\n        <td style=\"padding: 8px 0; color: #333;\">{{ $('Webhook: User Registered').item.json.body.email }}</td>\n      </tr>\n      <tr>\n        <td style=\"padding: 8px 0; color: #888;\">Profile Type</td>\n        <td style=\"padding: 8px 0; color: #333;\">{{ $('Webhook: User Registered').item.json.body.profileType }}</td>\n      </tr>\n      <tr>\n        <td style=\"padding: 8px 0; color: #888;\">Language</td>\n        <td style=\"padding: 8px 0; color: #333;\">{{ $('Webhook: User Registered').item.json.body.languagePreference }}</td>\n      </tr>\n      <tr>\n        <td style=\"padding: 8px 0; color: #888;\">Registered At</td>\n        <td style=\"padding: 8px 0; color: #333;\">{{ $('Webhook: User Registered').item.json.body.timestamp }}</td>\n      </tr>\n    </table>\n  </div>\n</div>",
        "options": {}
      },
      "id": "admin-notify",
      "name": "Notify Admin",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2.1,
      "position": [
        480,
        520
      ],
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Webhook: User Registered": {
      "main": [
        [
          {
            "node": "Is Bulgarian?",
            "type": "main",
            "index": 0
          },
          {
            "node": "Notify Admin",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Bulgarian?": {
      "main": [
        [
          {
            "node": "Welcome Email (BG)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Welcome Email (EN)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "tags": [
    {
      "name": "MamVibe"
    },
    {
      "name": "User Events"
    }
  ]
}