Multi-tenant booking platform
Homeowners book appointments straight into Zuper from a widget branded for each contractor, and new leads receive a one-time booking link by email.
Data paths and guards
- Demand IQ: Lead capture on the contractor’s site; posts each new prospect by webhook.
- HubSpot forms: Website forms, whose conversions are read through a HubSpot OAuth app.
- Tenant store: Tenants, credentials, prefill tokens, webhook logs and the lead queue.
- Booking platform: Next.js on Vercel: the branded widget, 12 API routes and two cron jobs.
- n8n booking flow: Each tenant’s own n8n flow, which talks to Zuper.
- Resend email: Sends each tenant’s booking invite, in that tenant’s name, logo and colors.
- Zuper: Customers, jobs and the reps’ calendars.
- From Demand IQ to Booking platform: Lead webhooks. New prospects, logged and queued for an invite. A prospect is created in Demand IQ.
- From HubSpot forms to Booking platform: Form conversions. Website form submissions, read through the OAuth app. A HubSpot form conversion.
- From Booking platform to Tenant store: Tenants, tokens, queue. Tenant config and credentials, one-time prefill tokens and the lead queue. Every request and every cron run.
- From Booking platform to n8n booking flow: Slots and bookings. Openings requested and bookings confirmed, sent to the tenant’s own flow. A homeowner opens the calendar or confirms a slot.
- From n8n booking flow to Zuper: Customers and jobs. Scheduling lookups, Zuper customers and scheduled jobs. Each request from the platform.
- From Zuper to Booking platform: Rep lookups. Who holds each open slot, so staff who do not sell can be filtered out. Each availability request.
- From Booking platform to Resend email: Booking invites. A branded email with a one-time booking link, in the tenant’s own name and colors. A new lead, once its contact details exist.
- On Lead webhooks: Queue retry, atomic claims. A lead that arrives before its contact data is retried from a queue every 2 minutes, and an atomic claim lets only one run email it.
- On Tenant store: One-time prefill links. Each invite carries a prefill token that only a successful booking spends; a spent token is refused.
- On Booking platform: Real success, not a 200. The flow’s answer is read for success, not just its status code, so a booking Zuper rejected shows as failed.
- On Rep lookups: Sellers-only openings. Slots held by staff who do not sell are removed, and the booking route rejects a crafted request for one.
- Built by me
- Platforms I connect to
- Guards
- In production
| Lead webhooks New prospects, logged and queued for an invite |
|---|
| Form conversions Website form submissions, read through the OAuth app |
| Tenants, tokens, queue Tenant config and credentials, one-time prefill tokens and the lead queue |
| Slots and bookings Openings requested and bookings confirmed, sent to the tenant’s own flow |
| Customers and jobs Scheduling lookups, Zuper customers and scheduled jobs |
| Rep lookups Who holds each open slot, so staff who do not sell can be filtered out |
| Booking invites A branded email with a one-time booking link, in the tenant’s own name and colors |
-
Systems
Leads arrive from Demand IQ and HubSpot forms. The platform is Next.js on Vercel, with each contractor’s branding, credentials and lead queue in Supabase. Each tenant’s n8n flow talks to Zuper, where the jobs and the reps’ calendars live, and Resend sends the invites.
-
Data paths
A new lead becomes a branded email, sent through Resend, with a one-time booking link. The homeowner picks from openings held by reps who sell, the tenant’s n8n flow books the slot, and Zuper holds the customer and the scheduled job.
- a Lead webhooks
- b Form conversions
- c Tenants, tokens, queue
- d Slots and bookings
- e Customers and jobs
- f Rep lookups
- g Booking invites
-
Guards
Leads that arrive before their contact data are retried from a queue under atomic claims. Invite links work once. The flow’s answer is checked for real success, and slots held by staff who do not sell are filtered out.
- Queue retry, atomic claims on a
- One-time prefill links on Store
- Real success, not a 200 on d
- Sellers-only openings on f
-
Result
All 4 tenants pass a 21-check production smoke test. A real Demand IQ lead became an invite in 4 seconds, and a synthetic booking completed in about 4.5 seconds.
What I built
- A Next.js and Supabase platform where each contractor is a row: branding, services, credentials, allowed origins and an optional custom domain.
- 12 API routes on Vercel, with each tenant’s credentials resolved on the server and none sent to the browser.
- Lead-to-invite flows from Demand IQ and HubSpot forms, with a queue-backed retry, atomic claims and one-time prefill links.
- An availability filter that removes staff who do not sell from every slot, and rejects crafted bookings at the booking route.
- The n8n booking flow, inherited rather than designed: changed through the n8n API by scripts that check the live flow before and after, then cloned and parameterized for each tenant.
- Onboarding scripts that clone, seed and smoke-test a tenant against production with 21 checks.
What the guards protect against
| The risk | The guard |
|---|---|
| A lead that arrives early is never emailed, or is emailed twice. | Queue retry, atomic claims A lead that arrives before its contact data is retried from a queue every 2 minutes, and an atomic claim lets only one run email it. |
| An invite link books twice, or an old link is reused. | One-time prefill links Each invite carries a prefill token that only a successful booking spends; a spent token is refused. |
| A booking Zuper rejected still shows as a success. | Real success, not a 200 The flow’s answer is read for success, not just its status code, so a booking Zuper rejected shows as failed. |
| Homeowners book slots no real rep can take. | Sellers-only openings Slots held by staff who do not sell are removed, and the booking route rejects a crafted request for one. |
Results
- 4 contractors live, and all 4 pass the 21-check production smoke test.
- A real Demand IQ lead became a branded invite in 4 seconds, and a synthetic booking completed in about 4.5 seconds.
- The availability filter passed 36 of 36 tests, including live legs, and an excluded user was absent on 4 of 4 future dates.
Facts
- A HubSpot form submission reached the lead’s inbox as an invite in about 20 seconds
- Contractors two to four were onboarded in about three weeks
- A tenant can send its invites from its own verified domain
Related builds
-
HubSpot-first booking
Date: Apr 2026
Fact: Booking to an assigned field task in about 104 seconds, fully automatic
Client: For a residential roofing contractor
Systems: Arrivy and WhatConverts
Status: In production
-
Multi-tenant event processor
Date: Jun 2026
Fact: 10,630 events in 7 days through the queue that replaced Make.com
Client: For a multi-brand roofing company
Systems: AccuLynx and Make.com
Status: In production
-
Field-service rollout
Date: Jul 2026
Fact: 4 job types, with up to 15 gated statuses and 131 checklist fields
Client: For a commercial roofing contractor
Systems: Zuper and Dataforma
Status: In production