GoogleCloudPlatform / dialogflow-integrations

Dialogflow integrations with multiple platforms including KIK, Skype, Spark, Twlio, Twitter and Viber
https://cloud.google.com/dialogflow/
Apache License 2.0
247 stars 500 forks source link

Integration with Twilio+Whatsapp successful but response from webhook not reaching WhatsApp #36

Open sajidhusain opened 4 years ago

sajidhusain commented 4 years ago

I've completed the integration with Twilio (for WhatsApp) as per the instructions and I'm able to get responses from my dialogflow agent for any intent that does not have webhook fulfillment (in my case it's a node.js app).

Any intent that has a webhook fulfillment, it sends only the default text response from the agent, even though the node.js webhook is receiving the request and sends a successful response, I'm getting only the default response from agent in WhatsApp through Twilio.

Can someone help on this?

ebideveloper commented 4 years ago

I have the same problem. I'm getting only the default response from agent in WhatsApp through Twilio.

I'm seeing that the webhook crashes on every call, but I think that is not a problem of the webhook code because it works fine using the deprecated integration.

@sajidhusain did you solve the problem?

Any help will be appreciated!

effysetumeni87 commented 3 years ago

seems like this is a common problem im getting this error Twilio was unable to fetch content from: http://dialogflow-twilio-xxjllncnoa-ez.a.run.app/ Error: Total timeout is triggered. Configured tt is 15000ms and we attempted 1 time(s Request ID: 79a9d9c4-78d5-4cd2-90d3-1a43d68a615d Remote Host: dialogflow-twilio-xxjllncnoa-ez.a.run.app Request Method: POST Request URI: http://dialogflow-twilio-xxjllncnoa-ez.a.run.app/ URL Fragment: true

aaronliruns commented 3 years ago

seems like this is a common problem im getting this error Twilio was unable to fetch content from: http://dialogflow-twilio-xxjllncnoa-ez.a.run.app/ Error: Total timeout is triggered. Configured tt is 15000ms and we attempted 1 time(s Request ID: 79a9d9c4-78d5-4cd2-90d3-1a43d68a615d Remote Host: dialogflow-twilio-xxjllncnoa-ez.a.run.app Request Method: POST Request URI: http://dialogflow-twilio-xxjllncnoa-ez.a.run.app/ URL Fragment: true

I am getting exactly same error message as above. Does anyone get any idea on how to fix it?

effysetumeni87 commented 3 years ago

Solved this issue , in my case it was an issue with IAM and service account permissions in google cloud platform make sure the service account is set to dialogflow api admin

Jethro-magaji commented 3 years ago

Have anyone solved this issue? if you have please share with us the solution. Thanks.

Namyalg commented 3 years ago

I am facing the same issue, I have set up everything as stated in the repository, yet Twilio doesn't return a response

Jethro-magaji commented 3 years ago

I just solved this issue using this video on YouTube. However, if you need any further explanation you can contact me using my Github profile

harshith8854 commented 3 years ago

i followed this link and it worked

deepukr007 commented 3 years ago

I was getting the same problem , tried different methods including changing role from Dialogflow Client to Dialogflow Admin nothing worked. After deploying many times and following the above video I found the small mistake which I was doing

The probable mistake everyone will do is that while passing YOUR_KEY_FILE in the below command you will just pass the file name but you have to pass the file name with .json extension.

gcloud beta run deploy --image gcr.io/PROJECT-ID/dialogflow-PLATFORM --update-env-vars GOOGLE_APPLICATION_CREDENTIALS=YOUR_KEY_FILE --memory 1Gi

So the solution is if your key file name is project_id_cxxy pass project_id_cxxy.json

vml-ds commented 3 years ago

Hello everybody! I tried the different solutions that you mention, but without any results. In the end, I realized that the actions-on-google library that I was using in the webhook (nodejs) was not the correct one. By changing the library I was able to solve this problem. Hope this helps you!

RobMartello commented 1 year ago

I was getting the same problem , tried different methods including changing role from Dialogflow Client to Dialogflow Admin nothing worked. After deploying many times and following the above video I found the small mistake which I was doing

The probable mistake everyone will do is that while passing YOUR_KEY_FILE in the below command you will just pass the file name but you have to pass the file name with .json extension.

gcloud beta run deploy --image gcr.io/PROJECT-ID/dialogflow-PLATFORM --update-env-vars GOOGLE_APPLICATION_CREDENTIALS=YOUR_KEY_FILE --memory 1Gi

So the solution is if your key file name is project_id_cxxy pass project_id_cxxy.json

Thank you. I had the same problem, and with your help it's running now!

tayyabjsr13 commented 1 year ago

Solved this issue , in my case it was an issue with IAM and service account permissions in google cloud platform make sure the service account is set to dialogflow api admin

This solution also worked for me. Thanks!

Stephe262 commented 1 year ago

I was having this same issue for a while and figured out that there is a specific setting that needs to be changed within the Twilio Platform!

Navigate to Messaging Services (https://www.twilio.com/console/sms), click Integration in the sidebar and then select "Defer to Senders Webhook" Screen Shot 2023-02-02 at 2 14 45 PM Screen Shot 2023-02-02 at 2 15 54 PM

I hope this helps someone else! I was just about to give up on this....