Hubert
01/08/2025, 5:25 AMCeligo AI
01/08/2025, 5:26 AMAI generated answer (using internal Slack threads):Based on the conversations, here is a sample code on how to make a request to Google API using SuiteScript:
javascript
var https = require('N/https');
var response = https.get({
url: '<https://maps.googleapis.com/maps/api/geocode/json?address=>' + encodeURIComponent('your address') + '&key=' + 'your api key'
});
var body = JSON.parse(response.body);
if(body.results.length > 0){
log.debug('Google Response',response.body);
}else{
log.error('Error','No Address Found, Google Response:'+response.body);
}
This code is making a GET request to the Google Maps Geocoding API. You need to replace 'your address'
with the address you want to geocode and 'your api key'
with your Google API key.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
01/08/2025, 5:26 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.833042741
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.830788612
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.830612361
Celigo AI
01/08/2025, 5:26 AM