In [[Google Apps Script]] to pass information from the server-side (e.g., `Code.gs`) to the cleint-side (e.g., `JavaScript.html`), you can use [[scriptlets]] to save JSON in the [[DOM]]. You will need to [[convert to JSON]] and then [[stringify and parse JSON]] to store it in the DOM and then read the information on the client-side. As an example, let's store the URL and any [[URL parameters]] for populating the application and routing. In `Code.gs`, within the `doGet` function, use the `ScriptApp.getService().getUrl()` method to get the URL and use the `parameter` method on the event object ( `e` ) to get the parameters. ```javascript title="Code.gs" function doGet(e) { let template = HtmlService.createTemplateFromFile('index'); template.url = ScriptApp.getService().getUrl(); template.urlParams = JSON.stringify(e.parameter); return template.evaluate() } ``` ```html title="index.html" <script> let BASEURL = <?= url ?>; let PARAMS = <?= urlParams ?>; </script> ``` ```javascript title="JavaScript.html" function populateContentFromParams() { let urlParams = JSON.parse(PARAMS) // your code here } ``` #TODO show how to save data instead of pass url parameters, since that is covered in URL parameters.