{
  "name": "Enrich event registrations with HubSpot, Clearbit, LinkedIn and Gemini AI",
  "nodes": [
    {
      "id": "7ca87806-e687-4892-ab6a-bcf07f130b05",
      "name": "Receive Registration Beacon",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -704,
        640
      ]
    },
    {
      "id": "d72d293b-6ab6-42f6-85c4-2785e8a7251a",
      "name": "Log Beacon to Data Table",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -480,
        640
      ]
    },
    {
      "id": "1be269bc-ff7d-4e79-acdb-47091a3a2acf",
      "name": "Respond OK to Beacon",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -272,
        640
      ]
    },
    {
      "id": "e2492242-5a52-4574-b729-d877c9e92be3",
      "name": "Receive Registration",
      "type": "n8n-nodes-base.webhook",
      "position": [
        0,
        608
      ]
    },
    {
      "id": "6ec9c2ae-4317-423b-bda1-255784a26e55",
      "name": "Validate Registration Data",
      "type": "n8n-nodes-base.code",
      "position": [
        208,
        608
      ]
    },
    {
      "id": "a94234c5-a958-4dbd-a655-2acfb2cbbc6b",
      "name": "Check Validation Result",
      "type": "n8n-nodes-base.if",
      "position": [
        448,
        608
      ]
    },
    {
      "id": "474dcd5b-e9ab-4f88-87c4-bffebab4bf87",
      "name": "Respond Validation Error",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        448,
        800
      ]
    },
    {
      "id": "a45cab37-daf3-4cc5-9e14-a3a13f71b8dd",
      "name": "Create or Update HubSpot Contact",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        656,
        592
      ]
    },
    {
      "id": "a72969b6-6c4c-4940-ad6c-9c65040047ea",
      "name": "Respond Registration Success",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        848,
        544
      ]
    },
    {
      "id": "8e4e5e97-580a-473d-8e33-f85104eff2ff",
      "name": "Merge Registration and Enrichment",
      "type": "n8n-nodes-base.code",
      "position": [
        4512,
        608
      ]
    },
    {
      "id": "72a44d6c-bb97-44ce-87ab-3a5bee91964e",
      "name": "Send Confirmation Email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        4784,
        480
      ]
    },
    {
      "id": "46320f5d-dbe4-4323-95a9-e8698c48257f",
      "name": "Post to Slack Registrations",
      "type": "n8n-nodes-base.slack",
      "position": [
        4784,
        640
      ]
    },
    {
      "id": "d84bfc2b-7b30-40a4-b552-f6e823dc9cb2",
      "name": "Has Promo Code?",
      "type": "n8n-nodes-base.if",
      "position": [
        4784,
        800
      ]
    },
    {
      "id": "778f5128-1574-4595-a25c-30a75a9501e4",
      "name": "Log Promo Code Usage",
      "type": "n8n-nodes-base.code",
      "position": [
        5024,
        800
      ]
    },
    {
      "id": "e02eb807-bab6-494b-8652-a3624e53528f",
      "name": "Prepare Analytics Row",
      "type": "n8n-nodes-base.code",
      "position": [
        4784,
        960
      ]
    },
    {
      "id": "708dcdaf-6d22-4af4-84ed-5b5ea52b4145",
      "name": "Log Registration Analytics",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        5024,
        960
      ]
    },
    {
      "id": "sticky-intro-reg",
      "name": "Intro — Registration Processor",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1456,
        384
      ],
      "parameters": {
        "width": 660,
        "height": 1100,
        "content": "## Event Registration + Auto-Enrichment \n\n### **What it does:**\nComplete event registration intelligence in a single workflow:\n1. **One-page registration** — 4 fields, instant confirmation\n2. **Auto-e"
      }
    },
    {
      "id": "sticky-beacon",
      "name": "Section 1 — Beacon",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -768,
        384
      ],
      "parameters": {
        "width": 676,
        "height": 492,
        "content": "## 1. Abandoned Cart Beacon\n\nThe HTML page fires a `form_started` beacon on page load. This creates a `started` record. If the user submits, it updates to `confirmed`. If they don't submit within 1h →"
      }
    },
    {
      "id": "sticky-validate",
      "name": "Section 2 — Validate & Create HubSpot Contact",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -64,
        384
      ],
      "parameters": {
        "width": 1080,
        "height": 560,
        "content": "## 2. Validate & Create HubSpot Contact\n\nServer-side validation (required fields, email format) → **HubSpot upsert** (create if new, update if email exists).\n\nSets `lifecycle_stage=lead`, `lead_status"
      }
    },
    {
      "id": "sticky-enrichment",
      "name": "Section 3 — Enrichment Waterfall",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        384
      ],
      "parameters": {
        "width": 3356,
        "height": 820,
        "content": "## 3. Enrichment Waterfall (Async)\n\nRuns AFTER the webhook has responded. Waterfall stops early when enough data is found — saves API costs.\n\n**Step 1:** Cache check (skip if recently enriched with sc"
      }
    },
    {
      "id": "sticky-notify",
      "name": "Section 4 — Notify & Log",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4448,
        384
      ],
      "parameters": {
        "width": 808,
        "height": 828,
        "content": "## 4. Notify & Log\n\nAfter enrichment merges back:\n- **Confirmation email** with event details\n- **Slack notification** with enriched data\n- **Promo code credit** (if applicable)\n- **Analytics log** fo"
      }
    },
    {
      "id": "sticky-errors",
      "name": "Section — Error Handling",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4448,
        1248
      ],
      "parameters": {
        "width": 680,
        "height": 240,
        "content": "## ⚠️ Error Handling\n\nAll non-critical nodes in this workflow use `continueOnFail`:\n- **HubSpot** unreachable → registration still responds to user\n- **Enrichment APIs** fail → registration confirmed,"
      }
    },
    {
      "id": "sticky-contact-reg",
      "name": "Contact — Braia Labs",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6432,
        384
      ],
      "parameters": {
        "width": 560,
        "height": 1160,
        "content": "## Was this helpful? Get in touch!\n\n[![clic](https://vptkuqoipqbebipqjnqw.supabase.co/storage/v1/object/public/Milo%20Bravo/seeAxWUupcOOXY5tntexZ_video.gif)](https://tally.so/r/EkKGgB)\n\nI really hope "
      }
    },
    {
      "id": "d449cc49-45b2-418f-8a62-0c1a51c79dab",
      "name": "Initialize Enrichment State",
      "type": "n8n-nodes-base.code",
      "position": [
        1184,
        688
      ]
    },
    {
      "id": "cc455412-e21a-461f-9af6-58f407b7dcb2",
      "name": "Check Enrichment Cache",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1360,
        688
      ]
    },
    {
      "id": "2ecd0874-edaf-4cf1-9c07-1c3c82b177ae",
      "name": "Cache Hit with Good Score?",
      "type": "n8n-nodes-base.if",
      "position": [
        1648,
        688
      ]
    },
    {
      "id": "d75efb87-f909-49e7-a174-b0b917cfa335",
      "name": "Return Cached Profile",
      "type": "n8n-nodes-base.code",
      "position": [
        4016,
        528
      ]
    },
    {
      "id": "6bd3163d-9f0c-4641-90b8-63a80c6bc613",
      "name": "Enrich via Clearbit",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1888,
        704
      ]
    },
    {
      "id": "05f39e8d-75b9-4158-8927-63b4a7718aad",
      "name": "Parse Clearbit Results",
      "type": "n8n-nodes-base.code",
      "position": [
        2096,
        704
      ]
    },
    {
      "id": "2d76e5d5-72fd-4b95-a445-a1d248e4de00",
      "name": "Enough Data After Clearbit?",
      "type": "n8n-nodes-base.if",
      "position": [
        2304,
        704
      ]
    },
    {
      "id": "6be306be-2068-45a7-aeba-ae93c10a85ef",
      "name": "Enrich via Proxycurl LinkedIn",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2592,
        784
      ]
    },
    {
      "id": "a8575fed-1043-4d21-bb02-de2027489eac",
      "name": "Parse Proxycurl Results",
      "type": "n8n-nodes-base.code",
      "position": [
        2832,
        784
      ]
    },
    {
      "id": "fc98c6cb-785a-4215-bbb4-268423caeed9",
      "name": "Enough Data After LinkedIn?",
      "type": "n8n-nodes-base.if",
      "position": [
        3056,
        784
      ]
    },
    {
      "id": "7f2bf671-afb8-4983-8905-e26b1d039b8c",
      "name": "Search Google for Person",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3280,
        880
      ]
    },
    {
      "id": "7c6a3fa2-a4f4-43c6-b80a-f576f72fa118",
      "name": "Extract Intelligence with Gemini",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        3504,
        880
      ]
    },
    {
      "id": "6ad08f42-2937-45ae-bab6-d1d50bf69dfa",
      "name": "Google Gemini for Extraction",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        3504,
        1056
      ]
    },
    {
      "id": "c49f9ad8-311e-41dd-a3b6-ce48b3b93382",
      "name": "Merge AI Extraction Results",
      "type": "n8n-nodes-base.code",
      "position": [
        3824,
        880
      ]
    },
    {
      "id": "d383b947-ff2e-47ff-a4b8-d22950f29650",
      "name": "Score Data Completeness",
      "type": "n8n-nodes-base.code",
      "position": [
        4016,
        704
      ]
    },
    {
      "id": "19cda09e-248c-4f94-ba3d-2236385d668b",
      "name": "Cache Enriched Profile",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        4192,
        832
      ]
    },
    {
      "id": "sticky-cost",
      "name": "Section — Cost Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2800,
        1264
      ],
      "parameters": {
        "width": 560,
        "height": 204,
        "content": "## ⚠️ API Cost Management\n\nWaterfall stops early when \"good enough\":\n- **Clearbit**: ~$0.05-0.10/lookup (highest ROI)\n- **Proxycurl**: ~$0.01/credit (only if Clearbit has gaps)\n- **SerpAPI + Gemini**:"
      }
    },
    {
      "id": "dd444c0a-26ce-4f98-b9e1-ef1522dbe6be",
      "name": "Receive Promo Code Validation",
      "type": "n8n-nodes-base.webhook",
      "position": [
        5392,
        592
      ]
    },
    {
      "id": "b343e4d1-486c-4f21-a9a6-67d0dd49ef15",
      "name": "Parse Promo Code",
      "type": "n8n-nodes-base.code",
      "position": [
        5712,
        592
      ]
    },
    {
      "id": "6d977e9f-cc2a-4ec0-9bf9-122ae60f704e",
      "name": "Lookup Promo Code",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        5984,
        592
      ]
    },
    {
      "id": "0da85a5b-4f08-4aa4-92eb-4ad5dd77f9db",
      "name": "Validate Promo Code",
      "type": "n8n-nodes-base.code",
      "position": [
        6208,
        592
      ]
    },
    {
      "id": "23b55f05-fe50-4632-b3b7-a152ed44cad5",
      "name": "Log Promo Code to Data Table",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        5728,
        832
      ]
    },
    {
      "id": "b67418e4-ef15-414e-b424-6a30849d5165",
      "name": "Respond with Promo Validation",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        5392,
        816
      ]
    },
    {
      "id": "sticky-intro-ref",
      "name": "Section 5 — Promo Code Validation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5296,
        384
      ],
      "parameters": {
        "width": 1096,
        "height": 832,
        "content": "## 5. Promo Code Validation (Separate Webhook)\n\nAJAX endpoint (`POST /validate-promo`) called by the HTML registration page. Validates codes against a Data Table: checks expiry date, usage limits, act"
      }
    }
  ],
  "connections": {
    "Has Promo Code?": {
      "main": [
        [
          {
            "node": "Log Promo Code Usage",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Parse Promo Code": {
      "main": [
        [
          {
            "node": "Lookup Promo Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Lookup Promo Code": {
      "main": [
        [
          {
            "node": "Validate Promo Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enrich via Clearbit": {
      "main": [
        [
          {
            "node": "Parse Clearbit Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Promo Code": {
      "main": [
        [
          {
            "node": "Log Promo Code to Data Table",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Promo Code Usage": {
      "main": [
        [
          {
            "node": "Respond with Promo Validation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive Registration": {
      "main": [
        [
          {
            "node": "Validate Registration Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Analytics Row": {
      "main": [
        [
          {
            "node": "Log Registration Analytics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Return Cached Profile": {
      "main": [
        [
          {
            "node": "Merge Registration and Enrichment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Enrichment Cache": {
      "main": [
        [
          {
            "node": "Cache Hit with Good Score?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Clearbit Results": {
      "main": [
        [
          {
            "node": "Enough Data After Clearbit?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Validation Result": {
      "main": [
        [
          {
            "node": "Create or Update HubSpot Contact",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Respond Validation Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Proxycurl Results": {
      "main": [
        [
          {
            "node": "Enough Data After LinkedIn?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Score Data Completeness": {
      "main": [
        [
          {
            "node": "Cache Enriched Profile",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge Registration and Enrichment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Beacon to Data Table": {
      "main": [
        [
          {
            "node": "Respond OK to Beacon",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Google for Person": {
      "main": [
        [
          {
            "node": "Extract Intelligence with Gemini",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cache Hit with Good Score?": {
      "main": [
        [
          {
            "node": "Return Cached Profile",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Enrich via Clearbit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Registration Data": {
      "main": [
        [
          {
            "node": "Check Validation Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enough Data After Clearbit?": {
      "main": [
        [
          {
            "node": "Score Data Completeness",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Enrich via Proxycurl LinkedIn",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enough Data After LinkedIn?": {
      "main": [
        [
          {
            "node": "Score Data Completeness",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Search Google for Person",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Initialize Enrichment State": {
      "main": [
        [
          {
            "node": "Check Enrichment Cache",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge AI Extraction Results": {
      "main": [
        [
          {
            "node": "Score Data Completeness",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive Registration Beacon": {
      "main": [
        [
          {
            "node": "Log Beacon to Data Table",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini for Extraction": {
      "ai_languageModel": [
        [
          {
            "node": "Extract Intelligence with Gemini",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Log Promo Code to Data Table": {
      "main": [
        [
          {
            "node": "Respond with Promo Validation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enrich via Proxycurl LinkedIn": {
      "main": [
        [
          {
            "node": "Parse Proxycurl Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive Promo Code Validation": {
      "main": [
        [
          {
            "node": "Parse Promo Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create or Update HubSpot Contact": {
      "main": [
        [
          {
            "node": "Respond Registration Success",
            "type": "main",
            "index": 0
          },
          {
            "node": "Initialize Enrichment State",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Intelligence with Gemini": {
      "main": [
        [
          {
            "node": "Merge AI Extraction Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Registration and Enrichment": {
      "main": [
        [
          {
            "node": "Send Confirmation Email",
            "type": "main",
            "index": 0
          },
          {
            "node": "Post to Slack Registrations",
            "type": "main",
            "index": 0
          },
          {
            "node": "Has Promo Code?",
            "type": "main",
            "index": 0
          },
          {
            "node": "Prepare Analytics Row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}