Skip to content

Instantly share code, notes, and snippets.

///////////////////////////////////////////////////////
// Google Form Email Script
// Author: Jacob Standish ([email protected])
// This script sends an email to a person or group every time the form is submitted
// The body of the message contains the responses from the form styled with the form questions as HEADING2 and responses as Paragraphs.
// This script needs to be installed into a Google Form (not the spreadsheet) with the On Form Submit trigger set
///////////////////////////////////////////////////////
var recipients = "[email protected]"; //replace with the address you want to receive the email
@mhawksey
mhawksey / gist:1170597
Created August 25, 2011 13:02
Google Apps Script to fill in a Document template with Spreadsheet data
function onOpen() {
var menuEntries = [ {name: "Create Diary Doc from Sheet", functionName: "createDocFromSheet"}];
var ss = SpreadsheetApp.getActiveSpreadsheet();
ss.addMenu("Fitness Diaries", menuEntries);
}
function createDocFromSheet(){
var templateid = "1O4afl8SZmMxMFpAiN16VZIddJDaFdeRBbFyBtJvepwM"; // get template file id
var FOLDER_NAME = "Fitness Diaries"; // folder name of where to put completed diaries
// get the data from an individual user