So complicated to set Dialogflow(base) agent with Actions on Google.
Using Fulfillment by Google Cloud (Firebase) Function
I already research crash logs but I don't know how to resolve this problem.
Unfortunately, Dialogflow is changing to the Google Cloud solutions and It uses Actions on Google too. That is why I cannot resolve this problem with official document.
Setting for Dialogflow Console
- Responses: I already typed a sample text response at DEFAULT. I didn't checked "Use responses from the DEFAULT tab as the first responses." at GOOGLE ASSISTANT
- Fulfillment: I checked all like "Enable webhook call...".
const {BrowseCarouselItem, BrowseCarousel, Image} = require('actions-on-google');
function carousel_1(agent) {
let conv = agent.conv();
conv.ask('Default Text Message.');
conv.ask(new BrowseCarousel({
items: getItems()
}));
agent.add(conv);
}
...
// Added this bottom of the full code.
intentMap.set('Carousel Intent', carousel_1);
// HTTP REQUEST
...
var cItems = new Array();
body = JSON.parse(body);
function getItems() {
for (var i = 0; i < body.length; i++) {
cItems.push(
new BrowseCarouselItem({
title: body[i].bTitle,
description: body[i].bDesc,
url: body[i].bUrl,
image: new Image({
url: body[i].bImg
}),
footer: 'FOOTER'
})
)
}
return cItems
}
Error Message in the Google Assistant
There is no response. Please try again later.