Last active
October 16, 2017 09:22
-
-
Save macaullyjames/c2be2cad8e41e57de0fc364f16a5416e to your computer and use it in GitHub Desktop.
Google Scripts code for forwarding SMS to Google Sheets – from https://medium.com/46-thoughts/receive-sms-into-google-spreadsheet-435b51393493
This file contains 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 doPost(e) { | |
// Open the requested SpreadSheet and Sheet: | |
var prop = PropertiesService.getScriptProperties(); | |
var spreadSheet = SpreadsheetApp.openById(prop.getProperty('SpreadSheetID')); | |
var sheet = spreadSheet.getSheets()[0]; | |
// Append the data to the sheet on a new row: | |
sheet.appendRow([new Date(), e.parameter['from'], e.parameter['message']]); | |
// Return a empty text string to 46elks | |
return ContentService.createTextOutput(""); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment