The Scenario
It's Thursday afternoon and you've just come out of a product sync where someone asked for the current state of active subscriptions — user IDs, plans, MRR, signup dates. The data lives in your production database, accessible through Metabase. You've got the SQL. You've run it in Metabase before. But now you need it in a Google Sheet so the finance team can run their own calculations on it.
The bad version:
- Log into Metabase, navigate to the SQL editor, paste in the query, run it, and wait for 2,000 rows to load.
- Click the download arrow, choose CSV, wait for the export, and find it in your Downloads folder under a filename like question_1684923847.csv.
- Open the file, copy the data, switch to the Google Sheet, paste it in, and manually clean up the column headers so they match what finance expects.
Running the query takes 20 seconds. The surrounding ceremony takes 15 minutes, and that's before you account for the formatting pass finance will ask you to do when the column names come through in snake_case.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent that lives inside your Google Sheet. It can talk directly to Metabase on your behalf — running queries against any connected database and writing the results into your sheet, headers included. No CSV, no import dialog.
Run the native SQL query SELECT user_id, plan, mrr, signup_date FROM subscriptions WHERE status = 'active' against Metabase database ID 3 and write the results into Sheet1 starting at row 1 with column headers
What You Get
- Row 1 of Sheet1 is populated with column headers: user_id, plan, mrr, signup_date.
- Every result row from the query lands beneath it, one row per record.
- The data reflects the current state of the database at the moment the prompt ran — no cached results.
- If the query returns zero rows, SheetXAI writes the headers and notes the empty result rather than leaving the sheet blank and ambiguous.
What If the Data Is Not Quite Ready
The column names are in snake_case and finance wants title case
Run the SQL query SELECT user_id, plan, mrr, signup_date FROM subscriptions WHERE status = 'active' against Metabase database ID 3, write the results into Sheet1 starting at row 1, and rename the headers to User ID, Plan, MRR, and Signup Date
SheetXAI applies the rename as it writes — the headers land in the format finance expects, no post-paste find-and-replace needed.
You only want rows above a certain MRR threshold
Run the SQL query SELECT user_id, plan, mrr, signup_date FROM subscriptions WHERE status = 'active' AND mrr > 200 against Metabase database ID 3 and write results into Sheet1 with column headers
Push the filter into the SQL itself. The query runs against the database with the condition applied — you're not pulling 2,000 rows and filtering locally.
The result needs to join against a second tab of plan names
Run the SQL query SELECT s.user_id, s.plan_id, s.mrr, p.plan_name FROM subscriptions s JOIN plans p ON s.plan_id = p.id WHERE s.status = 'active' against Metabase database ID 3 and write results into Sheet1 with headers
The join happens in the database. The sheet receives the already-resolved plan names in the plan_name column — no VLOOKUP required on your end.
You need a cleanup pass plus the query result in one shot
Run the SQL query SELECT user_id, plan, mrr, signup_date FROM subscriptions WHERE status = 'active' against Metabase database ID 3, write results into Sheet1 with headers renamed to User ID, Plan, MRR, and Signup Date, then in column E write a formula that flags any row where MRR is blank as MISSING and otherwise leaves it empty
One prompt handles the query, the header rename, and the data-quality flag column. The sheet arrives analysis-ready.
The pattern across all four: describe the data shape you actually need, not the raw API output. SheetXAI handles the translation.
Try It
Get the 7-day free trial of SheetXAI and open the Google Sheet where your team pastes subscription or database exports, then ask it to run the SQL directly against Metabase. Also worth reading: how to consolidate multiple saved Metabase questions into one sheet, and the hub overview on connecting Metabase to Google Sheets.
