This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function rosterMaker() { | |
//spreadsheet id of the rosters | |
var SHEET_ID = FormApp.getActiveForm().getDestinationId(); | |
var ss = SpreadsheetApp.openById(SHEET_ID); | |
var form = FormApp.getActiveForm(); | |
//get only the sheets with 'Roster' in the title | |
var sheets = ss.getSheets() | |
.filter(function(sheet) {return sheet.getName().match(/Roster/gi);}); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create or replace function sendgrid_eid24_to_uuid(eid text) | |
returns uuid language sql immutable strict parallel safe | |
as $function$ | |
select encode(decode(translate(eid, '-_', '+/'), 'base64'), 'hex')::uuid; | |
$function$; | |
create or replace function sendgrid_eid48_to_uuid(eid text) | |
returns uuid language sql immutable strict parallel safe | |
as $function$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function pullJSON() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheets = ss.getSheets(); | |
var sheet = ss.getActiveSheet(); | |
var url="http://example.com/feeds?type=json"; // Paste your JSON URL here | |
var response = UrlFetchApp.fetch(url); // get feed | |
var dataAll = JSON.parse(response.getContentText()); // |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getJSON(aUrl,sheetname) { | |
//var sheetname = "test"; | |
//var aUrl = "http://pipes.yahoo.com/pipes/pipe.run?_id=286bbb1d8d30f65b54173b3b752fa4d9&_render=json"; | |
var response = UrlFetchApp.fetch(aUrl); // get feed | |
var dataAll = JSON.parse(response.getContentText()); // | |
var data = dataAll.value.items; | |
for (i in data){ | |
data[i].pubDate = new Date(data[i].pubDate); | |
data[i].start = data[i].pubDate; | |
} |