function generateQueryString(data) { const params = []; for (var d in data) params.push(encodeURIComponent(d) + '=' + encodeURIComponent(data[d])); return params.join('&');}function test() { var data = {'name': 'Desmond', 'age': '40'} var response = UrlFetchApp.fetch('https://www.mywebsite.com/do_something?' + generateQueryString(data)); Logger.log(response.getContentText());}
References: