Introduction
Google Looker Studio is a powerful business intelligence tool that allows users to generate customized reports and extract data for analysis on BI platforms. This document provides instructions on integrating the Conviso Platform with Google Looker Studio, a solution for business intelligence integration.
Integrating directly into Google Apps Script​​
Follow these steps to integrate Conviso Platform with Google Apps Script:
Step 1 - With a new spreadsheet created, select the Apps Script option:

Step 2 - Paste the code provided below and click Run:
function test() {
var queryTemplate = `
{
assets(
companyId: "<YOUR_COMPANY_ID>"
page: %d
limit: 10
search: {}
) {
collection {
id
name
businessImpact
riskScore {
current {
value
}
}
}
metadata {
totalPages
}
}
}
`;
var url = "https://app.convisoappsec.com/graphql";
var options = {
headers: {
'Content-Type': 'application/json',
'x-api-key': '<YOUR_CONVISO_API_KEY>'
},
method: "POST"
};
try {
var page = 1;
var totalPages = 1;
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.clear();
var headers = ["Asset ID", "Asset Name", "Business Impact", "Risk Score"];
sheet.appendRow(headers);
do {
var query = Utilities.formatString(queryTemplate, page);
options.payload = JSON.stringify({ query: query });
var response = UrlFetchApp.fetch(url, options);
var jsonResponse = JSON.parse(response.getContentText());
if (jsonResponse.errors) {
Logger.log("GraphQL Error: " + JSON.stringify(jsonResponse.errors));
return;
}
var assets = jsonResponse.data.assets.collection;
totalPages = jsonResponse.data.assets.metadata.totalPages;
assets.forEach(function(asset) {
var row = [
asset.id || "",
asset.name || "",
asset.businessImpact || "NULL",
asset.riskScore.current.value || "NULL"
];
sheet.appendRow(row);
});
page++;
} while (page <= totalPages);
Logger.log("Data inserted into sheet successfully.");
} catch (e) {
Logger.log("Error: " + e.toString());
}
}

Step 3 - Allow Google Apps Script to access your data:

Step 4 - Check the result in the script execution log:

Step 5 - View the information in the spreadsheet that was created earlier:

Support​
If you have any questions or need help using our product, please don't hesitate to contact our support team.
Resources
By exploring our content, you'll find resources that will enhance your understanding of the importance of a Security Application Program.
Conviso Blog: Explore our blog, which offers a collection of articles and posts covering a wide range of AppSec topics. The content on the blog is primarily in English.
Conviso's YouTube Channel: Access a wealth of informative videos covering various topics related to AppSec. Please note that the content is primarily in Portuguese.
