Sites Service : Email Template using a Webpage


Sites Service: Email Template using a Webpage:


A Google Apps Script standalone 'Email Template' using a Google Sites webpage.

Using the 'doGet' so the Apps script can be used as a Apps Script Gadget directly from the Google Sites Insert Menu. 

  • Add the Apps script Snippet to Google Site.
  • Add Email /replyTo Email [Set to Active User email]
  • Save/Authorize the App Script.
  • Insert the Apps script gadget from the Insert menu in google sites.

Apps Script Gadget (process)


Contact form UI 
  • Add Contact Details 
Submit Email using Google sites Template, replacing the form data.

You can the set the page level permissions to hide the website template from the public, but still access it through Google Apps Script.



Submit an Email Address to receive a Google Sites 'Templated' Email 



Add Apps Script to your Google sites


Add the Apps Script Snippet [below] to your Google Sites - Apps Script Editor . 

Insert into your Google sites page and set the Apps Script Gadget properties to allow anonymous users :

Apps Script Gadget properties Allow anyone to invoke this service and [tick] Allow anonymous access

[You Must provide a valid email to preview the results]

Apps Script Gadget ‎[Site Template to Email]‎