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.
- ✅ The fulfillment work fine with: Web Demo and Dialogflow Messenger
- ???? The fulfillment fails with: Facebook Messenger, Slack and Telegram
I wrote two intents to test:
- "Hello" - Text Response Intent
- "Hi" - Fulfillment Intent answered by node using
actions-on-google
package.
What happened:
- "Hello" - intent works on all integrations, like expected.
- "Hi" - intent works like expected with Dialogflow native integrations (✅ )
"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.
Node code:
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!`);
});
Node response (console output):
>> 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!
actions-on-google
package. This package is intended for building just google assistant bot with Dialogflow. I know that it is possible to build bots for other platforms like slack and facebook with that library, but it is better to use the Dialogflow fulfillment library, it is ment for building bots accross multiple platforms using Dialogflow: npmjs.com/package/dialogflow-fulfillment – Jordiactions-on-google
package doesn't work with other integrations. I will try your suggestion right now. Thank you. – Tiago Gouvêa