-
nodejs-dialogflow
Discontinued Node.js client for Dialogflow: Design and integrate a conversational user interface into your applications and devices.
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
Then we use this file from https://github.com/googleapis/nodejs-dialogflow I put it into a file I called chatbot-helper.js which I then exported and imported in my request handler. This file contains a function called 'runSample' which contains all the proper config to start communicating with your agent. We will have to edit a couple of things here. The only thing you have to change here is your actual project id in the parameters of the function. I stored my project id in .env and imported it here. Later on, we will add a parameter called message and pass it in for the value of text.text in the queryInput object.