I created a simple bot to test some new resources, but I'm facing an issue with fulfillment responses on some clients. I'm testing with many integrations.
I wrote two intents to test:
actions-on-google
package.What happened:
"Hi" - intent doesn't work with other integrations (🔥), but it shows "Typing..." while my node backend creates the answer, but the text response is never showed.
In debug mode, I see that the request is received, the intent match, and the Response
object are like expected.
const { dialogflow } = require('actions-on-google');
const app = dialogflow({ debug: true });
...
app.intent('Hi', conv => {
console.log('>> Hi Fulfillment reached');
conv.ask(`Hi! I'm a fulfillment response on node!`);
});
>> Hi Fulfillment reached
Response {
"status": 200,
"headers": {
"content-type": "application/json;charset=utf-8"
},
"body": {
"payload": {
"google": {
"expectUserResponse": false,
"richResponse": {
"items": [
{
"simpleResponse": {
"textToSpeech": "Hi! I'm a fulfillment response on node!"
}
}
]
}
}
}
}
}
POST /api/chatBot/ 200 156 - 1419.611 ms
I recorded my screen to show better that behavior.
Any help is appreciated!
You are using the actions-on-google
nodeJS library. This library is used to build bots on the Actions on Google platform using Dialogflow. You can use it to build some basic things for other integrations, but you might run into limitations as it is build specifically for Google Assistant.
If you want to build bots for multiple integrations of Dialogflow it is better to use the dialogflow fulfillment library. This is ment for building chatbots for multiple integrations for Dialogflow.