Metabase Custom icon

Metabase Custom

Use the Metabase API

Actions4

Question → Get

AI-generated

Overview

This node interacts with the Metabase API to retrieve data related to a specific Question resource. The "Get" operation fetches details or results for a given question by its ID. This is useful when you want to programmatically access saved questions from Metabase within an n8n workflow, such as retrieving query results or metadata for reporting, automation, or further processing.

Practical examples include:

  • Automatically fetching the latest results of a dashboard question to send reports via email.
  • Integrating Metabase question data into other systems or databases.
  • Triggering workflows based on specific question outputs or statuses.

Properties

Name Meaning
Question ID The unique identifier of the Metabase question to retrieve. This is required and must be provided as a string (e.g., "0").

Output

The node outputs the full response from the Metabase API call related to the specified question. The json output field contains the detailed data returned by the API, which may include question metadata, query results, or other relevant information depending on the question type and API endpoint used.

If the question returns binary data (e.g., image or file export), the node would handle it accordingly, but this is not explicitly shown in the provided code snippet.

Dependencies

  • Requires an active connection to the Metabase API.
  • Needs an API authentication token or key configured in the node's credentials (referred generically as "an API key credential").
  • The base URL for the Metabase instance must be set correctly in the credentials.
  • No additional external dependencies are indicated beyond the Metabase API and proper credential setup.

Troubleshooting

  • Common issues:
    • Invalid or missing Question ID will cause the API call to fail.
    • Incorrect or expired API credentials will result in authentication errors.
    • Misconfigured base URL can lead to connection failures.
  • Error messages:
    • Authentication errors typically indicate invalid API keys; verify and update credentials.
    • "Question not found" errors suggest the provided Question ID does not exist or is inaccessible.
    • Network or timeout errors imply connectivity issues with the Metabase server.

Resolving these usually involves verifying input parameters, checking API credentials, and ensuring network accessibility.

Links and References

Discussion