How to send custom Payload from Dialogflow fulfilment
See original GitHub issueI am trying to send custom payload from the webhook (Firebase Cloud Function) but I am not able to achieve what I am trying. In response I wanna get something like:
"fulfillmentMessages": [
{
"text": {
"text": [
"First question."
]
}
},
{
"text": {
"text": [
"What is your name?"
]
}
},
"payload": {
"deplay": "13 seconds"
}
]
But right now I don’t know how to add Payload in the fulfillmentMessages Array. My current code is:
let response = ['First question.', 'What is your name?'];
agent.add(response);
I have tried this
agent.add(new Payload('PLATFORM_UNSPECIFIED', JSON.stringify(json)));
But then it does not send fulfillmentMessages array. Any solution?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:11
Top Results From Across the Web
Fulfillments | Dialogflow CX - Google Cloud
Some integrations support a custom payload response to handle rich responses. These custom payloads are supplied in a JSON format defined in the...
Read more >Custom payload in Dialogflow - node.js - Stack Overflow
i try to send custom payload in Dialogflow from fulfillment(nodejs). My motive is send link and its text as response to web page....
Read more >How to setup Fulfillment Response in Dialogflow
We use a custom payload for carousel response here. Payload has two top-level fields - one types & the other is items. Type...
Read more >CX Webhook response as custom payloads - Google Groups
to Dialogflow CX Edition users. Why my webhook payloads not showing as buttons? the object I'm sending from webhook: {. fulfillment_response: {. messages:...
Read more >How to Send Image with Dialogflow - Level Up Coding
This article will describe how to send an image using Dialogflow ... Get Dialogflow agent fulfillment library (NodeJS) by using the following command:...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks @HSpens works as expected after update. Just for others who Google the same thing, the code to send custom payload is:
God, man I was trying so hard to find a solution and this code resolved my issue. Thanks.