Skip to main content

Metabase integration

Update your goals with data from Metabase through Google Sheets.

ℹ️ Available on all plans.

Perdoo doesn't connect to Metabase directly. Instead, pull the results of a Metabase question into Google Sheets with a short script, and link your goals to the cells you need.


Before you start

Connect the Google Sheets integration in Perdoo, or install the Google Sheets Add-on.


Pull Metabase data into Google Sheets

  1. In your spreadsheet, go to Extensions > Apps Script.

  2. Paste the script below. Replace the URL with the URL of your Metabase question, ending in /query/json.

  3. Save and run the script. To refresh the data automatically, add a time-driven trigger in Apps Script.

function myFunction() {
  var sheet = SpreadsheetApp.getActive().getSheets()[0];
  var data = {
    // the data that you will be using
  };
  var options = { 'method': 'post', 'payload': data };
  var response = UrlFetchApp.fetch('https://metabase.example.com/api/card/1/query/json', options);
  var responseData = JSON.parse(response.getContentText());
  sheet.appendRow(responseData);
}

Update your goals with Metabase data

Link each goal to the cell with its value. With the Google Sheets integration, open the goal, click Progress driver, and select the cell. With the Google Sheets Add-on, link the data to the Goal Progress cells of the goals you imported.


Need help?

Start a live chat with our Support team by clicking on the ? at the bottom left or bottom right of your screen.

Did this answer your question?