<!DOCTYPE html> <html> <head> <base target="_top"> </head> <body> <form id="myForm"> <select id="selections" multiple> <option value="Option 1">Option 1</option> <option value="Option 2">Option 2</option> <option value="Option 3">Option 3</option> </select> <br><br> <input type="button" value="Submit" onclick="submitForm()"> </form> <script> function submitForm() { var selection = []; var select = document.getElementById("selections"); for (var i = 0; i < select.options.length; i++) { if (select.options[i].selected) { selection.push(select.options[i].value); } } google.script.run.processSelection(selection); google.script.host.close(); } </script> </body> </html>