The Dialogflow Fulfillment Library makes creating fulfillment for Dialogflow v1 and v2 agents for 8 chat and voice platforms on Node.js easy and simple. Cross-platform text, card, image, suggestion are supported for Actions on Google, Facebook, Slack, Telegram, Kik, Skype, Line, Viber and Dialogflow's simulator with custom payload support for all platforms.
Dialogflow fulfillment allows you to connect Dialogflow's natural language understanding and processing to your own systems, APIs and databases. Using fulfillment, you can surface commands and information from your services to your users through a natural conversational interface. More about Dialogflow fulfillment: https://dialogflow.com/docs/fulfillment
This library is intended to be help building Node.js Dialogflow fulfillment for multiple integrations (such as the Google Assistant and Slack) or when you aren't sure what integration you plan on using. If you are only interested in building Dialogflow fulfillment for the Google Assistant and don't plan on using other integrations, please use the Actions on Google NPM module (actions-on-google) which supports all Actions on Google features.
- Sign up for or sign into Dialogflow
- Create a Dialogflow agent
- Enable the Cloud Function for Firebase inline editor
- Copy this code in
samples/quick-start/functions/index.js
theindex.js
file in the Dialogflow Cloud Function for Firebase inline editor. - Add
"dialogflow-fulfillment": "^1.0.0"
to thepackage.json
file'sdependencies
object in the Dialogflow Cloud Function for Firebase inline editor. - Click
Deploy
- Import the appropriate class:
const { WebhookClient } = require('dialogflow-fulfillment');
- Create an instance:
const agent = new WebhookClient({request: request, response: response});
- Class Reference: docs
- Dialogflow documentation: https://docs.dialogflow.com.
- If you find any issues, please open a bug on GitHub.
- Questions are answered on StackOverflow.
- Known Issues/Limitations
- No verification for platforms-specific incompatible response combinations (i.e. multiple cards are not supported in a single Actions on Google response)
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.