Now that we're done creating the logic of the webhook, it is pretty simple to deploy it using Cloud Functions on Firebase. Follow these steps to do so:
- Click on the Fulfillment button on the left navigation of the Dialogflow Console. Enable the Inline Editor to be able to add your webhook and deploy it directly to Cloud Functions.
You will have to clear out the default boilerplate code that is in the Inline Editor to do this.
- Paste the code in the editor from the previous section into the index.js tabbed navigation pill and click on Deploy.
Remember that the environment that's being used for deployment is Node.js, so index.js is the file that shall contain all your business logic. The package.json file manages the required packages for your project.Â
Using Cloud Functions comes with the advantage of the...