KBAISE/ for lovable
Library
Docs

Connect your app to Metabase

about 10 minBuildingchecked 4d agoOfficial page
The short version

Connect your Lovable app to Metabase to run your team's saved questions and custom queries. Your app fetches the data and renders the charts and dashboards itself rather than embedding Metabase pages directly.

Anyone who wants to display business metrics or internal analytics in Lovable using data queries already configured in Metabase.

Do this, in order

  1. 1

    Create a dedicated, restricted user group in Metabase with view-only collection permissions and read-only query access.

    The connector does not enforce read-only safety, so you must limit access in Metabase to prevent unintended changes to data or dashboards.

  2. 2

    Generate an API key in Metabase under Settings → Authentication → API Keys, assign it to your new group, and copy it.

    Lovable uses this key (which starts with mb_) to authenticate requests to your Metabase instance.

  3. 3

    Go to Lovable Connectors, choose Metabase, click Connect, and enter your public HTTPS Metabase URL and the API key.

    This establishes the shared connection in your Lovable workspace.

  4. 4

    Set sharing permissions for the connection and click Connect to verify the link.

    This determines whether only you or other workspace members can link their Lovable projects to this Metabase connection.

  5. 5

    In your Lovable project chat, instruct Lovable to use the Metabase connection to pull questions or build dashboards.

    Lovable links the connection to your project and generates the interface components needed to display the query results.

Paste this into your project

Use Metabase and build a dashboard that shows our key monthly metrics. Run our saved questions and display the results using visual metric cards and charts.

Words decoded

Saved question
A query, chart, or report that someone built and saved inside Metabase so others can reuse it.
API key
A secure secret code that works like a dedicated username and password for apps to talk to each other.

Where people get stuck

  • Assigning the API key to the Administrators group, which gives Lovable full control over your entire Metabase instance.
  • Using an API key with write access to your underlying database, allowing custom SQL queries to alter or delete production data.
  • Sharing an API key in a chat prompt or app code instead of pasting it securely into the connection configuration form.
  • Trying to connect an internal or private Metabase instance that cannot be reached over the public internet via HTTPS.
  • Expecting Metabase iframes or native dashboards to embed directly; Lovable only fetches raw data and displays it using its own interface components.

The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.