metabase-data-app-actions

Installation
SKILL.md

Triggering actions from a Metabase data app

A Metabase action is a saved, parameterized SQL write against the data warehouse — an INSERT, UPDATE, or DELETE. Actions are configured ahead of time on the Metabase instance, with their parameters and permissions already set. A data app's job is to invoke an action with the right parameters when the user does something — clicking a button, submitting a form, confirming a destructive prompt.

The mental model

  • Every action the app can run appears in the schema as schema.actions.<actionName>, with type: "query".
  • Each action publishes a parameters list. Each parameter has a slug (the key the Data App sends), a jsType ("string" / "number" / "Date" / "boolean" / "unknown"), and an optional required flag.
  • Use action.parameters to know which fields to render and submit. The result reports result["rows-affected"]; use it for lightweight confirmation, then refresh the table/question/query data the page already shows.

What's in the schema (and what isn't)

Action entries are only generated when the typed schema includes actions. Before writing action-invoking code, make sure the schema was generated with include-actions=true; with database=<name-or-id>&include-actions=true, Metabase includes the actions for that database only.

Before writing any action-invoking code, enumerate what's available under schema.actions. The schema is your complete catalog of the actions the app can run. Anything not present doesn't exist as far as the Data App is concerned: when the app needs a write the schema lacks, ask the user to create it as a query action without a model (POST /api/action with type: "query" and no model_id; actions created in the Metabase UI belong to a model and are never listed), on a database with actions enabled, then regenerate the schema.

The hook

Installs
814
GitHub Stars
50.3K
First Seen
Jun 22, 2026