How to build HubSpot sales dashboards in Metabase
HubSpot is where your contacts, companies, and deals live. Metabase is where you turn that pipeline activity into shared, trustworthy sales dashboards. This guide covers two complementary paths: a lightweight MCP + CLI route that pulls live data with the HubSpot MCP server and loads a CSV into Metabase with the Metabase CLI for quick analysis, and a durable pipeline route that syncs HubSpot into a database so you can build pipeline, win-rate, and forecast dashboards anyone can read.
How do you connect HubSpot to Metabase?
Most teams combine both routes: use the HubSpot MCP server and Metabase CLI route to pull live data and stand up a quick analysis, and the pipeline route for the sales dashboards leadership depends on.
Live data in, quick analysis out
Pair the official HubSpot MCP server (to read live contacts, companies, and deals) with the Metabase CLI, whose upload command loads a CSV into Metabase as a ready-to-query table and model.
- Quick lookups like "which deals slipped their close date this week?"
- Loading a HubSpot CSV export into Metabase in seconds
- Spot-checks and one-off analyses without a warehouse
- Great for exploration, not governed reporting
- Use read-only scopes on the HubSpot MCP to avoid accidental writes
- CSV uploads are snapshots — refresh or move to the pipeline for history
Durable dashboards with history
Sync HubSpot into a database or warehouse with Airbyte, Fivetran, dlt, or the API, then point Metabase at it.
- Pipeline, win-rate, and forecast dashboards the whole team relies on
- Sales cycle and stage-conversion trends over quarters
- Joining CRM data with product usage, billing, or support data
- Requires a destination database and a sync to maintain
- You own the stage and win definitions and the refresh schedule
- Sync deal property history if you want accurate velocity metrics
What can you analyze from HubSpot data in Metabase?
- Pipeline — open value by stage, owner, and segment, plus coverage against target
- Win rate — deals won vs. closed, by cohort, source, and stage entered
- Sales cycle length — create to close-won, with median and p90
- Stage conversion — where deals advance and where they stall
- Forecast — weighted and unweighted pipeline, commit vs. best-case
- Deal size — average and median ACV, plus mix by segment
- Activity — calls, emails, and meetings by rep and account
Which HubSpot dashboards should you build in Metabase?
Pipeline
The open book of business, right now.
- Open pipeline by stage (funnel)
- Pipeline by owner and segment (bar)
- Coverage vs. quota for the period (number)
- Aging deals and past-due close dates (table)
Forecast
What's likely to land this period.
- Weighted vs. unweighted pipeline for the quarter (number)
- Commit vs. best-case vs. closed (bar)
- Deals expected to close by week (line)
- Forecast category movement week over week (table)
Win rate & conversion
How reliably deals we work close.
- Win rate by month and segment (line)
- Stage-to-stage conversion (funnel)
- Win rate by source and by owner (bar)
- Loss reasons breakdown (bar)
Sales activity
Effort and coverage, not surveillance.
- Calls, emails, and meetings by rep (bar)
- Activities per open deal (number)
- Accounts touched this week (number)
- Response time to new leads (line)
How do you use the HubSpot MCP server with the Metabase CLI?
Pair the HubSpot MCP server with the Metabase CLI for fast, hands-on analysis. The HubSpot MCP looks up current contacts, companies, and deals; the Metabase CLI's upload command loads a CSV into Metabase and creates a ready-to-query table and model. For analysis, grant read-only scopes on the HubSpot MCP.
Example workflow
- Ask the HubSpot MCP which deals slipped their close date this week, or an account's open deals and recent engagements.
- Export the deals or activity you want to keep as a CSV.
- Run
mb upload csvto load it into Metabase as a table and model, then build questions and dashboards on top.
Be honest about the limits
- The HubSpot MCP is great for live lookups — not for scheduled or audited pipeline reporting.
- A CSV upload is a point-in-time snapshot; refresh it with
mb upload replaceor move to the pipeline for real history — sales cycle length and stage conversion still need synced deal history. - Use read-only scopes and respect HubSpot API rate limits and the permissions of the connected user.
mb upload csvneeds an uploads database configured under Admin → Settings → Uploads.
How do you set up the HubSpot MCP server and the Metabase CLI?
HubSpot MCPofficial
- Endpoint
https://mcp.hubspot.com- Transport
- Remote (Streamable HTTP)
- Auth
- OAuth 2.1 with PKCE (required)
- Setup
- Create an app under Development → MCP Auth Apps
Metabase CLIofficial
- Install
npm install -g @metabase/cli- Auth
mb auth login(browser OAuth on v62+, or an API key)- Load data
mb upload csv --file data.csv- Requires
- An uploads database (Admin → Settings → Uploads)
# HubSpot (remote, OAuth 2.1 + PKCE in browser)
claude mcp add --transport http hubspot https://mcp.hubspot.com{
"mcpServers": {
"hubspot": {
"url": "https://mcp.hubspot.com"
}
}
}# Install the Metabase CLI
npm install -g @metabase/cli
# Log in (opens your browser; requires Metabase v62+)
mb auth login --url https://your-metabase.example.com
# Load a HubSpot CSV export — creates a table AND a model
mb upload csv --file hubspot-deals.csv --collection root
# Refresh that same table later from a new export
mb upload replace <table-id> --file hubspot-deals.csvThe HubSpot server is hosted at mcp.hubspot.com (one endpoint, no region to pick). First create an MCP Auth App in your HubSpot account to generate OAuth credentials, then connect any client that supports OAuth 2.1 with PKCE; on first connection the server opens a browser to authorize. The Metabase CLI stores its credentials securely after mb auth login.
Can you generate a HubSpot dashboard with AI?
Yes. Use the prompt below with any assistant that can run the HubSpot MCP server and the Metabase CLI. It works end to end: if HubSpot tables already exist in Metabase it analyzes those; otherwise it pulls the data over the HubSpot MCP, loads it with mb upload csv, then builds the dashboard — defining "won" and "closed" and skipping metrics the data can't support instead of faking them.
Create a polished Metabase dashboard for HubSpot sales analytics.
Work end to end: get the data into Metabase if it isn't there yet, then build.
Goal: Help sales leaders understand pipeline, forecast, win rate, sales cycle,
and rep activity from HubSpot CRM data.
Step 1 — Find or load the data:
- First, check what already exists in Metabase (search for HubSpot tables and
models). If durable HubSpot data is already present — synced from a warehouse
or uploaded earlier — use it and skip to Step 2.
- If nothing is there, pull it with the HubSpot MCP server (read-only scopes):
deals, deal pipelines/stages, contacts, companies, and engagements. Write each
result to a CSV, then load it with the Metabase CLI — run
"mb upload csv --file <export>.csv" so each upload creates a table and a
ready-to-query model. Use "mb upload replace <table-id> --file <export>.csv" to
refresh an existing table instead of creating duplicates.
Step 2 — Inspect before querying:
HubSpot CSV exports are usually flat and pre-aggregated (one row per deal, contact,
or company, with columns like stage, amount, close date, and owner). Warehouse
tables are raw and include deal property/stage history for velocity metrics.
Inspect the actual tables and column names first; do not assume exact names or
that stage-history exists.
Important:
- Build on whatever data is present; don't claim Metabase connects natively to
HubSpot — it reads a database or CLI-uploaded tables.
- Only recompute rates over the correct base (e.g. win rate) when raw counts are
available; if the data already provides a rate, chart it directly.
- Define "won" and "closed" once (closed-won vs. any closed stage) and reuse the
definitions everywhere.
- For win rate, state the denominator explicitly (won / closed vs. won / created)
and hold the cohort fixed.
- Report sales cycle length and deal size as medians (p50) and p90, never plain
averages — both are right-skewed.
- If deal stage history is missing, do not calculate sales cycle length,
time-in-stage, or stage conversion. Use a caveat instead.
- Convert all amounts to a single reporting currency; caveat any mix.
- Only build a card if its underlying column/metric exists in the data.
- A single CSV is a point-in-time snapshot: only build trend cards if there is a
usable date column or multiple periods have been uploaded.
Dashboard title: HubSpot Sales Overview
Sections:
1. Executive summary (KPI cards): Open pipeline; Pipeline coverage vs. target;
Win rate (last 90 days); Median sales cycle length; Average and median deal
size; Deals closing this period.
2. Pipeline: Open pipeline by stage; by owner and segment; aging and past-due
close dates.
3. Forecast: Weighted vs. unweighted pipeline; commit vs. best-case vs. closed;
deals expected to close by week.
4. Win rate & conversion: Win rate by month and segment; stage-to-stage
conversion; loss reasons.
5. Activity: Calls/emails/meetings by rep; activities per open deal; new-lead
response time.
Filters: Pipeline, Stage, Owner, Segment/Industry, Source, Date range.
Reuse the models Metabase auto-created from uploaded CSVs, or (for a warehouse)
create reusable models: modeled_hubspot_deals, modeled_hubspot_contacts,
modeled_hubspot_companies, modeled_hubspot_stage_history, and
modeled_hubspot_activities.
Output: Build the dashboard if you have permission; otherwise provide the exact
questions, SQL, model definitions, and layout. Include caveats for any metric
that cannot be calculated from the available data. Reconcile totals against
HubSpot reports. Keep it practical, dense, and executive-readable. Avoid vanity
metrics.How do you sync HubSpot data into a database or warehouse?
For dashboards that need history and reliability, land HubSpot data in a database first, then connect Metabase to that database.
Connector options
- Airbyte (managed ETL) — has a HubSpot source covering contacts, companies, deals, engagements, and more.
- Fivetran (managed ETL) — offers a HubSpot connector with a maintained schema and incremental syncs, including deal stage history.
- dlt (code) — a verified HubSpot source for a Python pipeline when you want full control.
- HubSpot API (raw) — the source of truth; use the CRM objects and property-history endpoints for stage changes.
Notes
- Land raw tables first, then build clean models on top.
- Sync deal property history if you want sales cycle length, time-in-stage, and stage conversion — a snapshot alone loses the transitions.
- Map deal-stage IDs to labels and a display order once, in a model, so funnels stay stable.
- Define
is_wonandis_closedfrom the stage'sprobability/ closed flags once and reuse them.
How should you model HubSpot data in Metabase?
Core tables
| Table | Grain | Key columns |
|---|---|---|
deals | one row per deal | id, dealstage, pipeline, amount, createdate, closedate, hs_is_closed_won, owner_id |
deal_stage_history | one row per stage change | deal_id, stage, changed_at |
deal_pipelines | one row per stage | pipeline_id, stage_id, label, display_order, probability |
companies | one row per company | id, name, industry, owner_id |
contacts | one row per contact | id, company_id, lifecyclestage, createdate, hs_analytics_source |
engagements | one row per activity | id, type (call/email/meeting/task), deal_id, owner_id, occurred_at |
Modeling advice
- Build a
modeled_hubspot_dealstable with cleanis_won,is_closed,stage_id,amount, andclosed_at— the backbone of every pipeline chart. - Derive a
modeled_hubspot_stage_historyfrom deal property history so you can compute time-in-stage and cycle length. - Resolve owner and pipeline/stage IDs to names once, in a model, so charts read cleanly.
- Convert amounts to one reporting currency and decide how to treat deals with no amount.
- Reconcile modeled pipeline and win rate against HubSpot's own reports before anyone trusts the numbers.
Which HubSpot metrics should you track in Metabase?
| Metric | Definition | Notes |
|---|---|---|
| Open pipeline | Sum of amount for deals not closed. | Segment by stage, owner, and pipeline. |
| Win rate | Won deals ÷ closed deals in a cohort. | Fix the denominator (closed vs. created) before comparing. |
| Sales cycle length | Create → close-won, in days. | Report median and p90; it's right-skewed. |
| Stage conversion | Deals reaching stage N+1 ÷ reaching stage N. | Needs deal stage history. |
| Pipeline coverage | Open pipeline ÷ quota for the period. | 3x is a common rule of thumb — calibrate to your win rate. |
| Average deal size | Won amount ÷ won deals. | Report the median too; outliers distort the mean. |
What SQL powers HubSpot dashboards in Metabase?
These assume the modeled tables above (PostgreSQL dialect). Adjust identifiers to match your warehouse.
Won as a share of closed deals over the last 12 months.
SELECT
date_trunc('month', d.closed_at) AS month,
COUNT(*) FILTER (WHERE d.is_won) AS won,
COUNT(*) FILTER (WHERE d.is_closed) AS closed,
ROUND(
100.0 * COUNT(*) FILTER (WHERE d.is_won)
/ NULLIF(COUNT(*) FILTER (WHERE d.is_closed), 0),
1
) AS win_rate_pct
FROM modeled_hubspot_deals d
WHERE d.is_closed
AND d.closed_at >= CURRENT_DATE - INTERVAL '12 months'
GROUP BY 1
ORDER BY 1;The current funnel — deals and value by stage, in order.
SELECT
s.stage_label,
s.display_order,
COUNT(*) AS open_deals,
ROUND(SUM(d.amount), 2) AS open_amount
FROM modeled_hubspot_deals d
JOIN modeled_hubspot_stages s ON s.stage_id = d.stage_id
WHERE NOT d.is_closed
GROUP BY s.stage_label, s.display_order
ORDER BY s.display_order;Days from create to close-won; medians beat averages here.
-- Median days from create to close-won, by month closed
SELECT
date_trunc('month', d.closed_at) AS month,
percentile_cont(0.5) WITHIN GROUP (
ORDER BY EXTRACT(EPOCH FROM (d.closed_at - d.created_at)) / 86400.0
) AS median_cycle_days,
percentile_cont(0.9) WITHIN GROUP (
ORDER BY EXTRACT(EPOCH FROM (d.closed_at - d.created_at)) / 86400.0
) AS p90_cycle_days
FROM modeled_hubspot_deals d
WHERE d.is_won
GROUP BY 1
ORDER BY 1;