View Code.gs
// Grabs my latest tweet using the handy TwtrService wrapper by +MartinHawksey - https://goo.gl/2it7yb
function getLatestTweet() {
var data = TwtrService.get("statuses/user_timeline", {screen_name: /*"YourTwitterHandle(without the @)"*/, count: 1});
var id = data[0].id_str;
// Grabs embed code for my latest tweet. Would look much prettier if Gmail could render it properly.
var response = UrlFetchApp.fetch('https://publish.twitter.com/oembed?url=https://twitter.com/Interior/status/'+id);
var json = JSON.parse(response);
var text = json.html;
View Code.gs
function onFormSubmit(e) {
//Gets the incoming form response
var formResponse = e.response;
//Puts the response from each question into an array
var itemResponses = formResponse.getItemResponses();
//Gets the respondent's email address
var email = formResponse.getRespondentEmail();
//Extracts the first and last name from the response
var name = itemResponses.splice(0, 2);
//An array containing how many dots are on the paper form in sequential order