Johnny1500,
вот так получилось:
function getGoogleData(address1, address2) {
var url = "http://maps.googleapis.com/maps/api/directions/json?origin="
url+=address1
url+="&destination="
url+=address2
var response = UrlFetchApp.fetch(url);
if (response.getResponseCode() == 200){
var data = JSON.parse( response.getContentText() );
var lenght = data.routes[0].legs[0].distance.text;
var duration = data.routes[0].legs[0].duration.text;
return [lenght, duration];
}
}