Today we're announcing a new enhancement to Google Apps Script: the ability to create and access Google Sites.
Using the new SitesApp Service, your scripts now have full control over your sites including adding attachments, changing the text within a web page, and even adding new collaborators to your sites so you can share and edit them with your friends. For more details, see the Apps Script Sites documentation.
A good example came to our attention recently as a colleague set about improving the organization of his soccer league. He had to create home pages for each of the teams, with information on each of the players in the league. Before long, he was overwhelmed with the task of managing all of the information on these sites.
Luckily, the players were already listed in Gmail Contacts, and training times and matches were already entered on Google Calendar. It proved a simple task to write a script that created a new Google Site for each team, pulling in player details from Gmail Contacts, and copying training and match details from Google Calendar.
This automation saved him a lot of repetitive button pressing, and it made adding future team sites a snap.
A tutorial detailing the creation of a site in script can be found here. You can take it a step further by using one of the many site templates that are freely available. Start by creating a site customized from your chosen template, and then update it with team specific content using Apps Script.
We think this is a great example of taking useful information from semi-private, hard-to-access sources, and sharing it with a wider audience – be it your soccer league, your enterprise, or the entire world.
Posted by Henry Lau, Google Apps Script Engineer