Skip to content

bchhun/dialogflow-fulfillment-google-spreadsheet

Repository files navigation

Dialogflow's fulfillment linked with a google spreadsheet for data

This is a simple Express app to be used with a Dialogflow's agent as a webhook.

The spreadsheet being used in this demo

https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit

The .env file content

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 is 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms
  • 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

The dialogflow agent

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:

Hi ! Here's every student in my class: Alexandra, Andrew, Anna, Becky, Benjamin, Carl, Carrie, Dorothy, Dylan, Edward, Ellen, Fiona, John, Jonathan, Joseph, Josephine, Karen, Kevin, Lisa, Mary, Maureen, Nick, Olivia, Pamela, Patrick, Robert, Sean, Stacy, Thomas, Will

About

An node/express app that can be used for a DialogFlow agent

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published