https://discord.gg/botpress logo
#🤝help
Store a question from the user in a Google Sheet
# 🤝help
g

green-vr-73388

07/21/2023, 12:12 PM
Hello I'm trying to store the questions in a google sheet , I've installed the Webhook extension in google workspace and I made this code in Botpress to store it, but I find no changes , is it possible to help me see why or if there is another method please? : const sheetId = 'XXX' const sheetName = 'testAI' const helpfulAnswer = workflow.helpfulAnswer const appendToSheet = async (sheetId, sheetName, data) => { const url =
https://sheets.googleapis.com/v4/spreadsheets/${sheetId}/values/${sheetName}:append?valueInputOption=USER_ENTERED
const response = await axios.post( 'https://script.google.com/macros/s/AKfycbxwXpi_jV4QGcUYJ7hY3BsEunleKKtyrcyjg6mlP3IliIwNkz3diY1H2yOiySBbMydZ/exec?gid=0', { values: [data] } ) return response.data } await appendToSheet(sheetId, sheetName, [helpfulAnswer])