Using with Google DialogFlow
This article showcases an example project demonstrating how the Google Dialogflow API V2 can be consumed by the Conversational UI component. For the purpose we created a sample backend server based on Express which is used to make requests using the credentials of a test service account.
-
Log into the Google Dialogflow console and create a new agent.
-
Use the "Restore from ZIP" to import the
agent.zip
file located in thebackend
folder. -
Get a service account key and export it as a JSON file.
You will need to set up a payment method for Google Cloud Functions. There is a generous free tier of 2 million requests, but usage is not capped.
-
Rename the key JSON file to
credentials.json
and add it to the projectbackend/server
folder. -
Deploy the Fulfillment code as demonstrated in the project `backend/webhook' folder using the Inline Editor.
Creating an Agent
Log into the Google Dialogflow console and create a new agent.
Use the "Restore from ZIP" option to import the agent.zip
file located in the referenced GitHub project backend
folder.
Create a Service account and get its key
Get a service account key and export it as a JSON file.
You will need to set up a payment method for Google Cloud Functions. There is a generous free tier of 2 million requests, but usage is not capped.
Import the key JSON file in the project
Rename the key JSON file to credentials.json
and add it to the project backend/server
folder.
Deploying Fulfillment Webhook Code
Deploy the Fulfillment code from the webhook
located in the project backend/webhook
folder using the Inline Editor.