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

# Connect Metabase to Prowork

> Pull Metabase Saved Question results into Prowork using API key authentication, pass query parameters, and combine BI data with other systems for automated reporting.

Metabase is an open-source business intelligence tool teams use to explore data, build dashboards, and share reports with a no-code query builder and SQL editor.

Connecting Metabase to Prowork lets you turn Saved Questions into automated workflows. Instead of manually exporting reports or copying data from Metabase dashboards, you can pull your Saved Questions directly into Prowork flows, combine them with data from other systems, transform the results, and push outputs to wherever your team needs them, all automatically and on schedule.

## Pull from Metabase

## How to authenticate

Metabase uses API key authentication to securely connect with Prowork. Here's how to set it up:

### 1. Generate an API key in Metabase

**Step 1**

Log in to your Metabase instance and click the **gear icon** in the upper right corner

**Step 2**

Select **Admin settings**

**Step 3**

Go to the **Settings** tab

**Step 4**

Click on the **Authentication** tab in the left menu

**Step 5**

Scroll down to **API Keys** and click **Manage**

**Step 6**

Click **Create API Key**

**Step 7**

Give your API key a descriptive name (e.g., "Prowork Integration")

**Step 8**

Assign the key to an appropriate group that has permission to access the Questions you want to pull

**Step 9**

Click **Create** and copy the generated API key immediately, because Metabase won't show it again

> [!TIP]
>
> **Tip**:
>
> Store your API key somewhere safe. If you lose it, you'll need to generate a new one.

### 2. Connect in Prowork

**Step 1**

In your Prowork flow, add a **Pull from Metabase** step

**Step 2**

Click **Authorize** when prompted

**Step 3**

Enter your **Metabase API key** in the authentication field

**Step 4**

Enter your **Metabase instance URL** (e.g., `https://acmeco.metabaseapp.com` for cloud instances or your self-hosted URL)

**Step 5**

Once authenticated, you can start pulling data from your Saved Questions

## Available data

Using the Metabase integration in Prowork, you can pull in any Saved Question results. Run any Saved Question (also called Cards) in your Metabase and retrieve the full result set as tabular data. Each column from your question becomes a field in Prowork, making it easy to work with metrics, aggregations, and custom queries you've already built in Metabase.

To use a Saved Question, you'll need its **Card ID**, which is the number in the URL when you open the question in Metabase. For example, if your URL is `https://acmeco.metabaseapp.com/question/3609-sales-report`, the Card ID is `3609`.

### Passing parameters to Saved Questions

If your Saved Question uses variables (also called template tags), you can pass values for those parameters when pulling data into Prowork. This allows you to dynamically filter the results based on your workflow needs.

**Finding your variable names in Metabase:**

**Step 1**

Open your Saved Question in Metabase

**Step 2**

Click **Open Editor** to view the query

**Step 3**

Click the **Variables** icon (looks like `{{x}}`) in the sidebar

**Step 4**

Look at the settings for each variable to find:

* The **variable name** (not the display label, but the actual name used in the query, e.g., if your query uses `{{customer_email}}`, the variable name is `customer_email`)
* The **variable type** (e.g., text, number, date)

**Configuring parameters in Prowork:**

In the Pull from Metabase step, under **Request Body**, you'll find a **parameters** section. Click **Add item** for each parameter you want to pass:

**Step 1**

**target**: This identifies which variable to pass the value to. It requires two parts:

* **First target identifier**: *variable*
* **Second target identifier** (array of two strings):
  * First string: *template-tag* (this tells Metabase you're passing a value to a template tag variable in the SQL query)
  * Second string: Your variable name from Metabase (e.g., `start_date`, `customer_email`, `order_status`), and use the actual variable name, not the display label

**Step 2**

**type**: The variable type from Metabase (e.g., *text*, *number*, *date*)

**Step 3**

**value**: The actual value you want to pass to the parameter

**Examples:**

For a text parameter filtering by customer email:

* **target**:
  * First target identifier: `variable`
  * Second target identifier: `template-tag`, `customer_email`
* **type**: `text`
* **value**: `jane.smith@example.com`

For a number parameter filtering by product ID:

* **target**:
  * First target identifier: `variable`
  * Second target identifier: *template-tag*, \*product\_id\`
* **type**: `number`
* **value**: `789`

For date parameters filtering by date range, add two items:

First parameter:

* **target**:
  * First target identifier: `variable`
  * Second target identifier: `template-tag`, `start_date`
* **type**: `date`
* **value**: `2024-01-01`

Second parameter:

* **target**:
  * First target identifier: `variable`
  * Second target identifier: `template-tag`, `end_date`
* **type**: `date`
* **value**: `2024-12-31`

For a text parameter filtering by order status:

* **target**:
  * First target identifier: `variable`
  * Second target identifier: `template-tag`, `order_status`
* **type**: `text`
* **value**: `completed`

## Common use cases

* **Automate recurring reports**: Pull your weekly sales dashboard or monthly KPI report from Metabase, format it in Prowork, and automatically send it via email or Slack, with no more manual exports.
* **Combine BI data with operational systems**: Merge Metabase analytics (sales performance, customer metrics) with live data from your ERP, CRM, or warehouse management system to create comprehensive operational reports.
* **Cross-platform reconciliation**: Pull order data from Metabase and compare it against fulfillment records from [ShipBob](https://prowork.ai/docs/product/integration/shipbob.md), inventory levels from your WMS, or invoices from your accounting system to catch discrepancies automatically.
* **Create custom alerting workflows**: Run a Metabase question that tracks critical metrics, then use Prowork to check for threshold breaches and trigger [Slack](https://prowork.ai/docs/product/integration/slack.md) or email alerts when action is needed.
* **Feed data warehouses or dashboards**: Pull curated datasets from Metabase and push them to [Google Sheets](https://prowork.ai/docs/product/integration/google-drive.md), data warehouses, or other BI tools for additional analysis or team visibility.
* **Multi-source data pipelines**: Combine insights from Metabase with data from APIs, spreadsheets, emails, and PDFs to build end-to-end automated workflows that would otherwise require hours of manual work.

## Tips for using Prowork with Metabase

* **Schedule your flows** to run automatically at the cadence your business needs, daily for operational reports, weekly for performance reviews, or hourly for time-sensitive metrics.
* **Use descriptive names** for your Saved Questions in Metabase so it's easy to identify which Card IDs to pull when building flows in Prowork.
* **Set up proper permissions** in Metabase by assigning your API key to a group that has access to exactly the questions you need, which keeps your data secure while enabling automation.
* **Combine multiple Questions** in a single flow by pulling from several Metabase Cards, then use Prowork's join and merge steps to create unified reports that span different data sources.
* **Add data quality checks** in Prowork after pulling from Metabase, using filters and formulas to flag unexpected values, missing data, or anomalies before pushing results downstream.
* **Cache reference data** by pulling relatively static Metabase queries (like product catalogs or customer lists) into a separate flow, then import that data into other flows to speed up execution.
* **Document your Card IDs** by keeping a simple reference list (in a Google Sheet or internal doc) that maps business-friendly names to Metabase Card IDs, which makes it easier for teammates to build and maintain flows.

With Metabase connected to Prowork, you can automate the reports and workflows that used to eat up your day, freeing your team to focus on analysis and action instead of manual exports.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.