Thank you for this tutorial. It was really helpful. I was doing everything correctly just missing the /webhook thing in the fulfillment. Keep the good work up! :)
Very nice tutorial. Can u give a little tip about update a database with user input and get some results regards this inputs, using user slack api.ai webrook (heroku) any tables (like Airtable or mongoDb or anything)...using python ou node.js
Hi Naresh, you have great tutorial. do you know how is it possible to connect Robot Pepper with Dialogflow Chatbot? It would be great if you have something in this case.
Naresh, this is such as great video for beginner like me. However, I am using dialogflow and received the message as -"Application error" when I tried to deploy to heroku. do you know why? many thanks!
Does your webhook hosted on heroku work with a test / hello message ? And is this the video the one that uses yahoo weather api.. (don’t recollect ) .. yahoo api does not work anymore
I was replying earlier from my phone so was not sure which this video was. as in my comment above yahoo weather api does not work anymore and so here is a video and ruclips.net/video/PiowIaYk1cE/видео.html and github code that will help github.com/nareshganatra/dialogflow-webhook-python
In that code, it checks whether the action name is "YahooWeatherForcast" and then continues the execution. How can I impliment an elif function to define multiple action name and execute one of them depending on the request?
Awesome video sir with detailed knowledge on each topic. Sir am facing a problem while creating this, I checked geo-city as required field but still also while typing User says : weather in Response : what was that ?(default response). may in know about the issue or things due to which am getting this reponse. Action name typed my me is correct and i have checked Use Webhook also.
Hi Naresh.. Thanks for the great tutorial. I have been following you from the last month.. your videos are very useful for beginners like me.. I had one question related to the api ai.. How to get the exact resolved value for a particular parameter name? For example, I want to get the exact value like “Kani-honke” for my parameter restaurant name in the JSON format.Every time user will use the different restaurant name. Restaurant name: Kani-honke (Asahikawa) Reservation name: Dominic Number of visitors: 2 adults Date/time: 15 July (sat) lunch 12noon OR 14 July (Friday) dinner 7.30pm
glad that it helped ! Do you have names of all restaurants ? If yes just create an entity with all the names (you can up load a csv or json with all names ), the tricky part is the special characters, when you have something additional in brackets then you might have to remove brackets.. when you process in the webhook
Thanks Naresh for your reply. I just want to get the data in JSON format. Is it possible to get the Restaurant name even if it is not loaded in the agent?? can it detect the name and show it in the JSON format? I was thinking if it recognizes the pattern that whatever in front of Restaurant name/Reservation Name/Number of visitors, it will extract it automatically .(even if it not present in the agent) Is it possible? Thank you.
Thank you so much Naresh. Do you have any sample code for an asp.net web api using the Google dialogflow library? I am currently working on one, however the fullfilment text returned by the API is not taken by dialogflow. However the API method is being called and all the required actions are being done.
Hey Sree I am afraid I don’t have asp.net code but in your do you think it might be an issue as ur agent is v2 and your fulfillment webhook is for v1 ? In case that’s the issue then I have v2 webhook code on the GitHub url mentioned in the description. Either change the code or the version of the bot .
Hey , good Work I've already created chatbot with Api but I have a problem yet. How can I integrate my bit into my hybrid web app (Ionic). I've already found with Native App such as Android and Ios swift, how to integrate (a par documentation etc...) My Hybrid Application with Ionic Framworks and Mobile Hub AWS already done.
interesting observation..seems like that is an issue with the yahoo weather api that is being used in the wbehook... it does not return the weather for the city/country you mentioned.
If Api.ai want to be as populate as Google drive or docs/spreadsheet...etc. Then, Api.ai and all others Bots platform should make more efforts to let non-tech person use the API or Webhook easily and friendly interface to boost the Bot markets.
Hi! I love this tutorial but I've a question regarding about the webhook. As I am using AWS (Not Heroku), do you have any idea on how api.ai can return the correct response from the right column in AWS? without using built-in entities (eg @sys.date, @sys.location) in api.ai ?
I too do not use heroku, I use Google app engine or compute engine. Please see if this helps you github.com/nareshganatra/dialogflow-yahoo-weather/blob/master/app.py . Though I am not sure I understand what you mean by "right column" in AWS "without using built in entities"
thanks a lot please guide me same with using jquery(javascript) instead of python. please also do a video on integration using java or HTML or javascript
Thanks for this tut. Could you update the tutorial to use latest dialogflow inline editor for Firebase functions? This feature simplifies setting up the webhook. I have tried migrating your python sample but not succeeding. Please help and thanks
Hi Naresh ( I have a problem in my chatbot. ) When user enters his 6 digit ID number the bot has to match the user ID with his first name with the data in the SQL server and prompt the first name of the user. Kindly help me with this step. Regards Girish
Have you checked the GET method from the browser to see if it works ? And is the error u r getting same as what is mentioned here Dialogflow webhook call failed error ruclips.net/video/E6DPJHR_kP4/видео.html along with resolution ?
I cannot do that. The URL is [messagebotai.herokuapp.com/webhook] ? I use china for sample. Yet it cannot work Moreover, what contexts I need to enter?
Urgent help -----------i am getting the default response FULFILLMENT STATUS Webhook call failed. Error: 500 INTERNAL SERVER ERROR (after pasting the link of Heroku in fulfillment )
hey! it did not work and its json script says,""status": { "code": 206, "errorType": "partial_content", "errorDetails": "Webhook call failed. Error: Request timeout.", "webhookTimedOut": true"
if you are ok runing the webhook locally on your machine then that is another option to try out. You would need Python (I use Anaconda for Python) , PyCharm Community version (for Python development ) and ngrok (for my service to be available on the web). Here is the code I use. Video on this coming up in a few days. github.com/nareshganatra/dialogflow-yahoo-weather
I followed it like this video. However, I received "Webhook call failed. Error: 500 INTERNAL SERVER ERROR" as webhook status error message. Please let me know what the problem is. thank you
also if u would like to do this locally on your machine (I mean have the webhook locally on your machine instead of heroku) , you should check this out ruclips.net/video/qd-3D2USCw0/видео.html . you will need to have python on your machine (its a quick install)
+OdinGames at a high level you would have multiple intents and the webhook would call the corresponding service for fulfillment depending on the intent / action
and yes maybe it really is the service not available when you tried ? where are you runing it ? Heroku ? Have you tried a basic hello "GET" method ? hth
Naresh Ganatra, thanks for your reply, i tried only weather API. I will try hello GET also. One more question, about an year back it was api.ai now it is dialogflow. Do you have any idea like it will still work if I integrate it with my web.
Thanks Naresh, i tried only weather API, i will try hello GET also. One more question, about an year back it was api.ai now it is dialogflow. Do you have any ideal like it will work if i integrate this with our web.
this works perfectly thank you. But it works a few times, then when I try to use the Google Assistant simulator it "breaks" and no longer works. any ideas why?
I remember something similar vaguely though forgot what exactly the issue was... when you say it breaks is it going to the fallback intent ? and if it is going to fall back is it working fine if you were to try out in web demo ? ruclips.net/video/qd-3D2USCw0/видео.htmlm52s
Hello Naresh and thanks for the reply! I connected it to Heroku. It works perfectly in both the Web Demo and the right side window. No problems in outputting the custom weather requests. But then when I use the simulator, "see how it works in Google Assistant" it only gives me default responses. It no longer makes calls to Yahoo anymore. I then switched to web demo and it works again. I try the test on my iPhone and it only gives me default responses. No custom weather. Any ideas? Thanks in advance. Your demos are terrific.
Can you try adding a static_reply end point to your webhook ? say like the one here ruclips.net/video/qd-3D2USCw0/видео.htmlm14s and then see if u are able to get a reply from the webhook and then start debuging from there ? I had at one point got issues where the reply from the webhook was null or had some special characters (some weird ascii character which made it crash)
You would have to do that in the webhook .. Somewhere in the module makeYqlQuery(). Maybe weather.forecast table has the temp in Celsius and if not then you would have to convert it.
you might want to look at Events in Dialogflow dialogflow.com/docs/events. the WELCOME intent is an example, more information at the link above. Do let me know if you were able to get to what you wanted and an example of the usage
I followed the steps very accurately but the things are not just working. Please help. This only shows the response typed by me. Not the weather from yahoo weather forecast. Please help Thanks in advance and happy new year
+Raghav Kundra 1. Have u check marked the webhook use option ? 2. Is the webhook working if u were to try directly from the browser ? 3. Have u entered the webhook url where required in DialogFlow ? Happy New Year to you too !
did it finally work for you ? if not see a video where you could do it locally on you machine without using Heroku ruclips.net/video/qd-3D2USCw0/видео.html
+qwe rty u would have to write your own webhook calling which ever database you want to call .. which database r u looking to connect to ... would have to write a bit of code and python is something I personally prefer but u could write in any lang of ur choice . All the best
I did it and I feel so good now. Thank you so much for such a wonderful tutorial. It sure makes me want to study api.ai more
A '5 star' tutorial. Thank you Naresh
Thank you for your kind words ! Please do not forget to live the same and share it in your professional network to help me reach more folks !
The tutorial explain each concept in detail. Really helpful.
Request you to create a tutorial for the Big Query example you showed.
+Mitali B glad that u liked it, I do have that on my todo list .. hopefully someday soon -:)
Thank you for this tutorial. It was really helpful. I was doing everything correctly just missing the /webhook thing in the fulfillment. Keep the good work up! :)
cool ! also, do not forget to check how to run the webhook locally if you like to ruclips.net/video/qd-3D2USCw0/видео.html
Naresh bhai, nice tutorials.
Thanks Limesh !
Thank you. Very helpful. The code behind the bigquery webhook will be great.
Your Tutorials help me learn a lot! Thank you. :D
Very nice tutorial. Can u give a little tip about update a database with user input and get some results regards this inputs, using user slack api.ai webrook (heroku) any tables (like Airtable or mongoDb or anything)...using python ou node.js
Nice one Naresh.
Hi Naresh,
you have great tutorial.
do you know how is it possible to connect Robot Pepper with Dialogflow Chatbot?
It would be great if you have something in this case.
I ain't .. anything helpful here ? stackoverflow.com/questions/50599986/deploy-dialogflow-chatbot-on-pepper
it is showing.. "webhook call failed. error 503 service unavailable" how can i fix this?
yes ... i am getting the same error....did you find anything?
Nice tutorial Naresh. How can I call an external api where the api only gives api keys, not the url?
Hey selva
Naresh, this is such as great video for beginner like me. However, I am using dialogflow and received the message as -"Application error" when I tried to deploy to heroku. do you know why? many thanks!
Does your webhook hosted on heroku work with a test / hello message ? And is this the video the one that uses yahoo weather api.. (don’t recollect ) .. yahoo api does not work anymore
I was replying earlier from my phone so was not sure which this video was. as in my comment above yahoo weather api does not work anymore and so here is a video and ruclips.net/video/PiowIaYk1cE/видео.html and github code that will help
github.com/nareshganatra/dialogflow-webhook-python
In that code, it checks whether the action name is "YahooWeatherForcast" and then continues the execution. How can I impliment an elif function to define multiple action name and execute one of them depending on the request?
Great video , thanks for posting .
glad it helped !
its very useful as a biginner :) thanks for sharing
Awesome video sir with detailed knowledge on each topic.
Sir am facing a problem while creating this, I checked geo-city as required field but still also while typing
User says : weather in
Response : what was that ?(default response).
may in know about the issue or things due to which am getting this reponse.
Action name typed my me is correct and i have checked Use Webhook also.
+Preetish Priyadarshi Samal have u already tried out some basic debugging ? Say some print statements inside the webhook ?
thankyou Naresh
Hi Naresh.. Thanks for the great tutorial. I have been following you from the last month.. your videos are very useful for beginners like me.. I had one question related to the api ai..
How to get the exact resolved value for a particular parameter name?
For example, I want to get the exact value like “Kani-honke” for my parameter restaurant name in the JSON format.Every time user will use the different restaurant name.
Restaurant name: Kani-honke (Asahikawa)
Reservation name: Dominic
Number of visitors: 2 adults Date/time: 15 July (sat) lunch 12noon OR 14 July (Friday) dinner 7.30pm
glad that it helped ! Do you have names of all restaurants ? If yes just create an entity with all the names (you can up load a csv or json with all names ), the tricky part is the special characters, when you have something additional in brackets then you might have to remove brackets.. when you process in the webhook
Thanks Naresh for your reply. I just want to get the data in JSON format. Is it possible to get the Restaurant name even if it is not loaded in the agent?? can it detect the name and show it in the JSON format? I was thinking if it recognizes the pattern that whatever in front of Restaurant name/Reservation Name/Number of visitors, it will extract it automatically .(even if it not present in the agent) Is it possible?
Thank you.
Thank you so much Naresh. Do you have any sample code for an asp.net web api using the Google dialogflow library? I am currently working on one, however the fullfilment text returned by the API is not taken by dialogflow. However the API method is being called and all the required actions are being done.
Hey Sree I am afraid I don’t have asp.net code but in your do you think it might be an issue as ur agent is v2 and your fulfillment webhook is for v1 ? In case that’s the issue then I have v2 webhook code on the GitHub url mentioned in the description. Either change the code or the version of the bot .
Thank you so much Naresh. Let me try changing the version. I shall get back to you soon.
sure and here is a video with changing the version just in case u need to check the error too ruclips.net/video/E6DPJHR_kP4/видео.html
Hey , good Work
I've already created chatbot with Api but I have a problem yet. How can I integrate my bit into my hybrid web app (Ionic). I've already found with Native App such as Android and Ios swift, how to integrate (a par documentation etc...)
My Hybrid Application with Ionic Framworks and Mobile Hub AWS already done.
thank you so much! one question, why this doesn't work for some places such as Singapore and Hong Kong?
interesting observation..seems like that is an issue with the yahoo weather api that is being used in the wbehook... it does not return the weather for the city/country you mentioned.
Thanks! Anyway, nice tutorial ^_^
+Zhen Zhang Thank You and glad you liked it ! 🙏
If Api.ai want to be as populate as Google drive or docs/spreadsheet...etc. Then, Api.ai and all others Bots platform should make more efforts to let non-tech person use the API or Webhook easily and friendly interface to boost the Bot markets.
Hi! I love this tutorial but I've a question regarding about the webhook. As I am using AWS (Not Heroku), do you have any idea on how api.ai can return the correct response from the right column in AWS? without using built-in entities (eg @sys.date, @sys.location) in api.ai ?
I too do not use heroku, I use Google app engine or compute engine. Please see if this helps you github.com/nareshganatra/dialogflow-yahoo-weather/blob/master/app.py . Though I am not sure I understand what you mean by "right column" in AWS "without using built in entities"
Hi Naresh, great tutorial! May I ask how can I send my message from API.AI to BigQuery?
can you check my other video ruclips.net/video/O5TFAvQrkeM/видео.html the description of that video has a github url which might help u get started.
Do you convert the input of user "how many ..." to an SQL query " Select count() ...." or can you query in BigQuery using a normal question/sentence?
yes please would need to convert that into a sql -:) Big Query would not get it directly.
Nice Tutorial... :)
How can I integrate my chatbot to a database??
Thanks
@Naresh Brother I am waiting for your reply...
Thanks for the tuts!
Welcome Sire !
Celsius?
Can you also tell how to write that github code for this example?
thanks a lot
please guide me same with using jquery(javascript) instead of python.
please also do a video on integration using java or HTML or javascript
Thanks for this tut. Could you update the tutorial to use latest dialogflow inline editor for Firebase functions? This feature simplifies setting up the webhook. I have tried migrating your python sample but not succeeding. Please help and thanks
Thanks for the comment . I will plan to do so
Hi Naresh ( I have a problem in my chatbot. )
When user enters his 6 digit ID number the bot has to match the user ID with his first name with the data in the SQL server and prompt the first name of the user. Kindly help me with this step.
Regards
Girish
I'm getting an application error in Heroku when I click on Open App. It shows that it was deployed but it's not working.
Please do you know how to pass voice queries from java/maven to my agent? I want clear steps please
wow really thanks its work,thanks a lot
glad it helped !
Nice tutorial but the heroku button on github seems broken.It says no app.json located.kindly look into this
I just tried it out and looks fine , github.com/api-ai/apiai-weather-webhook-sample
Thanks...its working fine now..Is there any way i can contact you..Im doing a project and would be really glad if you could help me out.
great tutorial sir!! I just wanted to know if i want to create a chatbot landing page like landbot.io how can i do so?
when i'm calling my external api i'm getting 503 error code Sir Please help me with this.. and fulfillment status is Webhook execution successful..
Have you checked the GET method from the browser to see if it works ? And is the error u r getting same as what is mentioned here Dialogflow webhook call failed error ruclips.net/video/E6DPJHR_kP4/видео.html along with resolution ?
I cannot do that. The URL is [messagebotai.herokuapp.com/webhook] ?
I use china for sample. Yet it cannot work
Moreover, what contexts I need to enter?
nice tutorial ..! very helpful for beginners. Please help ebook of api.ai if possible
Sir , it did the same as mentioned in the tutorial, I got the URL and added it to the fulfillment section, still,not getting results.Kindly help!!
Please check if it’s a version issue ruclips.net/video/E6DPJHR_kP4/видео.html
how do i add buttons like a yes or no button
Can I make this in a other language?
nice tutorial !! could you please make one for fetching data from sql ?
glad u liked it Saif ! will try and do one in the near future
Dude! loved it. Thank you so much. You are a great teacher.
please, i have the same problem, have you did it please?
when u say sql do you mean SQL server ? or is there another particular database you have in mind ?
when u say sql do you mean SQL server ? or is there another particular database you have in mind ?
I am also facing same issue what Mr. Green reaper facing..
Sir how to download documents
Folder for any app please help me
Urgent help -----------i am getting the default response FULFILLMENT STATUS
Webhook call failed. Error: 500 INTERNAL SERVER ERROR (after pasting the link of Heroku in fulfillment )
Yahoo api does not work anymore . Try the stock api code on my github
can you please send me the link?
hey Nitin ! assuming you got it by now but here is the link if it helps ruclips.net/video/PiowIaYk1cE/видео.html
sir, do you have video tutorial for getting user location from fb messenger using custom payload or your own way. if no, please make one.
hey!
it did not work and its json script says,""status": {
"code": 206,
"errorType": "partial_content",
"errorDetails": "Webhook call failed. Error: Request timeout.",
"webhookTimedOut": true"
if you are ok runing the webhook locally on your machine then that is another option to try out. You would need Python (I use Anaconda for Python) , PyCharm Community version (for Python development ) and ngrok (for my service to be available on the web). Here is the code I use. Video on this coming up in a few days. github.com/nareshganatra/dialogflow-yahoo-weather
please see the video I was talking of ruclips.net/video/qd-3D2USCw0/видео.html
How did you connected Bigquery public data to Dialogflow?
+Ankit Singh this might help ruclips.net/video/O5TFAvQrkeM/видео.html
I followed it like this video. However, I received "Webhook call failed. Error: 500 INTERNAL SERVER ERROR" as webhook status error message. Please let me know what the problem is. thank you
have you tried calling the webhook directly ? as mentioned at around 9:56 in the video ?
also if u would like to do this locally on your machine (I mean have the webhook locally on your machine instead of heroku) , you should check this out ruclips.net/video/qd-3D2USCw0/видео.html . you will need to have python on your machine (its a quick install)
How can I create a single bot with translation, news, weather, currency, map and other?
+OdinGames at a high level you would have multiple intents and the webhook would call the corresponding service for fulfillment depending on the intent / action
Hey! thank u for this tutorial, the agent recognizes yahooWeatherForecact action but no response! idk why!
Make sure your Dialogflow version is 1.0 if you are using the webhook from this video . Yet to post the new one
It worked thank u, it was a different webhook,
How/Where do I change the weather temperature to metric? Is that within Heroku or API.AI?
that would have to be done in your code, in this particular example on heroku (or wherever your code and webhook is hosted)
would this be in app.py? sorry, i'm very new to this.
yes that would be where you change it
Hi Naresh, i am getting response from webhook it seems it is unavailable
Webhook call failed. Error: 503 Service Unavailable
Hey Manish ! Have you checked if it could be one of the issues mentioned here in the vide at ruclips.net/video/E6DPJHR_kP4/видео.html
and yes maybe it really is the service not available when you tried ? where are you runing it ? Heroku ? Have you tried a basic hello "GET" method ? hth
Naresh Ganatra, thanks for your reply, i tried only weather API. I will try hello GET also. One more question, about an year back it was api.ai now it is dialogflow. Do you have any idea like it will still work if I integrate it with my web.
Thanks Naresh, i tried only weather API, i will try hello GET also. One more question, about an year back it was api.ai now it is dialogflow. Do you have any ideal like it will work if i integrate this with our web.
Google bought API.AI and renamed it dialogflow. and yes it should work.
this works perfectly thank you. But it works a few times, then when I try to use the Google Assistant simulator it "breaks" and no longer works. any ideas why?
I remember something similar vaguely though forgot what exactly the issue was... when you say it breaks is it going to the fallback intent ? and if it is going to fall back is it working fine if you were to try out in web demo ? ruclips.net/video/qd-3D2USCw0/видео.htmlm52s
Hello Naresh and thanks for the reply! I connected it to Heroku. It works perfectly in both the Web Demo and the right side window. No problems in outputting the custom weather requests. But then when I use the simulator, "see how it works in Google Assistant" it only gives me default responses. It no longer makes calls to Yahoo anymore. I then switched to web demo and it works again. I try the test on my iPhone and it only gives me default responses. No custom weather. Any ideas? Thanks in advance. Your demos are terrific.
Also I just connected Twilio and same result: only get default responses.
Can you try adding a static_reply end point to your webhook ? say like the one here ruclips.net/video/qd-3D2USCw0/видео.htmlm14s
and then see if u are able to get a reply from the webhook and then start debuging from there ? I had at one point got issues where the reply from the webhook was null or had some special characters (some weird ascii character which made it crash)
also try this in your code
change
data = json.loads(result)
to
data = json.loads(result.decode('utf-8'))
I want the temperature in Celsius, not Fahrenheit....
How to change that?
You would have to do that in the webhook .. Somewhere in the module makeYqlQuery(). Maybe weather.forecast table has the temp in Celsius and if not then you would have to convert it.
But how to convert that?
I'm pretty new....
I have not enough knowledge about coding...
how did you add a second webhook for the same agent?
I did not, I used the same webhook to handle both scenarios .
how a bot initiates the conversation is it possible using api.ai?
you might want to look at Events in Dialogflow dialogflow.com/docs/events. the WELCOME intent is an example, more information at the link above. Do let me know if you were able to get to what you wanted and an example of the usage
Is is possible to make a Trivia/Quiz game bot with API AI ?
+Hristo Djivtorov yes why not -:)
+Hristo Djivtorov and all the best if u plan to try one out
18.54 how did we do this ?
Guess u mean how the context was saved ? I saved the entity value in the bot context
@@NareshGanatra nope, actually wanted to know how you connected database and big query results (like 530 count)
Please check description in the video at ruclips.net/video/O5TFAvQrkeM/видео.html , and that might help !
I followed the steps very accurately but the things are not just working. Please help. This only shows the response typed by me. Not the weather from yahoo weather forecast. Please help
Thanks in advance and happy new year
+Raghav Kundra 1. Have u check marked the webhook use option ? 2. Is the webhook working if u were to try directly from the browser ? 3. Have u entered the webhook url where required in DialogFlow ?
Happy New Year to you too !
Naresh Ganatra I did everything buddy. But still it is not working.....
+Raghav Kundra tried ur luck re-creating the Agent ? That does sound strange that it’s not working .
did it finally work for you ? if not see a video where you could do it locally on you machine without using Heroku ruclips.net/video/qd-3D2USCw0/видео.html
@Naresh Brother I am waiting for your reply...
+qwe rty u would have to write your own webhook calling which ever database you want to call .. which database r u looking to connect to ... would have to write a bit of code and python is something I personally prefer but u could write in any lang of ur choice . All the best
These apis have limited potential.
+Amit Agarwal would u elaborate ? Would like to hear your view point . thanks !
ipiyay dot iyay
it is showing.. "webhook call failed. error 503 service unavailable" how can i fix this?
Sir how can download documents
Folder please help me