Skip to content
Manan Asim

RevOps & financial systems

An automated invoicing engine across HubSpot, Make.com and QuickBooks

Five billing models, one order-to-cash pipeline: a Closed Won deal in HubSpot becomes an invoice in QuickBooks Online without anyone retyping it. The build had been paused mid-migration and was failing in four places ahead of its production rollout. I audited it, fixed it and documented it.

By Updated

Key figures

Scope and diagnostic figures from the engagement

  • 5billing models handled by one pipeline
  • 55queued webhooks drained, with none left unresolved
  • 49legacy recurring templates paused before they could double-bill
  • 20workflows audited and documented

Engagement

Client
The Warren Group
Sector
B2B data and analytics
Engagement
Audit, stabilisation and documentation
My role
Technical audit, workflow stabilisation, integration debugging and architecture documentation
Delivered
At Growlyze Technologies
Download case study (PDF)

Tech stack

  • HubSpot CRM
  • HubSpot Workflows
  • Make.com
  • QuickBooks Online
  • Google Apps Script
  • Webhooks

Architecture

How the pieces connect

  1. 01 Deal
    • Closed Won in HubSpotline items normalised onto the deal
  2. 02 Schedule
    • Apps Script schedulerfirst and next invoice dates
  3. 03 Dispatch
    • Five billing workflowsprepaid to annual
    • Suppression checkcancelled or suspended never bill
    • Date guardfuture waits, today fires
  4. 04 Make.com
    • Customer resolutionfive-step fallback
    • SKU match and invoice buildguarded by customer ID
  5. 05 QuickBooks
    • Invoice created
    • IDs written back to HubSpotinvoice and customer
  • Source
  • Step
  • Logic
  • Output

01 · Challenge

A paused build was due for production with four live faults: 49 recurring invoice templates still active in an old QuickBooks trial account, 55 webhooks queued and failing customer matching, date-delay actions erroring on same-day and past dates, and no documentation anyone could work from.

02 · Strategy

Audit before touching anything: 20 workflows, the Make.com scenario blueprint, the webhook queue and both QuickBooks environments. Then fix each fault at its cause, with date guards ahead of every delay and a five-step customer lookup that falls back instead of failing.

03 · Impact

Delay errors eliminated across the monthly, annual and one-time workflows. All 49 legacy templates paused and all 55 queued webhooks processed with no data loss and no duplicate customers. A full architecture guide and a 20-workflow audit matrix handed over.

01Context

The client sells data and analytics to businesses under five different billing structures: prepaid contracts, one-time orders, and monthly, quarterly and annual subscriptions. Entering those into QuickBooks by hand meant delayed billing cycles and revenue leaking through the gaps, so the goal was a pipeline that turns a Closed Won deal in HubSpot into an accurate invoice on its own.

An initial multi-phase build had been paused while the client cleaned its data and moved to a new QuickBooks sandbox. When it was picked back up ahead of production, it was failing in four places and nobody had a single document describing how it was supposed to work.

02Architecture: four layers

The system removes the handoff between sales and finance while staying inside what HubSpot’s workflows can natively do.

  1. Normalise the deal in HubSpot

    On Closed Won, workflows copy line-item details such as billing frequency, prepaid status, notes and the QuickBooks SKU onto the parent deal, turn two-letter state codes into full state names, and backfill missing billing fields from the contact or company.

  2. Schedule recurring invoices in Apps Script

    For recurring contracts, a Google Apps Script works out the first invoice date, standardised to the first of the month after data delivery starts, and the next invoice date. It logs the schedule in a tracking sheet and runs on the first of each month to advance due dates and start renewal cycles.

  3. Dispatch from five HubSpot workflows

    One workflow per billing model evaluates the cadence, checks the deal against a cancelled-or-suspended suppression list, guards its date-based delays, stamps the send date and posts a JSON payload to Make.com.

  4. Build the invoice in Make.com and QuickBooks

    A multi-router scenario takes the deal ID, fetches the deal and its line items, resolves or creates the QuickBooks customer, matches SKUs to products and services, creates the invoice, and writes the invoice and customer IDs back to HubSpot.

03What the audit found, and the fix for each

Before any live workflow was changed, I audited all 20 HubSpot workflows, the Make.com scenario blueprint, the webhook queue and both QuickBooks environments. Four failure points came out of it.

What was failingThe fix
Date delays. HubSpot’s delay-until-a-date action throws an error and falls straight through to the webhook when the target date is today or already past.A date-guard branch ahead of every delay step. Future dates wait cleanly until just after midnight Eastern on the day; same-day and past dates skip the delay and fire immediately, with no error.
Customer lookup. Migrated deals carried customer IDs from the old trial account, so direct lookups failed, and deals with no company name broke customer creation.An ignore handler on the direct lookup, so a dead ID cascades into the name, billing email and vendor checks, plus a fallback to the deal name when the company name is empty.
Two live billing environments. 49 recurring invoice templates were still active in the legacy QuickBooks trial account, risking duplicate or misrouted bills.All 51 recurring templates audited, the 49 active schedules paused, and the remaining two confirmed expired with no future run dates.
A backed-up queue. 55 webhooks had accumulated while the scenario was paused, and invoice creation halted on empty line arrays because the SKUs were not yet in the new QuickBooks catalogue.All 55 processed with nothing left unresolved and customer creation verified across the batch. The missing product catalogue was isolated as a prerequisite and put to the client for sign-off.

04Five billing models, one set of rules

Every workflow enforces the suppression list first, so a cancelled or suspended deal can never reach the webhook. After that, each model follows its own commercial terms.

Billing modelHow it runs
PrepaidFires immediately on enrolment with no delay: stamps the send date and dispatches to Make.com.
One-timeLooks at the data delivery start date. A future date waits until that day; today or a past date fires straight away.
MonthlySplits on whether an invoice already exists. First invoices apply the date guard to the first invoice date; renewals fire immediately when the monthly scheduler triggers them.
QuarterlyThe same recurring structure, firing on initial activation and then every three months from the tracking sheet.
AnnualSplits on the existing invoice in the same way, with the date guard on first billing and immediate dispatch on renewal.

05Finding the right customer, without creating a second one

Each incoming payload runs a fixed sequence in Make.com, designed so the pipeline never produces a duplicate QuickBooks customer or an orphaned invoice.

  1. Direct ID lookup

    Look the customer up by the ID stored on the deal. An ignore handler catches the missing-record response from legacy IDs, so the run continues into the fallbacks instead of aborting.

  2. Company name

    Search active QuickBooks customers by the deal’s company name.

  3. Billing email

    Search for a customer whose primary email matches the deal’s billing email.

  4. Vendor collision check

    Check QuickBooks vendors for the same name, to avoid a cross-entity naming conflict before a new customer is created.

  5. Create, with a fallback

    If nobody matches, create the customer with billing and shipping addresses, using the deal name where the company name is empty.

  6. Guard the invoice

    Router filters confirm a valid customer ID exists before line items are aggregated and the invoice is generated. The invoice and customer IDs are then written back to the HubSpot deal.

06Outcome

  • False delay failures eliminated across the monthly, annual and one-time workflows, for future-dated and immediate contracts alike
  • All 49 active recurring templates in the legacy account paused, isolating the old environment
  • All 55 queued webhooks processed, with no data loss and no duplicate customers
  • A system architecture guide covering every layer of the pipeline
  • A 20-workflow audit matrix mapping each property dependency, trigger condition, webhook and Make.com module, so the next engineer can pick it up