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 saveMessage(webhookMessageResult) { | |
if (webhookMessageResult.type === 'user-answers') { | |
for (const question of webhookMessageResult.value.data) { | |
let sheet = SpreadsheetApp.getActiveSheet(); | |
let lastRow = Math.max(sheet.getLastRow(), 1); | |
sheet.insertRowAfter(lastRow); | |
let nowDate = new Date(); |
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 saveMessage(webhookMessageResult) { | |
if (webhookMessageResult.type === 'user-answers') { | |
const dialogs = webhookMessageResult.value.data; | |
let sheets = SpreadsheetApp.getActiveSpreadsheet().getSheets(); | |
let sheet = sheets[0]; | |
for (let i = 0; i < dialogs.length; i++) { | |
const dialog = dialogs[i]; |