Enabling webhook

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.

  1. 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:

The text in this screenshot is not important. This image gives you an idea of how to enable webhook
  1. 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'); ...

Get Voice User Interface Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.