Skip to content
Manan Asim

Reporting & data pipelines

A closed-won reporting pipeline from HubSpot to Google Sheets

A monthly view of closed-won performance without anyone typing into a spreadsheet: a Make.com scenario pulls deals from the HubSpot sales pipeline, resolves their contacts and companies, and a Google Apps Script layer cleans the data for a query-driven dashboard.

By Updated

Key figures

Scope and diagnostic figures from the engagement

  • 3layers: raw data, clean data, dashboard
  • 6Make.com modules, with an error-handling branch
  • 10normalised columns per deal
  • 0manual spreadsheet updates in the reporting flow

Engagement

Client
Self-directed build
Sector
Sales reporting
Engagement
Technical build
My role
End-to-end build
Delivered
Self-directed build
Download case study (PDF)

Tech stack

  • Make.com
  • HubSpot CRM API
  • Google Apps Script
  • Google Sheets QUERY

Architecture

How the pieces connect

  1. 01 Source
    • HubSpot dealsclosed won, sales pipeline
  2. 02 Collect
    • Make.com scenariosearch, associations, error branch
  3. 03 Land
    • Raw data tab
  4. 04 Clean
    • Apps Scripttypes, dates, owners, duplicates
  5. 05 Report
    • QUERY dashboardby year, month and owner
  • Source
  • Step
  • Logic
  • Output

01 · Challenge

A monthly view of closed-won performance by owner, without anyone typing into a spreadsheet. In HubSpot, deals, contacts and companies are separate objects, so a useful row needs more than field mapping.

02 · Strategy

A Make.com scenario pulls closed-won deals and walks their associations, Apps Script normalises the raw rows, and a single QUERY turns the clean tab into a dashboard.

03 · Impact

A working three-layer pipeline with no manual spreadsheet updates in the reporting flow, documented together with its known limits.

01Context

The requirement was a clear monthly view of closed-won performance by deal owner. In HubSpot, deals, contacts and companies are separate objects, so a useful row needs dedicated API calls for the associations, not just field mapping.

02Approach

  1. Pull only what the report needs

    A Make.com scenario searches HubSpot for deals in the sales pipeline at Closed Won, then walks the associations to fetch the related contact and company before adding a row to Google Sheets.

  2. Handle associations as arrays

    The HubSpot API returns associations as arrays, not plain strings. Passing a raw array into a record lookup produces a 404 because the API requires a numeric ID. The fix was to map the first associated object ID explicitly.

  3. Normalise in Apps Script

    A script reads the raw tab and writes a clean one: amounts coerced to numbers, month and year derived from the ISO close date, deal owner IDs mapped to names, and a duplicate check on deal name before appending.

  4. Report with QUERY

    The dashboard is a single QUERY over the clean tab, grouped by year, month and deal owner, returning won-deal count and total revenue.

03Known limits

  • De-duplication is by deal name, which is enough for this report and not for a system of record
  • Deal owner names come from a small lookup in the script, so a new rep needs one line added
  • The scenario runs on a schedule rather than on a webhook
The HubSpot API returns arrays, not pure strings.
From the project write-up