This is a simple Express app to be used with a Dialogflow's agent as a webhook.
https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit
You will need to create an .env
file with the following content:
SPREADSHEET_ID
: your spreadsheet id. it's in the url of your spreadsheet. Make sure the spreadsheet is public. The id in the current spreadheet is1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms
SPREADSHEET_API_KEY
: an API key that has a read-only access to google spreadsheet. Created in your google cloud project under the API section
It's testable here: https://bot.dialogflow.com/0eac406e-b0c0-4169-9321-c8df60854b99
The agent's export file is downloadable here: http://bit.ly/2xN9g2k
The fulfillment url is already configured to hit this webhook :)
Just say Hi
in the Try it now
section in the top right section of the Dialogflow's UI.
The webhook will return all the students in the google spreadsheet and return the following text: