Can Domo Export Data to Google Sheets?
We have processors in our office that need a Data Feed from Domo because they have to type in supporting notes based on the data and keep record on Google Sheets. We want it in a form of a feed because the data comes from out in-house API system. The API system is already bridging that information over to Domo, I would just need that feed in Domo coming from our API to go to Google Sheets. Is there an ability?
Comments
-
Thank you!0
-
We announced a new developers center at Domopalooza last week which includes the introduction of the Domo API. This will allow you retrieve data from a dataset in Domo to use outside of Domo. You would need some technical skills but should be able to retrieve the data from Domo and then use a Google Sheets API to update your spreadsheet.
Thanks,
Sam
I am no longer with Domo. Please @mention @Millhouse for connector specific questions.1 -
Are there demo account credentials for DOMO I could use to write a blog post on how to do this? Let me know. Thanks!
1 -
Thank you for checking, this is a great feature. I am pretty familiar with the API system. If not, our company has our advanced engineering dept who can also look into this feature for us. Is there an instruction how to get started since it's a new feature?
0 -
I am interested in the API docs as well.
0 -
Hi,
just wanted to share a simple working solution via Google Apps Script that can be adapted quickly. I hope it's a good starting point for anyone wishing to import one or multiple DataSets to a Google Sheet.
Basic working logic:
1) Input your desired DataSet ID. Could be a single set or a list of multiple ids.
2) Input your API token
3) Name the sheet that shall contain your data
4) Name the sheet where to log the last update timestamp
Before you can run the script, you must have obviously created the according sheets in the spreadsheet.
After that, you're done.
The script will basically check whether the B1 field in the update log sheet is empty or the contained timestamp value is later then the last update timestamp retrieved via Domo's API. If one of the conditions is fulfilled, the DataSet will be fetched and posted to the data sheet, if not, nothing happens.
You can set triggers for the script to run by clicking on the clock icon.
You can alter the first cell the data is copied to by changing the range values in the sheet.getRange(1, 1, csvData.length, , csvData[0].le...); line of the getDataSet() function.
var id = "DataSet id"
var token = "bearer YOUR_TOKEN"
var dataSheetName = "YOUR NAME HERE"
var updatelogSheetName = "Update Log" //OR YOUR NAME
function myFunction() {
getLastUpdate(id);
}
function getDataSet(id) {
var options = {
"method" : "GET",
headers: {
Accept: "text/csv",
Authorization: token
},
};
var csvContent = UrlFetchApp.fetch("https://api.domo.com/v1/datasets/" + id + "/data?includeHeader=true&fileName=dump.csv", options).getContentText();
var csvData = Utilities.parseCsv(csvContent);
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(dataSheetName);
sheet.getRange(1, 1, csvData.length, csvData[0].length).setValues(csvData);
}
function getLastUpdate(id) {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(updatelogSheetName);
var lastUpdatedSheet = sheet.getRange(1,2).getValue();
var options = {
"method" : "GET",
headers: {
Accept: "application/json",
Authorization: token
},
};
var response = UrlFetchApp.fetch("https://api.domo.com/v1/datasets/" + id, options).getContentText();
var json = JSON.parse(response);
var lastUpdatedApi = json.updatedAt;
if (lastUpdatedSheet == null || lastUpdatedSheet < lastUpdatedApi) {
getDataSet(id);
sheet.getRange(1, 1).setValue("Last Updated:");
sheet.getRange(1, 2).setValue(lastUpdatedApi);
} else {
Logger.log("No new data; Last updated at: " + lastUpdatedSheet + "; Last tried at: " + lastUpdatedApi);
}
}3
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 57 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive