HubSpot-first booking
A booking widget that writes HubSpot first, lets the client’s own connector create the Arrivy task, then schedules and assigns the right rep to the slot the customer picked.
Data paths and guards
- HubSpot: Contacts, deals, meetings and tasks; the client’s own workflows build out each new deal.
- Booking widget: Next.js on Vercel: openings, booking, the task webhook and a reconcile every 5 minutes.
- Client’s connector: The connector the client already ran between HubSpot and Arrivy, which creates the field task.
- WhatConverts: Lead attribution for each booking.
- Arrivy: Field scheduling: each rep’s tasks, the task-created webhook and the event log.
- From Booking widget to HubSpot: Contact, deal, meeting. The contact, deal fields, a meeting at the booked time and a confirm task. A customer books a slot.
- From HubSpot to Client’s connector: Deal to the connector. The deal, once the client’s own workflows have built it out. The client’s own HubSpot automation.
- From Client’s connector to Arrivy: Task created. A new Arrivy task for the visit, created by the connector. The connector’s own sync.
- From Arrivy to Booking widget: Tasks and task events. Each rep’s booked tasks for openings, the task-created webhook and the event log. A calendar request, a new task, or the 5-minute reconcile.
- From Booking widget to Arrivy: Scheduled and assigned. The booked time and the chosen rep, written onto the task. The task-created webhook, and repairs from the reconcile.
- From Booking widget to HubSpot: Alert tasks. Tasks for the office, raised by the reconcile. The 5-minute reconcile.
- From Booking widget to WhatConverts: Lead attribution. Each booking, mirrored as a WhatConverts lead for attribution. Each booking.
- On Contact, deal, meeting: Write flags and portal check. HubSpot and Arrivy writes run only with their flags on, after the HubSpot portal is confirmed.
- On Tasks and task events: Reads past the 50-row page. Rep tasks are read page by page, because Arrivy returns at most 50 rows a page and a cut-off page would look like free time.
- On Scheduled and assigned: Never moves a crewed visit. The reconcile repairs the rep but never moves a crewed visit’s time, and leaves alone the edits people made, read from Arrivy’s event log.
- On Alert tasks: Fingerprinted alerts. Each alert carries a fingerprint, so closing it does not raise it again.
- Built by me
- Platforms I connect to
- Guards
- In production
| Contact, deal, meeting The contact, deal fields, a meeting at the booked time and a confirm task |
|---|
| Deal to the connector The deal, once the client’s own workflows have built it out |
| Task created A new Arrivy task for the visit, created by the connector |
| Tasks and task events Each rep’s booked tasks for openings, the task-created webhook and the event log |
| Scheduled and assigned The booked time and the chosen rep, written onto the task |
| Alert tasks Tasks for the office, raised by the reconcile |
| Lead attribution Each booking, mirrored as a WhatConverts lead for attribution |
-
Systems
The client runs sales in HubSpot and field visits in Arrivy, joined by its own connector, and tracks lead sources in WhatConverts. The booking widget is Next.js on Vercel: it shows real openings, writes HubSpot first and schedules the visit in Arrivy.
-
Data paths
The widget writes the contact, deal, meeting and a confirm task, and mirrors the lead to WhatConverts. The client’s connector creates the Arrivy task; its task-created webhook lets the widget schedule it to the picked slot and assign the rep. A reconcile every 5 minutes repairs drift and raises alerts.
- a Contact, deal, meeting
- b Deal to the connector
- c Task created
- d Tasks and task events
- e Scheduled and assigned
- f Alert tasks
- g Lead attribution
-
Guards
Writes run only behind flags and a portal check. Rep tasks are read past Arrivy’s 50-row page limit. The reconcile never moves a crewed visit or undoes an office edit, and its alerts carry fingerprints.
- Write flags and portal check on a
- Reads past the 50-row page on d
- Never moves a crewed visit on e
- Fingerprinted alerts on f
-
Result
A booking becomes a scheduled, assigned field task in about 104 seconds with no one touching it, and 24 of 121 new deals over most of August came through the widget.
What I built
- Openings computed from each rep’s existing Arrivy tasks, since Arrivy has no open-slots API, read page by page past its 50-row page size.
- A HubSpot-first booking: contact, deal fields, a meeting at the booked time and a confirm task, with every write behind a flag.
- An Arrivy webhook that schedules the task the client’s connector creates and assigns it to the exact slot and rep.
- A reconcile every 5 minutes that repairs rep assignment and tells edits made by people from edits made by the API, using Arrivy’s event log.
- One rep-selection rule shared by the widget, the booking route and the reconcile, following Arrivy’s active roster.
- A WhatConverts mirror for lead attribution, and 41 operational scripts for audits, censuses and end-to-end checks.
What the guards protect against
| The risk | The guard |
|---|---|
| A test or misconfigured deploy writes to the wrong portal. | Write flags and portal check HubSpot and Arrivy writes run only with their flags on, after the HubSpot portal is confirmed. |
| Booked reps show as free, and a slot is booked twice. | Reads past the 50-row page Rep tasks are read page by page, because Arrivy returns at most 50 rows a page and a cut-off page would look like free time. |
| The reconcile undoes a change the office made on purpose. | Never moves a crewed visit The reconcile repairs the rep but never moves a crewed visit’s time, and leaves alone the edits people made, read from Arrivy’s event log. |
| The same false alert keeps coming back to the office. | Fingerprinted alerts Each alert carries a fingerprint, so closing it does not raise it again. |
Decisions
-
Feed the client’s connector instead of writing Arrivy directly
- Chose
- The widget writes HubSpot first and lets the client’s own connector create the Arrivy task, then schedules that task when its webhook arrives.
- Instead of
- Creating the Arrivy task from the widget. With two writers on one external id, the client’s connector would create a second deal for each booking.
- Trade-off
- Each booking waits on the connector, which created the task for 17 of 20 widget bookings within 33 to 66 seconds.
Results
- Booking to a scheduled, assigned field task in about 104 seconds, with no one touching it.
- 24 of 121 new deals over most of August came through the widget.
- Production end-to-end runs passed 17 of 17 in August and 9 of 9 in September.
Facts
- 13 real bookings from July 23 to August 4, about one a day
- Page response time cut from about 7 seconds to about 0.3 seconds
- Arrivy’s rate limit measured at about 16 calls per 10 seconds
- Tests: 128 of 128 reconcile, 86 of 86 rep selection, 11 of 11 negative controls
Related builds
-
Multi-tenant booking platform
Date: Apr 2026
Fact: 4 live tenants, 21 of 21 production smoke checks on each
Client: For four roofing contractors
Systems: Zuper, Demand IQ and n8n
Status: In production
-
Two-way field-service sync
Date: Feb 2026
Fact: 11,683 deals and 8,182 tickets in a two-way sync
Client: For a commercial roofing service contractor
Systems: CenterPoint Connect, Zapier, QuickBooks Online and Make.com
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