Choose one of the three options listed below for setup. You only need to complete one of the three options below to setup this sample.
Click on the Add to Dialogflow button below and follow the prompts to create a new agent:
- Sign up for or sign into Dialogflow and create a agent
- Go to your agent's settings and Restore from zip using the
dialogflow-agent.zip
in this directory (Note: this will overwrite your existing agent) - Enable the Cloud Function for Firebase inline editor
- Change the name of the function in
functions/index.js
fromdialogflowFulfillmentLibAdvancedSample
todialogflowFirebaseFulfillment
- Copy this code in
functions/index.js
theindex.js
file in the Dialogflow Cloud Function for Firebase inline editor. - Add
"dialogflow-fulfillment": "^0.4.0"
to thepackage.json
file'sdependencies
object in the Dialogflow Cloud Function for Firebase inline editor. - Click
Deploy
- Sign up for or sign into Dialogflow and create a agent
- Go to your agent's settings and Restore from zip using the
dialogflow-agent.zip
in this directory (Note: this will overwrite your existing agent) cd
to thefunctions
directory- Run
npm install
- Install the Firebase CLI by running
npm install -g firebase-tools
- Login to your Google account with
firebase login
- Add your project to the sample with
firebase use [project ID]
find your project ID here - Run
firebase deploy --only functions:dialogflowFulfillmentLibAdvancedSample
- Paste the URL into your Dialogflow agent's fulfillment
- Dialogflow documentation: https://docs.dialogflow.com.
- If you find any issues, please open a bug on GitHub.
- Questions are answered on StackOverflow.
Please read and follow the steps in the CONTRIBUTING.md.
See LICENSE.md.
Your use of this sample is subject to, and by using or downloading the sample files you agree to comply with, the Google APIs Terms of Service.