Metabase
Query, save, and export Metabase analytics.
Connectors
Choose the connector that matches your authentication method. The options below use the names shown in StackAI.
Metabase
API Key
Metabase
Connect to Metabase with an API key.
Set up in Metabase
Prepare the Metabase account or service that the workflow will access. Grant access to the required resources and operations.
API Key: Create an API key in Metabase and grant its group access only to the content and databases this workflow needs.
Set up in StackAI
Open Settings → Connections, add a connection, and select Metabase.
Enter the credentials and connection details in the fields below.
Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.
Connection fields
Metabase Instance URL
Yes
The HTTPS origin of your Metabase instance, without a path.
API Key
Yes
Create an API key in Metabase and grant its group access only to the content and databases this workflow needs. Provider instructions.
Verify the connection
Check that the connection is healthy. Then run a read operation against a resource the connected account can access. A successful connection check confirms authentication; it does not guarantee permission for every action.
If access is denied, check the credential or OAuth permissions, the selected account or environment, and access to the specific resource. Update expired credentials or reconnect after permissions change.
Use an action
Add the required Metabase action to the workflow.
Select a connection when the action requests one.
Complete the required fields. Use the reference picker when a value comes from another workflow step.
Run the workflow and inspect the action’s output. Check the result before using it in a later step.
Actions
Search Metabase Content
Find accessible questions, dashboards, collections, databases, tables, models, and metrics by name.
Inputs
Search
string
No
Words to match in Metabase content names and metadata.
Content Type
select (string)
No
Type of Metabase content to return. Available values: Question, Dashboard, Collection, Database, Table, Model, Metric. Default: card.
Archived Only
boolean
No
Search archived content instead of active content. Default: false.
Outputs
Matching Content
object_array
Accessible Metabase content matching the search.
List Queryable Databases
List Metabase databases that the connected API key can query.
Inputs
Include Saved Questions Database
boolean
No
Include Metabase's virtual database of saved questions. Default: false.
Outputs
Databases
object_array
Databases available for querying with this connection.
Run Card Query
Run a saved Metabase question and return its structured results.
Inputs
Saved Question
select (string)
Yes
Saved question to run. Options load from the selected connection.
Question Parameters
textarea
No
Optional values for filters defined by the saved question.
Ignore Cached Results
boolean
No
Force Metabase to execute the question instead of using cached results. Default: false.
Dashboard Context
select (string)
No
Optional dashboard whose filters should apply to this question. Options load from the selected connection.
Outputs
Status
string
Metabase query completion status.
Row Count
integer
Number of result rows returned by Metabase.
Columns
object_array
Column metadata for the result set.
Rows
array
Rows returned by the saved question.
Run Dataset Query
Run an ad-hoc native SQL or complete MBQL query and return structured results.
Inputs
Query Type
select (string)
Yes
Whether to run SQL or an existing MBQL query object. Available values: Native SQL, MBQL. Default: native.
Database
select (string)
No
Database against which native SQL will run. Options load from the selected connection.
SQL Query
textarea
No
Read-only SQL to execute in native mode.
MBQL Query JSON
textarea
No
Complete dataset query object supplied by Metabase for MBQL mode.
Outputs
Status
string
Metabase query completion status.
Row Count
integer
Number of result rows returned by Metabase.
Columns
object_array
Column metadata for the result set.
Rows
array
Rows returned by the dataset query.
Get Dashboard
Get a Metabase dashboard's structure, tabs, filters, and cards.
Inputs
Dashboard
select (string)
Yes
Dashboard to retrieve. Options load from the selected connection.
Outputs
Dashboard
object
Dashboard definition returned by Metabase.
Create Card
Create a saved Metabase question from native SQL or a complete MBQL query.
Inputs
Question Name
string
Yes
Name shown for the saved question in Metabase.
Description
textarea
No
Optional explanation of what the question measures.
Query Type
select (string)
Yes
Whether the saved question uses SQL or an existing MBQL query object. Available values: Native SQL, MBQL. Default: native.
Database
select (string)
No
Database against which native SQL will run. Options load from the selected connection.
SQL Query
textarea
No
Read-only SQL saved in the question for native mode.
MBQL Query JSON
textarea
No
Complete dataset query object supplied by Metabase for MBQL mode.
Visualization Type
string
No
Metabase visualization identifier for the new question. Default: table.
Destination Collection
select (string)
No
Optional collection in which to save the question. Options load from the selected connection.
Visualization Settings
textarea
No
Optional Metabase settings for the selected visualization. Default: {}.
Outputs
Created Question
object
Saved question created by Metabase.
Export Query Results
Export a saved Metabase question's results as a CSV or XLSX file.
Inputs
Saved Question
select (string)
Yes
Saved question whose results should be exported. Options load from the selected connection.
File Format
select (string)
Yes
File format for the exported results. Available values: CSV, XLSX. Default: csv.
Question Parameters
textarea
No
Optional values for filters defined by the saved question.
Format Values
boolean
No
Apply Metabase display formatting to exported values. Default: false.
Pivot Results
boolean
No
Export pivoted results when the saved question supports them. Default: false.
Include CSV BOM
boolean
No
Include a UTF-8 byte-order mark for CSV compatibility. Default: false.
Outputs
Exported File
binary_file
CSV or XLSX file containing the query results.
Important behavior
Actions that create, update, send, or delete data can change the connected service. Review their inputs before running them. A retry can repeat an operation; consider this when configuring retries for actions that change data.
The catalog lists the fields and capabilities available in the supplied provider definition. Availability can also depend on your deployment and organization’s Feature Access settings.
Last updated
Was this helpful?

