> ## Documentation Index
> Fetch the complete documentation index at: https://docs.langdock.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Metabase

> Connect Metabase to Langdock to query databases and access dashboards from your conversations

## Overview

Metabase is an open-source business intelligence platform for querying databases and creating dashboards. Once connected, you can use Langdock to run SQL queries, execute saved questions, browse dashboards, and search across your Metabase content directly from your conversations.

<Info>
  **Authentication:** API Key
  **Category:** Data & Analytics
  **Availability:** All workspace plans
</Info>

## Prerequisites

* A running Metabase instance (cloud or self-hosted)
* Admin access to generate an API key

## Setup

<Steps>
  <Step title="Generate an API key in Metabase">
    Follow [Metabase's API key guide](https://www.metabase.com/docs/latest/people-and-groups/api-keys) to create a key. API keys require Metabase v1.47 or later.
  </Step>

  <Step title="Get your Metabase instance URL">
    Your instance URL is the address you use to access Metabase, e.g. `https://your-company.metabaseapp.com` or `https://metabase.your-domain.com`.
  </Step>

  <Step title="Navigate to Integrations in Langdock">
    Go to [Integrations](https://app.langdock.com/integrations) and find **Metabase** in the list.
  </Step>

  <Step title="Enter your credentials">
    Enter your instance URL and API key, then save.
  </Step>

  <Step title="Start using Metabase in Langdock">
    Tag the integration with `@` in any agent to start querying your data.
  </Step>
</Steps>

## Common Use Cases

<CardGroup cols={2}>
  <Card title="SQL Queries" icon="code">
    Run native SQL queries against any connected database in your Metabase instance
  </Card>

  <Card title="Saved Questions" icon="circle-question">
    Execute saved questions and retrieve results in JSON or CSV format
  </Card>

  <Card title="Dashboard Access" icon="chart-bar">
    Browse and retrieve dashboards and their underlying question cards
  </Card>

  <Card title="Content Search" icon="magnifying-glass">
    Search across dashboards, questions, tables, and collections in one place
  </Card>
</CardGroup>

## Troubleshooting

| Issue                      | Solution                                                                                  |
| -------------------------- | ----------------------------------------------------------------------------------------- |
| **Authentication failed**  | Verify the API key is correct and the instance URL has no trailing slash                  |
| **Instance not reachable** | Ensure your Metabase instance is publicly accessible or on the same network               |
| **Permission denied**      | Check that the API key's group has access to the databases or collections you're querying |
| **API key not available**  | API keys require Metabase v1.47+. Check your version in Admin → Troubleshooting → Version |
