Matthew Jeter M. Ziemba

Multi-tenant event processor

Replaced a Make.com scenario with a queue-backed TypeScript processor that turns AccuLynx webhooks into HubSpot records for every location, cut over behind a shadow run and a canary.

For
A multi-brand roofing company
When
November 2025 to now
Status
In production since June 2026
Role
Took over the live connector; designed, built, cut over and own its replacement
Systems
AccuLynx, HubSpot and Make.com

Data paths and guards

HubSpotSlack alertsEdge gatewayEvent queueMake.com scenarioAccuLynx, each locationHubSpotSlack alertsEdge gatewayEvent queueMake.com scenarioAccuLynx, each locationEvent processorVia the edge gatewayDirect subscriptionsQueued, claimed, loggedContacts and dealsHealth alertsOld route, off at cutoverMirrored, then the only route503 until it is queuedClaims, backoff, dead lettersUpserts by AccuLynx idShadow run, then a canaryRefuses the retired database HubSpotSlackGatewayQueueMake.comAccuLynxHubSpotSlackGatewayQueueMake.comAccuLynxProcessorabcdefg
  1. HubSpot: Contacts and deals for every location and brand.
  2. Slack alerts: Health alerts from a monitor that runs every 5 minutes.
  3. Edge gateway: A Cloudflare Worker in front of the old scenario: it mirrored traffic, then flipped its route.
  4. Event processor: Ingress, cron worker, 15-topic router and health monitor, in TypeScript on Vercel.
  5. Event queue: Postgres queue with claims, dead letters and an event log, on Supabase.
  6. Make.com scenario: The old scenario: shadowed, then switched off on cutover day.
  7. AccuLynx, each location: Jobs and contacts for each location, and the webhooks that announce changes.
  8. From AccuLynx, each location to Edge gateway: Via the edge gateway. Job and contact events from the locations whose webhooks pass through the Worker. A change in AccuLynx.
  9. From AccuLynx, each location to Event processor: Direct subscriptions. Job and contact events from the subscriptions re-registered to post straight to the ingress. A change in AccuLynx.
  10. From Event processor to Event queue: Queued, claimed, logged. Each deduped event, its claims and retries, dead letters and the event log. Each webhook, and a worker run every minute.
  11. From Event processor to HubSpot: Contacts and deals. Contacts and deals created or updated from a fresh read of the AccuLynx record. Each claimed event, routed by its topic.
  12. From Event processor to Slack alerts: Health alerts. Unreplayed dead letters, a queue backlog, stuck claims or too few active connections. The monitor, every 5 minutes, finds a problem.
  13. From Edge gateway to Make.com scenario: Old route, off at cutover. Each event, as before, until the route flip on cutover day. Every event before the flip.
  14. From Edge gateway to Event processor: Mirrored, then the only route. A copy of each event during the shadow run, then every event after the flip. Shadow mode, then the route flip.
  15. On Direct subscriptions: 503 until it is queued. If the queue write fails, the ingress answers 503, so AccuLynx sends the event again.
  16. On Event queue: Claims, backoff, dead letters. Workers claim rows with SKIP LOCKED; a failure backs off and retries, and repeat failures go to dead letters with a bounded replay.
  17. On Contacts and deals: Upserts by AccuLynx id. Deals are upserted on an AccuLynx job id property, so a repeated event updates the record instead of making another.
  18. On Mirrored, then the only route: Shadow run, then a canary. Live traffic was mirrored to the processor first; then a replay of 205 real jobs passed, and 8 companies ran on it alone before the flip.
  19. On Event queue: Refuses the retired database. The config needs one database address and refuses to start against the retired host.
  • Built by me
  • Platforms I connect to
  • Guards
  • Data paths
  • In production

