Manolesco
Manolesco

Reputation: 1

Create Google Assistant Webhook using Nodejs server hosted on Heroku

Is there any possibility to create a webhook using only a nodejs server hosted on Heroku? The only webhooks that I found were made with Dialog Flow, and I cannot find anywhere documentation to solve my problem.

My code for the moment is:

'use strict';
const express = require('express');
const functions = require('firebase-functions');
const {dialogflow} = require('@assistant/conversation');
const bodyParser = require('body-parser');
const port = process.env.PORT || 3000;
const app = dialogflow({debug:true});

app.handle('yes', (conv)=>{
    conv.add('Bro, you fire');
});

const expressApp = express().use(bodyParser.json());
expressApp.post('/webhook', app);

expressApp.get('/da', (req,res)=>{
    res.send("Sheeesh");
});

expressApp.listen(port);

exports.ActionsOnGoogleFulfillment = functions.https.onRequest(app);

But whenever i try to use the webhook, I get the message: "No intent was provided and fallback handler is not defined."

Upvotes: 0

Views: 225

Answers (0)

Related Questions