Mirror a Metabase question into Google Sheets on a schedule

Keep a Google Sheet in lockstep with the latest results of a Metabase saved question so finance and ops can pivot the numbers without leaving Sheets.

Deterministic Code
MetabaseGoogle SheetsOperationsFinanceData Sync
PromptCreate

Build a code workflow that mirrors the results of a Metabase saved question into a Google Sheet on a recurring schedule, so finance and ops teams can pivot the numbers in Sheets without leaving their workflow.

Trigger: cron. Default cadence: every hour from 8am to 6pm on weekdays in the user's local timezone. Make the cron expression a configurable input so the user can change it (every 15 minutes, daily at 7am, etc.).

Configurable inputs (set once, reused on every run):

- Metabase card ID (the saved question to run)

- Google Sheets spreadsheet ID

- Destination sheet/tab name (e.g. "Metabase Mirror")

Pipeline (deterministic, no AI, no judgement):

1. Call Metabase Run Card Query with the configured card ID. Capture both the result rows and the column metadata from the response so we can build a header row.

2. Build a header row from the column display names (in the order Metabase returns them), and build the body rows from the result data in the same column order. Coerce values to strings/numbers that Google Sheets can store directly.

3. Call Google Sheets Clear Values on the destination tab to wipe any stale rows from the previous run. Use a range that covers the whole tab (e.g. the tab name with no cell range, which clears the entire sheet).

4. Call Google Sheets Append Values with the header row followed by the data rows, writing into the same tab. Use USER_ENTERED so numbers and dates render naturally.

Behaviour requirements:

- Every run produces a full refresh: clear then append, no diffing, no incremental updates.

- If the Metabase query fails or returns an error payload, stop before touching the Sheet so we never blank out the tab without writing new data.

- Log the row count written on each run so the user can confirm the sync ran.

- Do not touch any tab other than the configured destination tab.

Integrations to use: Metabase (Run Card Query) and Google Sheets (Clear Values, then Append Values). Nothing else.

What does this prompt do?

  • Runs a Metabase saved question on a schedule you choose (defaults to every hour during business hours).
  • Wipes the destination tab in your Google Sheet so old rows never linger, then writes the fresh results back with a header row.
  • Hands your team a Sheet they can pivot, chart, and share, always backed by the latest numbers from Metabase.
  • Stays fully deterministic with no AI in the loop, so the Sheet is a true mirror of what the question returns.

What do I need to use this?

  • A Metabase account with permission to view the saved question you want to sync.
  • A Google account that can edit the destination spreadsheet.
  • The ID of the Metabase question, plus the spreadsheet and tab name you want it written into.

How can I customize it?

  • Change the schedule: hourly during business hours, every fifteen minutes, once a day before the morning stand-up, whatever cadence the team needs.
  • Point it at a different question or a different tab by swapping the saved question ID or the sheet name.
  • Add filters in Metabase (date range, region, product line) and the Sheet will mirror whatever the question returns.

FAQs

Do I need to be on a paid Metabase plan?
No. This works on any Metabase instance, including self-hosted open-source installs and Metabase Cloud, as long as you can create an API key under Admin.
Will it overwrite formatting or formulas in my Google Sheet?
It only clears and rewrites the cell values on the tab you point it at. Conditional formatting, column widths, and frozen rows on that tab are preserved, and other tabs in the spreadsheet are untouched.
What if my question returns thousands of rows?
It writes every row the question returns. For very large datasets, narrow the question with filters in Metabase or point the workflow at a summary version of the card.
Can I sync more than one question into the same spreadsheet?
Yes. Set up the workflow once per question and point each instance at a different tab in the spreadsheet.
How fresh will the Sheet be?
As fresh as your schedule. Hourly during business hours is the default, but you can run it every fifteen minutes or once a day depending on how often the underlying data changes.

Related templates

Call overdue Xero customers with an AI collections agent

Every weekday at 10am, an AI voice agent phones your most overdue Xero accounts, logs what each customer promised, and reports back to finance in Slack.

LiveKit
Xero
Deepgram
+2
Agentic Task
Local listing health board for every location you manage

See every Google Maps listing you manage on one screen, ranked worst first, with an audit button that writes the fix list for you.

Local Business Data
Google Sheets
App
Let support send one-off Loops emails without an engineer

Your team picks a template, finds the customer, checks they are safe to email, then sends it, with every send logged where the whole team can see it.

Loops.so
Stripe
Google Sheets
App
Stop cold emails to anyone with a live deal in Pipedrive

Every night at 2am, pull the contacts on your open and won deals and block them from your cold outreach before the next send goes out.

Mailshake
Pipedrive
Google Sheets
Deterministic Code
iMessage campaign console with pre-flight checks and delivery board

Build every text campaign in one screen: check who is actually reachable, see a realistic send plan, then watch delivery land row by row.

LoopMessage
Google Sheets
HubSpot
App
LinkedIn Ads budget pacing dashboard for every client account

See every LinkedIn ad account's spend against the budget you committed to, catch overspend early, and rebalance without rebuilding a spreadsheet.

LinkedIn Ads
Google Sheets
Slack Bot
App

Stop exporting Metabase to CSV every morning.

Connect Metabase and Google Sheets once, pick a question, and Geni keeps the Sheet in sync on whatever schedule you want.