0

I'm trying to build a chatbot with Watson Assistant which can query google sheets spreadsheet and display the result in the chatbot. So I want to know how can that be done? I know it can be done by using Webhooks which can be called using URL Endpoints but how would I store the user input and match it with the spreadsheet values and then store the returned spreadsheet values and display them while the conversation?.

This is my spreadsheet link it will give you the idea of what I am building, https://docs.google.com/spreadsheets/d/1hrRt3cmnr0hRfLfEpWMLDVmsicOU2bZzIAzv10WSttI/edit#gid=0

Sahil
  • 1
  • 2
  • See this tutorial for how a webhook / cloud function is used to call out to a database system. You would do the same but to Google Sheets: https://cloud.ibm.com/docs/tutorials?topic=solution-tutorials-slack-chatbot-database-watson – data_henrik Aug 05 '19 at 07:59

1 Answers1

0

you could build on query URL parameters where your chatbot would autocorrect user requests like here: https://developers.google.com/chart/interactive/docs/querylanguage#setting-the-query-in-the-data-source-url

example:

https://docs.google.com/spreadsheets/d/ID_HERE/gviz/tq?tq=select%A%2C%20sum(B)%20group%20by%20A
player0
  • 124,011
  • 12
  • 67
  • 124