AWS Lambda Response throwing error in dialogflow when using v2
See original GitHub issueI am returning what looks like the correct response from the AWS lambda to dialogflow but its throwing an error in dialogflow. The FULFILLMENT RESPONSE tab shows the following
"statusCode": 200,
"body": {
"payload": {
"google": {
"expectUserResponse": true,
"richResponse": {
"items": [
{
"simpleResponse": {
"textToSpeech": "AWS LAMBDA says hi"
}
}
]
},
"userStorage": "{\"data\":{}}"
}
},
"outputContexts": [
{
"name": "projects/<someid>/agent/sessions/<someId>/contexts/_actions_on_google",
"lifespanCount": 99,
"parameters": {
"data": "{}"
}
}
]
}
}
but it shows an error in the FULFILLMENT STATUS tab
Webhook call failed. Error: Failed to parse webhook JSON response: Cannot find field: statusCode in message google.cloud.dialogflow.v2.WebhookResponse.
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (1 by maintainers)
Top Results From Across the Web
Webhook error on getting response from dialogflow web hook ...
The expected behaviour is to get the response in the AoG simulator but I'm getting error instead. Any help would be much appreciated....
Read more >Handle Lambda errors in API Gateway - AWS Documentation
If there is no match, API Gateway returns the error as a default response or throws an invalid configuration exception if no default...
Read more >Workflow Monitoring -Dialog Flow and AWS Lambda
In this tutorial, we going to connect Google Assistant to Amazon AWS through Dialog Flow. The goal is to make a program that...
Read more >Third-Party Bots — Bot Conversation Errors
This error is thrown if the response of the AI Vendor does not contain any messages and the provided actions are not supported...
Read more >Dialogflow | Programmatic Ponderings
Using the Training tab in the Dialogflow console, we can train our model by ... Google Cloud Functions are analogous to Amazon's AWS...
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 FreeTop 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
Top GitHub Comments
I got it working:
The fulfillmentText callbacks are my error logs here
Just so you know, since I’m using SimpleResponse, the dialogflow test window doesn’t display anything when it runs succesfully. You can either go into the Diagnostic Info to take a look, or open up the simulator and it should be working. Good Luck!
@hoklai1997 if you use my code above it almost works…as in runs the code but does not return correctly. I did have to add the following body mapping template in the Integration Request of the API gateway. The response seems to be sent back except dialogflow does not recognize it and throws the statusCode error. Just doing something wrong and as much as I like hacking this thing the documentation for lambda is not very good (yet).
Request Body Passthrough: When there are no templates defined (recommended) Content-Type: application/json and when you click on the application/json I have the following template