Webhook call failed. Error: Failed to parse webhook JSON response: Cannot find field: messages in message...
I built a bot using Dialogflow and connected it to a local webhook (now accessing it through ngrok). I am able to receive the response from Dialogflow but I am unable to replay to it. I followed the JSON structure as shown here - Test response from webhook. But I am getting the following error in Dialogflow.
Webhook call failed. Error: Failed to parse webhook JSON response:
Cannot find field: messages in message
google.cloud.dialogflow.v2.Intent.Message.
Following is the reply that I sent to Dialogflow -
{
"messages":[
{
"speech":"Text response",
"type":0
}
]
}
Please tell me what should be the exact format of the reply that I should send to Dialogflow.
webhooks dialogflow
add a comment |
I built a bot using Dialogflow and connected it to a local webhook (now accessing it through ngrok). I am able to receive the response from Dialogflow but I am unable to replay to it. I followed the JSON structure as shown here - Test response from webhook. But I am getting the following error in Dialogflow.
Webhook call failed. Error: Failed to parse webhook JSON response:
Cannot find field: messages in message
google.cloud.dialogflow.v2.Intent.Message.
Following is the reply that I sent to Dialogflow -
{
"messages":[
{
"speech":"Text response",
"type":0
}
]
}
Please tell me what should be the exact format of the reply that I should send to Dialogflow.
webhooks dialogflow
add a comment |
I built a bot using Dialogflow and connected it to a local webhook (now accessing it through ngrok). I am able to receive the response from Dialogflow but I am unable to replay to it. I followed the JSON structure as shown here - Test response from webhook. But I am getting the following error in Dialogflow.
Webhook call failed. Error: Failed to parse webhook JSON response:
Cannot find field: messages in message
google.cloud.dialogflow.v2.Intent.Message.
Following is the reply that I sent to Dialogflow -
{
"messages":[
{
"speech":"Text response",
"type":0
}
]
}
Please tell me what should be the exact format of the reply that I should send to Dialogflow.
webhooks dialogflow
I built a bot using Dialogflow and connected it to a local webhook (now accessing it through ngrok). I am able to receive the response from Dialogflow but I am unable to replay to it. I followed the JSON structure as shown here - Test response from webhook. But I am getting the following error in Dialogflow.
Webhook call failed. Error: Failed to parse webhook JSON response:
Cannot find field: messages in message
google.cloud.dialogflow.v2.Intent.Message.
Following is the reply that I sent to Dialogflow -
{
"messages":[
{
"speech":"Text response",
"type":0
}
]
}
Please tell me what should be the exact format of the reply that I should send to Dialogflow.
webhooks dialogflow
webhooks dialogflow
asked May 17 '18 at 11:47
SunilSunil
4512
4512
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
From v1 to v2, the response object almost change completely. For just simple text, you can use like:
{
"fulfillmentText": "Text response",
"fulfillmentMessages": [
{
"text": {
"text": ["Text response"]
}
}
],
"source": "<Text response>"
}
add a comment |
I faced same issue,resolved using below json on dialogflow :
I made a simple node program which accepts a post response and returns json of the format accepted by Dialogflow.You may send your request in any way you like. check on Fulfillment status tab :
add a comment |
Messages alone is not sufficient. Refer to Dialogflow V2 webhook fulfillment documentation for complete list of parameters expected and format of JSON.
Are you sure you are using V2 of the DialogFlow APIs?
Vinay P Thanks for responding. I am not using their SDK. I am receiving the POST request from Dialogflow in a flask app and parsing it. I am then sending a custom reply from flask app. I Used the link that you gave but still not working. Can you tell me how to use this - dialogflow.com/docs/reference/api-v2/rest/v2beta1/…
– Sunil
May 17 '18 at 12:50
This another link says that all the values are optional.
– Sunil
May 17 '18 at 12:53
@sunil I have done similar implementation using V1, it is not sufficient to send only the fields you have considered. And again the messages error would I guess appear only in V1, because V2 doesnt seem to have that field(I can be wrong with V2 as I havent worked on that). And I have not migrated to V2 as it is still not production ready.
– Vinay P
May 18 '18 at 5:24
Thank you @Vinay for sticking with me. I changed the agent from V2 to V1 and I changed the reply from webhook accordingly. But the question still remains - What is the exact format of reply from webhook that V2 can understand?
– Sunil
May 18 '18 at 6:45
I would not suggest anything in V2 as I haven't moved to that yet. In V1 displaytext is one field could be needed.
– Vinay P
May 18 '18 at 6:58
|
show 1 more comment
The field messages
was renamed/refactored to fulfillmentMessages
- "can not find" means that it is not a property in the definition.
This is some comparable result accepted by v2:
{
"fulfillmentText": "response text",
"fulfillmentMessages": [{"simpleResponses": {"simpleResponses": [ {
"textToSpeech": "response text",
"displayText": "response text"
}]}}]
}
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f50390670%2fwebhook-call-failed-error-failed-to-parse-webhook-json-response-cannot-find-f%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
From v1 to v2, the response object almost change completely. For just simple text, you can use like:
{
"fulfillmentText": "Text response",
"fulfillmentMessages": [
{
"text": {
"text": ["Text response"]
}
}
],
"source": "<Text response>"
}
add a comment |
From v1 to v2, the response object almost change completely. For just simple text, you can use like:
{
"fulfillmentText": "Text response",
"fulfillmentMessages": [
{
"text": {
"text": ["Text response"]
}
}
],
"source": "<Text response>"
}
add a comment |
From v1 to v2, the response object almost change completely. For just simple text, you can use like:
{
"fulfillmentText": "Text response",
"fulfillmentMessages": [
{
"text": {
"text": ["Text response"]
}
}
],
"source": "<Text response>"
}
From v1 to v2, the response object almost change completely. For just simple text, you can use like:
{
"fulfillmentText": "Text response",
"fulfillmentMessages": [
{
"text": {
"text": ["Text response"]
}
}
],
"source": "<Text response>"
}
answered Nov 24 '18 at 23:14
techyauratechyaura
2,14011220
2,14011220
add a comment |
add a comment |
I faced same issue,resolved using below json on dialogflow :
I made a simple node program which accepts a post response and returns json of the format accepted by Dialogflow.You may send your request in any way you like. check on Fulfillment status tab :
add a comment |
I faced same issue,resolved using below json on dialogflow :
I made a simple node program which accepts a post response and returns json of the format accepted by Dialogflow.You may send your request in any way you like. check on Fulfillment status tab :
add a comment |
I faced same issue,resolved using below json on dialogflow :
I made a simple node program which accepts a post response and returns json of the format accepted by Dialogflow.You may send your request in any way you like. check on Fulfillment status tab :
I faced same issue,resolved using below json on dialogflow :
I made a simple node program which accepts a post response and returns json of the format accepted by Dialogflow.You may send your request in any way you like. check on Fulfillment status tab :
edited Nov 30 '18 at 5:27
answered Nov 29 '18 at 19:12
Shashank BodkheShashank Bodkhe
948
948
add a comment |
add a comment |
Messages alone is not sufficient. Refer to Dialogflow V2 webhook fulfillment documentation for complete list of parameters expected and format of JSON.
Are you sure you are using V2 of the DialogFlow APIs?
Vinay P Thanks for responding. I am not using their SDK. I am receiving the POST request from Dialogflow in a flask app and parsing it. I am then sending a custom reply from flask app. I Used the link that you gave but still not working. Can you tell me how to use this - dialogflow.com/docs/reference/api-v2/rest/v2beta1/…
– Sunil
May 17 '18 at 12:50
This another link says that all the values are optional.
– Sunil
May 17 '18 at 12:53
@sunil I have done similar implementation using V1, it is not sufficient to send only the fields you have considered. And again the messages error would I guess appear only in V1, because V2 doesnt seem to have that field(I can be wrong with V2 as I havent worked on that). And I have not migrated to V2 as it is still not production ready.
– Vinay P
May 18 '18 at 5:24
Thank you @Vinay for sticking with me. I changed the agent from V2 to V1 and I changed the reply from webhook accordingly. But the question still remains - What is the exact format of reply from webhook that V2 can understand?
– Sunil
May 18 '18 at 6:45
I would not suggest anything in V2 as I haven't moved to that yet. In V1 displaytext is one field could be needed.
– Vinay P
May 18 '18 at 6:58
|
show 1 more comment
Messages alone is not sufficient. Refer to Dialogflow V2 webhook fulfillment documentation for complete list of parameters expected and format of JSON.
Are you sure you are using V2 of the DialogFlow APIs?
Vinay P Thanks for responding. I am not using their SDK. I am receiving the POST request from Dialogflow in a flask app and parsing it. I am then sending a custom reply from flask app. I Used the link that you gave but still not working. Can you tell me how to use this - dialogflow.com/docs/reference/api-v2/rest/v2beta1/…
– Sunil
May 17 '18 at 12:50
This another link says that all the values are optional.
– Sunil
May 17 '18 at 12:53
@sunil I have done similar implementation using V1, it is not sufficient to send only the fields you have considered. And again the messages error would I guess appear only in V1, because V2 doesnt seem to have that field(I can be wrong with V2 as I havent worked on that). And I have not migrated to V2 as it is still not production ready.
– Vinay P
May 18 '18 at 5:24
Thank you @Vinay for sticking with me. I changed the agent from V2 to V1 and I changed the reply from webhook accordingly. But the question still remains - What is the exact format of reply from webhook that V2 can understand?
– Sunil
May 18 '18 at 6:45
I would not suggest anything in V2 as I haven't moved to that yet. In V1 displaytext is one field could be needed.
– Vinay P
May 18 '18 at 6:58
|
show 1 more comment
Messages alone is not sufficient. Refer to Dialogflow V2 webhook fulfillment documentation for complete list of parameters expected and format of JSON.
Are you sure you are using V2 of the DialogFlow APIs?
Messages alone is not sufficient. Refer to Dialogflow V2 webhook fulfillment documentation for complete list of parameters expected and format of JSON.
Are you sure you are using V2 of the DialogFlow APIs?
answered May 17 '18 at 12:02
Vinay PVinay P
54513
54513
Vinay P Thanks for responding. I am not using their SDK. I am receiving the POST request from Dialogflow in a flask app and parsing it. I am then sending a custom reply from flask app. I Used the link that you gave but still not working. Can you tell me how to use this - dialogflow.com/docs/reference/api-v2/rest/v2beta1/…
– Sunil
May 17 '18 at 12:50
This another link says that all the values are optional.
– Sunil
May 17 '18 at 12:53
@sunil I have done similar implementation using V1, it is not sufficient to send only the fields you have considered. And again the messages error would I guess appear only in V1, because V2 doesnt seem to have that field(I can be wrong with V2 as I havent worked on that). And I have not migrated to V2 as it is still not production ready.
– Vinay P
May 18 '18 at 5:24
Thank you @Vinay for sticking with me. I changed the agent from V2 to V1 and I changed the reply from webhook accordingly. But the question still remains - What is the exact format of reply from webhook that V2 can understand?
– Sunil
May 18 '18 at 6:45
I would not suggest anything in V2 as I haven't moved to that yet. In V1 displaytext is one field could be needed.
– Vinay P
May 18 '18 at 6:58
|
show 1 more comment
Vinay P Thanks for responding. I am not using their SDK. I am receiving the POST request from Dialogflow in a flask app and parsing it. I am then sending a custom reply from flask app. I Used the link that you gave but still not working. Can you tell me how to use this - dialogflow.com/docs/reference/api-v2/rest/v2beta1/…
– Sunil
May 17 '18 at 12:50
This another link says that all the values are optional.
– Sunil
May 17 '18 at 12:53
@sunil I have done similar implementation using V1, it is not sufficient to send only the fields you have considered. And again the messages error would I guess appear only in V1, because V2 doesnt seem to have that field(I can be wrong with V2 as I havent worked on that). And I have not migrated to V2 as it is still not production ready.
– Vinay P
May 18 '18 at 5:24
Thank you @Vinay for sticking with me. I changed the agent from V2 to V1 and I changed the reply from webhook accordingly. But the question still remains - What is the exact format of reply from webhook that V2 can understand?
– Sunil
May 18 '18 at 6:45
I would not suggest anything in V2 as I haven't moved to that yet. In V1 displaytext is one field could be needed.
– Vinay P
May 18 '18 at 6:58
Vinay P Thanks for responding. I am not using their SDK. I am receiving the POST request from Dialogflow in a flask app and parsing it. I am then sending a custom reply from flask app. I Used the link that you gave but still not working. Can you tell me how to use this - dialogflow.com/docs/reference/api-v2/rest/v2beta1/…
– Sunil
May 17 '18 at 12:50
Vinay P Thanks for responding. I am not using their SDK. I am receiving the POST request from Dialogflow in a flask app and parsing it. I am then sending a custom reply from flask app. I Used the link that you gave but still not working. Can you tell me how to use this - dialogflow.com/docs/reference/api-v2/rest/v2beta1/…
– Sunil
May 17 '18 at 12:50
This another link says that all the values are optional.
– Sunil
May 17 '18 at 12:53
This another link says that all the values are optional.
– Sunil
May 17 '18 at 12:53
@sunil I have done similar implementation using V1, it is not sufficient to send only the fields you have considered. And again the messages error would I guess appear only in V1, because V2 doesnt seem to have that field(I can be wrong with V2 as I havent worked on that). And I have not migrated to V2 as it is still not production ready.
– Vinay P
May 18 '18 at 5:24
@sunil I have done similar implementation using V1, it is not sufficient to send only the fields you have considered. And again the messages error would I guess appear only in V1, because V2 doesnt seem to have that field(I can be wrong with V2 as I havent worked on that). And I have not migrated to V2 as it is still not production ready.
– Vinay P
May 18 '18 at 5:24
Thank you @Vinay for sticking with me. I changed the agent from V2 to V1 and I changed the reply from webhook accordingly. But the question still remains - What is the exact format of reply from webhook that V2 can understand?
– Sunil
May 18 '18 at 6:45
Thank you @Vinay for sticking with me. I changed the agent from V2 to V1 and I changed the reply from webhook accordingly. But the question still remains - What is the exact format of reply from webhook that V2 can understand?
– Sunil
May 18 '18 at 6:45
I would not suggest anything in V2 as I haven't moved to that yet. In V1 displaytext is one field could be needed.
– Vinay P
May 18 '18 at 6:58
I would not suggest anything in V2 as I haven't moved to that yet. In V1 displaytext is one field could be needed.
– Vinay P
May 18 '18 at 6:58
|
show 1 more comment
The field messages
was renamed/refactored to fulfillmentMessages
- "can not find" means that it is not a property in the definition.
This is some comparable result accepted by v2:
{
"fulfillmentText": "response text",
"fulfillmentMessages": [{"simpleResponses": {"simpleResponses": [ {
"textToSpeech": "response text",
"displayText": "response text"
}]}}]
}
add a comment |
The field messages
was renamed/refactored to fulfillmentMessages
- "can not find" means that it is not a property in the definition.
This is some comparable result accepted by v2:
{
"fulfillmentText": "response text",
"fulfillmentMessages": [{"simpleResponses": {"simpleResponses": [ {
"textToSpeech": "response text",
"displayText": "response text"
}]}}]
}
add a comment |
The field messages
was renamed/refactored to fulfillmentMessages
- "can not find" means that it is not a property in the definition.
This is some comparable result accepted by v2:
{
"fulfillmentText": "response text",
"fulfillmentMessages": [{"simpleResponses": {"simpleResponses": [ {
"textToSpeech": "response text",
"displayText": "response text"
}]}}]
}
The field messages
was renamed/refactored to fulfillmentMessages
- "can not find" means that it is not a property in the definition.
This is some comparable result accepted by v2:
{
"fulfillmentText": "response text",
"fulfillmentMessages": [{"simpleResponses": {"simpleResponses": [ {
"textToSpeech": "response text",
"displayText": "response text"
}]}}]
}
answered Aug 2 '18 at 15:15
Yahoo SeriousYahoo Serious
2,25712226
2,25712226
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f50390670%2fwebhook-call-failed-error-failed-to-parse-webhook-json-response-cannot-find-f%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown