Drag × Metabase

How to build Drag inbox dashboards in Metabase

Drag turns Gmail and Google Workspace into a shared inbox and help desk with kanban boards, cards, and tags. Metabase is where you turn that activity into shared, trustworthy dashboards. This guide covers two complementary paths: a lightweight MCP + CLI route that pulls live data with the Drag MCP server and loads a CSV into Metabase with the Metabase CLI for quick analysis, and a durable pipeline route that syncs Drag into a database so you can build dashboards anyone can read.

Heads up: Metabase connects to databases and warehouses — it does not ship a native Drag connector. For dashboards that need history and reliability, you'll sync Drag into a database first (covered below).

How do you connect Drag to Metabase?

Most teams combine both routes: use the Drag MCP server and Metabase CLI route to pull live data and stand up a quick analysis, and the pipeline route for the dashboards people depend on.

1 · MCP + CLI route (AI-assisted)

Live data in, quick analysis out

Pair Drag's official MCP server (to read live board and card data) with the Metabase CLI, whose upload command loads a CSV into Metabase as a ready-to-query table and model.

Best for
  • Quick lookups like "what's unassigned in the support board?"
  • Loading a Drag CSV export into Metabase in seconds
  • Spot-checks and one-off analyses without a warehouse
Trade-offs
  • Great for exploration, not governed reporting
  • The Drag MCP acts on your Gmail/Drag data — keep analysis to read-only tools
  • CSV uploads are snapshots — refresh or move to the pipeline for history
2 · Pipeline route (warehouse-backed)

Durable dashboards with history

Sync Drag into a database or warehouse with the REST API (v2), dlt, or webhooks, then point Metabase at it.

Best for
  • Response-time and workload dashboards across shared inboxes
  • Trends over quarters and per-board comparisons
  • Joining inbox data with CRM or operations data
Trade-offs
  • No first-party managed connector — plan on API, dlt, or webhook-based sync
  • API is rate-limited (around 100 requests/minute)
  • You own the data model and refresh schedule

What can you analyze from Drag data in Metabase?

  • Card volume — created vs. closed by day and board
  • Time to first reply — how long customers wait for a response
  • Board and column health — backlog by shared inbox and status
  • Backlog and aging — open cards and how long they've been waiting
  • Team workload — assignments and emails sent per member
  • Tag drivers — volume and resolution speed by tag
  • Contacts — new vs. returning senders

Which Drag dashboards should you build in Metabase?

For: Team leads

Inbox overview

The daily pulse across shared boards.

  • Cards created vs. closed per day (dual line)
  • Median time to first reply (number + trend)
  • Open cards by column/status (bar)
  • Volume by board (bar)
For: Ops

Response time

How fast does the team reply?

  • First reply time p50/p90 by week (line)
  • Aging open cards by days-open bucket (table)
  • Cards by tag/category (bar)
  • Reopened cards by week (line)
For: Managers

Team workload

Balance assignments fairly.

  • Closed cards by assignee (bar)
  • Open assigned cards by assignee (table)
  • Emails sent by team member (bar)
  • Median handle time by assignee (bar)
For: Leadership

Tags & drivers

Understand what's driving inbox volume.

  • Volume by tag (bar)
  • Slowest-resolving tags (table)
  • New vs. returning contacts (bar)
  • Volume by hour of day (bar)

How do you use the Drag MCP server with the Metabase CLI?

Pair the Drag MCP server with the Metabase CLI for fast, hands-on analysis. The Drag MCP reads live boards and cards; the Metabase CLI's upload command loads a CSV into Metabase and creates a ready-to-query table and model. For analysis, keep the Drag MCP to its read-only tools.

Example workflow

  • Ask the Drag MCP which cards are unassigned in the support board, or which have had no reply in 24 hours.
  • Export the boards, cards, and emails you want to keep as CSVs.
  • Run mb upload csv to load them into Metabase as tables and models, then build questions and dashboards on top.

Be honest about the limits

  • The Drag MCP is great for live lookups — not for scheduled or audited reporting.
  • A CSV upload is a point-in-time snapshot; trend and time-in-column analysis still needs a warehouse sync, or refresh with mb upload replace.
  • The MCP acts on your Gmail/Drag data with your permissions — keep it to read-only tools so analysis can't send or move cards.
  • mb upload csv needs an uploads database configured under Admin → Settings → Uploads.

How do you set up the Drag MCP server and the Metabase CLI?

Drag MCPofficial

Install
One npx command from the Drag developer docs
Transport
stdio / Streamable HTTP
Auth
Drag API key
Note
Read + write tools across boards, cards, emails, and contacts.

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)
Cursor~/.cursor/mcp.json or .cursor/mcp.json
{
  "mcpServers": {
    "drag": {
      "command": "npx",
      "args": ["-y", "@dragapp/mcp-server"],
      "env": {
        "DRAG_API_KEY": "your-drag-api-key"
      }
    }
  }
}

