{
  "name": "Validate, deduplicate, and store customers via API with Supabase, Slack, Telegram, and email",
  "nodes": [
    {
      "id": "dc2de4d0-3e21-4179-90cf-1813a44e8014",
      "name": "Validate & Clean Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -1872,
        800
      ]
    },
    {
      "id": "1cbbb901-4ace-455d-a373-6ba97bd96d8f",
      "name": "Check Existing User",
      "type": "n8n-nodes-base.supabase",
      "position": [
        -1424,
        704
      ]
    },
    {
      "id": "bb13e6d0-6579-48f8-b61c-638d0f0a6a45",
      "name": "User Already Exists?",
      "type": "n8n-nodes-base.if",
      "position": [
        -1200,
        704
      ]
    },
    {
      "id": "c78819eb-dfed-4629-a167-ee4e38ca63f4",
      "name": "Create User",
      "type": "n8n-nodes-base.supabase",
      "position": [
        -976,
        608
      ]
    },
    {
      "id": "bd5804cf-c607-4a71-89ac-92884943054a",
      "name": "API User Exists",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -528,
        800
      ]
    },
    {
      "id": "9031719b-ad70-4b4f-9dcd-869688344396",
      "name": "API Validation Error",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -528,
        992
      ]
    },
    {
      "id": "41eaae3d-92df-4165-97cd-f2ebfe2485fc",
      "name": "Customer API1",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -2096,
        800
      ]
    },
    {
      "id": "d4817e2b-5385-4933-8dd7-6a3917e42f90",
      "name": "API Success Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -752,
        608
      ]
    },
    {
      "id": "4f1f7efd-f1ce-46ca-97b1-27a2df853b97",
      "name": "Slack Notify",
      "type": "n8n-nodes-base.slack",
      "position": [
        -304,
        800
      ]
    },
    {
      "id": "6f8c32e2-387b-4dde-a761-ed565c0cc6d4",
      "name": "Telegram Notify",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -80,
        800
      ]
    },
    {
      "id": "86cf5e69-b4c4-404e-868d-aee531dba0f3",
      "name": "Send Notifiaction to User",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -528,
        608
      ]
    },
    {
      "id": "bef9b23b-e614-4c63-9c23-b5b3b0c8805b",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2240,
        528
      ],
      "parameters": {
        "width": 736,
        "height": 448,
        "content": "# API & Validation Layer \n\n## Description\n**This section receives customer data via an API call and performs centralized validation and cleanup. It standardizes names, emails and phone numbers, aggreg"
      }
    },
    {
      "id": "f094d656-640f-4dad-8287-367b435a2d26",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1472,
        368
      ],
      "parameters": {
        "width": 848,
        "height": 608,
        "content": "# Duplicate Check & Database Logic\n\n## Description\n**This section checks Supabase to determine whether a customer already exists based on email. It prevents duplicate records, routes existing users to"
      }
    },
    {
      "id": "93a5eced-ca9c-4663-a314-d9f84437cea3",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -592,
        368
      ],
      "parameters": {
        "width": 720,
        "height": 768,
        "content": "# Notifications & API Responses \n\n## Description\n**This section handles final API responses and notifications. It sends success or failure responses back to the client and notifies internal teams via "
      }
    },
    {
      "id": "343a5e2a-bf8d-4936-b92b-6afc95096b34",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2960,
        272
      ],
      "parameters": {
        "width": 688,
        "height": 688,
        "content": "## How It Works\n* The workflow starts when a client sends a **POST request** to the n8n webhook endpoint with customer details such as first name, last name, email and phone number. The webhook behave"
      }
    },
    {
      "id": "75ed8bdb-bff5-4138-9099-5d24213e9c0a",
      "name": "Is Validation Passed?",
      "type": "n8n-nodes-base.if",
      "position": [
        -1648,
        800
      ]
    }
  ],
  "connections": {
    "Create User": {
      "main": [
        [
          {
            "node": "API Success Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack Notify": {
      "main": [
        [
          {
            "node": "Telegram Notify",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Customer API1": {
      "main": [
        [
          {
            "node": "Validate & Clean Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "API User Exists": {
      "main": [
        [
          {
            "node": "Slack Notify",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Existing User": {
      "main": [
        [
          {
            "node": "User Already Exists?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "API Success Response": {
      "main": [
        [
          {
            "node": "Send Notifiaction to User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "API Validation Error": {
      "main": [
        [
          {
            "node": "Slack Notify",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "User Already Exists?": {
      "main": [
        [
          {
            "node": "API User Exists",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Validation Passed?": {
      "main": [
        [
          {
            "node": "Check Existing User",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "API Validation Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate & Clean Data": {
      "main": [
        [
          {
            "node": "Is Validation Passed?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Notifiaction to User": {
      "main": [
        [
          {
            "node": "Slack Notify",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}