Snapshot a Metabase question into a Notion database
A Metabase + Notion agent flow
A Metabase question holds the number leadership asks for every week, signups, MRR, active accounts, and someone screenshots it into the Notion update by hand. This flow takes the screenshot out. The agent runs a saved card with execute_card, reads the result rows, and writes them into a Notion database with notion-create-pages, one page per row or a single dated snapshot row, mapping the card's columns onto your properties. Metabase returns the card's results when the agent runs it, so this fires on the cadence you set, weekly before the review or nightly, building a history in Notion that the live Metabase view alone doesn't keep.
The flow
execute_cardRun a saved card and return its results.
notion-create-pagesCreates one or more Notion pages with specified properties and content.
Step by step
- Pick the card and the database
Choose the saved Metabase card whose results you want to capture and a Notion database with properties that match its columns, plus a date property to stamp each snapshot.
- Run the card
The agent calls execute_card with the card ID and reads back the result rows and column names exactly as Metabase returns them.
- Write the snapshot
It calls notion-create-pages, mapping the card's columns onto your properties and stamping the run date, so each execution adds a dated entry rather than overwriting the last.
Tell your agent
Every Monday at 8am, run Metabase card 142 (the weekly KPI question). Write its result rows into the KPI History database in Notion, mapping each column to a property and stamping today's date, so the database accumulates one snapshot per week. Don't overwrite previous weeks.
Setup
This flow needs both servers connected to your agent. Follow each install guide:
Worth knowing
- execute_card returns whatever the saved card returns, which can be many rows. Decide whether the agent writes a page per row or aggregates to a single snapshot row, or a wide result floods the database.
- notion-create-pages needs the database ID and exact property names, and the property types must match the card's data. A number column won't write into a text property cleanly.
- If the card has parameters, execute_card runs it with its defaults. To snapshot a specific segment, point the agent at a card already filtered to that segment rather than passing parameters at run time.
Questions
- Why snapshot into Notion instead of just linking the Metabase card?
- A live card shows now; it doesn't keep history. Writing a dated row each run gives you a trend in Notion the team can annotate, without standing up a separate warehouse table.
- Can it run an ad-hoc query instead of a saved card?
- Yes, with a different read. execute_query runs native SQL against a connected database; use that when the number you want isn't already a saved card, then write the result the same way.