There is a better alternative today because Google has provided a scripting platform to run as a WEB application or linked to Google Drive documents. This solution is called Google Apps Script
and is available at link .
See example below:
function doGet() {
var app = buildApp();
return app;
}
function myClickHandler(e) {
var app = UiApp.getActiveApplication();
var label = app.getElementById('statusLabel');
label.setVisible(true);
app.close();
return app;
}
function buildApp() {
var app = UiApp.createApplication();
app.setTitle('criando aplicação')
var button = app.createButton('Click Me');
app.add(button);
var label = app.createLabel('The button was clicked.').setId('statusLabel')
.setVisible(false);
app.add(label);
var handler = app.createServerHandler('myClickHandler');
handler.addCallbackElement(label);
button.addClickHandler(handler);
app.setTitle('aplicação criada com id ' + app.getId());
return app;
}
You can see in this DOC that I wrote some more details.
This approach is better than the one I suggested earlier because Google Apps Script
allows you to interact directly with GMail and the entire Google Cloud infrastructure.