HOWTO: 

Create a Google Apps Script Web App bound to a Spreadsheet