Data paths
Via the edge gateway Job and contact events from the locations whose webhooks pass through the Worker
Direct subscriptions Job and contact events from the subscriptions re-registered to post straight to the ingress
Queued, claimed, logged Each deduped event, its claims and retries, dead letters and the event log
Contacts and deals Contacts and deals created or updated from a fresh read of the AccuLynx record
Health alerts Unreplayed dead letters, a queue backlog, stuck claims or too few active connections
Cutover
Old route, off at cutover Each event, as before, until the route flip on cutover day
Mirrored, then the only route A copy of each event during the shadow run, then every event after the flip
  1. Systems

    Each location runs its own AccuLynx account, and the company works in HubSpot. The old Make.com scenario sat behind a Cloudflare Worker. Its replacement is a TypeScript processor on Vercel, with a Postgres queue on Supabase and health alerts in Slack.

  2. Data paths

    AccuLynx sends job and contact webhooks, most through the Worker and the rest directly. The ingress dedupes and queues each event, and a worker claims it, routes it by topic and upserts contacts and deals in HubSpot. A monitor checks the queue every 5 minutes and alerts in Slack.

    • a Via the edge gateway
    • b Direct subscriptions
    • c Queued, claimed, logged
    • d Contacts and deals
    • e Health alerts
  3. Cutover

    The Worker mirrored live traffic to the processor while Make kept writing. A replay of 205 real jobs passed with 0 dead letters, 8 companies ran on the processor alone, and on June 20 the route flipped and Make was switched off.

    • f Old route, off at cutover
    • g Mirrored, then the only route
  4. Guards

    A failed queue write answers 503, so AccuLynx sends the event again. Claims, backoff and dead letters keep every event. Upserts by AccuLynx id stop duplicates, the canary checked values before the flip, and the config refuses the retired database.

    • 503 until it is queued on b
    • Claims, backoff, dead letters on Queue
    • Upserts by AccuLynx id on d
    • Shadow run, then a canary on g
    • Refuses the retired database on Queue
  5. Result

    Every location moved off Make.com. In the 7 days to July 7, 10,630 events were done, at a 1.5-second median over a 48-hour sample.

One no-code scenario for every location, with no view of failures

The inherited connector ran every AccuLynx location through one Make.com scenario. It matched contacts by email, had consumed 441K+ operations, shared one HubSpot search rate ceiling across every location, and had no retries and no view of what failed.

What I built

What the guards protect against

The risk The guard
An event is acknowledged but never stored. 503 until it is queued If the queue write fails, the ingress answers 503, so AccuLynx sends the event again.
Two workers take the same event, or a failed one is dropped. Claims, backoff, dead letters Workers claim rows with SKIP LOCKED; a failure backs off and retries, and repeat failures go to dead letters with a bounded replay.
A retried or repeated event creates a duplicate deal. Upserts by AccuLynx id Deals are upserted on an AccuLynx job id property, so a repeated event updates the record instead of making another.
The new path raises no errors but writes the wrong values. Shadow run, then a canary Live traffic was mirrored to the processor first; then a replay of 205 real jobs passed, and 8 companies ran on it alone before the flip.
Stale settings send writes to a frozen copy while health checks stay green. Refuses the retired database The config needs one database address and refuses to start against the retired host.

Decisions

  1. Replace the scenario instead of extending it

    Chose
    A multi-tenant TypeScript processor on Vercel with a Postgres queue, built to take over everything the Make.com scenario did.
    Instead of
    Keep extending the Make.com scenario. One scenario shared one HubSpot search rate ceiling across every location, and it had no retries and no dead-letter view.
    Trade-off
    Every behavior of a 140-module scenario had to be ported and proven, checked by a diff against the live scenario before cutover.
  2. Flip the route at the edge, since one account was out of reach

    Chose
    Mirror live traffic through the Cloudflare Worker that already sat in front of Make, then flip its route, with an instant way back.
    Instead of
    Re-pointing every AccuLynx webhook subscription. There was no access to one tenant’s AccuLynx account, so its webhooks could not be re-pointed.
    Trade-off
    Some subscriptions posted straight to Make, past the Worker, so they were re-registered alongside the old ones and both paths ran until they converged on the same HubSpot ids.
  3. Prove the values with a canary, not only the shadow run

    Chose
    After the shadow run, 8 companies ran on the new processor alone, and the canary came through clean at 164 of 164.
    Instead of
    Cutting over on the shadow run alone. A shadow run shows that the new path raises no errors, not that the values it writes are right.
    Trade-off
    For those 8 companies Make was paused, so the new processor was their only writer before the flip.

Results

  • Every AccuLynx location cut over, most through the edge gateway and the rest re-registered to post directly.
  • Before the flip, 205 of 205 real jobs replayed with 0 dead letters, and an 8-company canary came through clean.
  • 10,630 events done in the 7 days to July 7, at a 1.5-second median over a 48-hour sample.

Kept from this build: a scheduled job is proven only by its own schedule, so the replay cron was tested by letting its schedule replay a test dead letter.

Facts

  • Session advisory locks proved unsafe through the pooler, so enum self-heal takes transaction locks
  • Rep names backfilled onto 179,267 of 196,292 deals, 91.3% coverage
  • Brands backfilled onto 24,735 deals and 17,303 contacts
  • Before cutover, 8 of 8 malformed inputs were handled with 0 dead letters
  • A failed health check also fails the Vercel cron, so an alert never rests on Slack alone
  1. 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

  2. Two-way ERP sync

    Date: Aug 2026

    Fact: 11,598 deals linked to the ERP

    Client: For a commercial roofing contractor

    Systems: Dataforma

    Status: In production

  3. 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