To connect Metabase to Google Sheets so that the sheets pull CSVs automatically from Metabase URLs:
Contact our Support team to set up our Google Sheet integration.
Use the following code as a simple 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); }
Need help?
Contact our friendly Support team via the in-app chat at the bottom-right of your screen, or email support@perdoo.com.