Google Dialogflow v1 with Firebase

Create a bot API key

Each bot needs its own API key for tracking.

Create a bot to get an API key.

Include the Dashbot NPM module in package.json

In the Dialogflow Inline Editor, include the npm module in package.json:

"dependencies": { 
 "dashbot": "^11.1.0" 

Include Dashbot

Use the API key created above.

'use strict';
const functions = require('firebase-functions');
const DialogflowApp = require('actions-on-google').DialogflowApp;

const dashbot = require('dashbot')(process.env.DASHBOT_API_KEY).google;

After creating a DialogflowApp object, pass it to Dashbot

exports.dialogflowFirebaseFulfillment = functions.https.onRequest((request, response) => {
  const app = new DialogflowApp({request: request, response: response});
Close Menu