https://discord.gg/botpress logo
#🤝help
How to send information that chatbot cannot answer to google sheets.
# 🤝help
c

colossal-terabyte-32218

07/17/2023, 5:08 PM
Hey guys!! Does anyone know what code to put in the execute code so that when I insert a webhook from zapier inside the execute code, it can be able to pull all the information that has been said from the chatbot to that point to google sheets. For context, I want that to happen each time the bot doesn’t have an answer for a question from the knowledge base so that it can be sent to the support rep.
a

acceptable-kangaroo-64719

07/17/2023, 5:19 PM
You can try using Zapier to send info to a Google Sheet.
c

colossal-terabyte-32218

07/17/2023, 5:31 PM
That’s exactly what I am planning to do. Only problem is I don’t know what code to put inside the execute code block.
b

bright-insurance-97259

07/19/2023, 6:08 AM
what trigger we will be using in zapier to save responses in google sheet, do we need to write customize code, any tutorial for botpress wih zapier?
a

acceptable-kangaroo-64719

07/19/2023, 10:42 AM
You can use a webhook trigger that connects to Google Sheets. Then you can post to that webhook URL like below:
Copy code
js
axios.post('https://hooks.zapier.com/hooks/catch/YOUR-URL-HERE/', { text: 'Hello' }).then((response) => {
  workflow.zapData = response
})
Replace the URL with your own Zapier webhook URL. In Zapier you can configure which rows of what speadsheet get returned. This data will be available in
workflow.zapData
.

https://cdn.discordapp.com/attachments/1130546515895656540/1131174207733125170/image.png

https://cdn.discordapp.com/attachments/1130546515895656540/1131174207988957224/image.png