Generate a Drag API key in your account settings. Confirm the exact MCP package name and install command in Drag's developer docs before standardizing.

TerminalLoad a Drag CSV with the Metabase CLI
# 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 Drag CSV export — creates a table AND a model
mb upload csv --file drag-cards.csv --collection root

# Refresh that same table later from a new export
mb upload replace <table-id> --file drag-cards.csv

The Metabase CLI stores its credentials securely after mb auth login. Keep the Drag MCP to its read-only tools so analysis can't send or move cards.

Verify before shipping: confirm an uploads database is enabled under Admin → Settings → Uploads (Metabase docs) and the current Drag MCP setup in the Drag developer docs.

Can you generate a Drag dashboard with AI?

Yes. Use the prompt below with any assistant that can run the Drag MCP server and the Metabase CLI. It works end to end: if Drag tables already exist in Metabase it analyzes those; otherwise it pulls the data over the Drag MCP, loads it with mb upload csv, then builds the dashboard — using medians for reply times and skipping cards it has no data for.

Prompt for creating a Drag Inbox Overview dashboard
Create a polished Metabase dashboard for Drag shared-inbox analytics.
Work end to end: get the data into Metabase if it isn't there yet, then build.

Goal: Help team leads understand inbox volume, response time, workload, and tag
drivers from Drag (Gmail shared inbox) data.

Step 1 — Find or load the data:
- First, check what already exists in Metabase (search for Drag tables and
  models). If durable Drag 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 Drag MCP server (keep to its read-only
  tools): boards, cards, columns, emails, tags, users, and contacts. 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:
Do not assume exact table names. Map the available raw tables into these
analytical concepts where possible: Boards (shared inboxes), Cards
(conversations), Columns (statuses), Threads/Emails, Tags, Users, and Contacts.
Inspect the actual tables and column names first.

Important:
- Build on whatever data is present; don't claim Metabase connects natively to
  Drag — it reads a database or CLI-uploaded tables.
- Use medians (p50) and p90 for reply times, never averages.
- Define "first reply" as the first outbound email from a team member, excluding
  internal notes and automated messages.
- If card movement history is missing, do not calculate time-in-column or reopen
  rate. Use a caveat instead.
- Only build a card if its underlying column/metric exists in the data.
- A single CSV is a point-in-time snapshot: trends and time-in-column need
  history, so build trend cards only if a warehouse sync or multiple uploads
  provide it.

Dashboard title: Drag Inbox Overview

Sections:
1. Executive summary (KPI cards): Cards created last 7 days; Closed last 7 days;
   Open backlog; Median time to first reply; Volume by board.
2. Volume & backlog: Created vs closed by day; Open by column; Backlog aging;
   Volume by board.
3. Response time: First reply p50/p90 by week; Cards by tag; Reopened by week
   (only if history exists).
4. Team workload: Closed by assignee; Open assigned by assignee; Emails sent by
   member; Median handle time by assignee.
5. Tags & drivers: Volume by tag; Slowest tags; New vs returning contacts;
   Volume by hour.

Filters: Board, Assignee, Tag, Column/status, Date range.

Reuse the models Metabase auto-created from uploaded CSVs, or (for a warehouse)
create reusable models: modeled_drag_cards, modeled_drag_boards,
modeled_drag_emails, modeled_drag_users, and modeled_drag_contacts.

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. Keep it practical, dense,
and executive-readable. Avoid vanity metrics.

How do you build the Drag → Metabase pipeline?

For dashboards that need history and reliability, land Drag data in a database first, then connect Metabase to that database.

No paid tool required. A fully free stack: a small dlt or hand-written script (extract) → a free Postgres database like Neon or Supabase (load) → a scheduler such as GitHub Actions cron (host) → Metabase (visualize). For hosting and scheduling details, see our data pipeline guide.

Connector options

  • dlt (free, code) — wrap the v2 API in a Python pipeline for incremental loads and schema control. The lightest path to a maintainable sync.
  • Drag REST API (v2) (free, raw) — the source of truth; read boards, cards, tags, and contacts. The base URL is v2/ with API-key auth and a rate limit around 100 requests/minute.
  • Webhooks — Drag includes webhooks; subscribe to card events to keep your warehouse fresh in near real time.

Notes

  • Land raw tables first, then build clean models on top.
  • Respect the rate limit — page and back off rather than hammering the API for large historical loads.
  • Sync email-level data so you can compute reply times, not just card counts.

How should you model Drag data in Metabase?

Core tables

TableGrainKey columns
cardsone row per card (conversation)id, board_id, column_id, assignee_id, is_closed, created_at, closed_at
boardsone row per board (shared inbox)id, name
emailsone row per email/messagecard_id, direction, is_note, sent_at
usersone row per team memberid, name, email
contactsone row per senderid, email, name

