Before we start to build the Fortune Cookie application, let's enable the webhook feature of Dialogflow so that all intents can be routed to the Dialogflow Node.js server.
- In Dialogflow, go to Fulfillment and enable Inline Editor. This will allow you to enter Node.js code into the editor.
The following screenshot shows enabling webhook in the Dialogflow fulfillment:
- Notice that there are default codes. First, let's replace those codes by declaring Google Cloud Functions for Firebase.
'use strict';const firebase = require('firebase-functions'); ...