Modeling advice

  • Treat a card as the conversation/ticket grain for most dashboards.
  • Define first reply from the first outbound, non-note email on a card.
  • Map columns to a small status set (open/in-progress/done) so charts stay stable.
  • Treat tags as a bridge table so a card can carry many tags.
  • Define "closed" once and reuse it everywhere.

Which Drag metrics should you track in Metabase?

MetricDefinitionNotes
Time to first replyCard created → first outbound email.Report median and p90; exclude notes.
Card volumeCreated vs. closed in a period.Segment by board.
BacklogOpen cards right now.Pair with aging and board breakdowns.
Team workloadOpen and closed cards per assignee.Frame as balance, not a leaderboard.
Volume by tagCards by tag/category.Reveals contact drivers.
Returning contactsSenders with multiple cards.A signal of unresolved root causes.

What SQL powers Drag dashboards in Metabase?

These assume the modeled tables above (PostgreSQL dialect). Adjust identifiers to match your warehouse.

Cards created vs. closed per dayPostgreSQL

The basic volume trend over the last 30 days.

SELECT
  date_trunc('day', c.created_at) AS day,
  COUNT(*)                                          AS created,
  COUNT(*) FILTER (WHERE c.is_closed = true)        AS closed
FROM cards c
WHERE c.created_at >= CURRENT_DATE - INTERVAL '30 days'
GROUP BY 1
ORDER BY 1;
Time to first reply by weekPostgreSQL

Median from the first outbound email per card.

WITH first_outbound AS (
  SELECT
    e.card_id,
    MIN(e.sent_at) AS first_reply_at
  FROM emails e
  WHERE e.direction = 'outbound'
    AND e.is_note = false
  GROUP BY e.card_id
)
SELECT
  date_trunc('week', c.created_at) AS week,
  percentile_cont(0.5) WITHIN GROUP (
    ORDER BY EXTRACT(EPOCH FROM (f.first_reply_at - c.created_at)) / 60.0
  ) AS median_first_reply_min
FROM cards c
JOIN first_outbound f ON f.card_id = c.id
GROUP BY 1
ORDER BY 1;
Open backlog by boardPostgreSQL

Where open cards are piling up across shared inboxes.

SELECT
  b.name             AS board,
  COUNT(*)           AS open_cards
FROM cards c
JOIN boards b ON b.id = c.board_id
WHERE c.is_closed = false
GROUP BY b.name
ORDER BY open_cards DESC;
Workload by assigneePostgreSQL

Open and closed cards per team member over 30 days.

SELECT
  u.name             AS assignee,
  COUNT(*) FILTER (WHERE c.is_closed = false) AS open_cards,
  COUNT(*) FILTER (WHERE c.is_closed = true)  AS closed_cards
FROM cards c
JOIN users u ON u.id = c.assignee_id
WHERE c.created_at >= CURRENT_DATE - INTERVAL '30 days'
GROUP BY u.name
ORDER BY open_cards DESC;

What are common mistakes when analyzing Drag in Metabase?

Treating a live MCP lookup or a one-off CSV as governed reporting.→ Use the Drag MCP and CSV uploads for triage and exploration; build warehouse-backed dashboards for anything people depend on.
Counting internal notes as customer replies.→ Only outbound emails count toward first-reply time.
Hammering the rate-limited API for big backfills.→ Page and back off; around 100 requests/minute is the ceiling.
Using averages for reply time.→ Report medians and p90 — these durations are heavily right-skewed.
Reporting only on card counts.→ Sync email-level data so you can measure response time, not just volume.

Related analytics

Related integrations

FAQ

Does Metabase connect natively to Drag?
No. Metabase reads SQL databases and warehouses. Sync Drag into a database first (its REST API v2, dlt, or webhooks), then connect Metabase to that database.
Does Drag have an MCP server?
Yes. Drag offers an MCP server you install with a single command, exposing read and write tools across boards, cards, emails, and contacts, authenticated with a Drag API key. Keep it to read-only tools for analysis, and confirm the exact package and command in Drag's developer docs.
How do I quickly analyze Drag data without a warehouse?
Pull the boards, cards, and emails you need with the Drag MCP server (use its read-only tools), export them to CSV, and run `mb upload csv --file data.csv` with the Metabase CLI. It creates a table and a model you can build questions on right away. You'll need an uploads database enabled under Admin → Settings → Uploads. Refresh later with `mb upload replace`, or move to the pipeline route when you need history.
Where does Drag's data live?
Drag sits on top of Gmail and Google Workspace, organizing emails into boards and cards. You analyze it by syncing Drag's REST API (boards, cards, tags, contacts) into a database Metabase can read.