{"id":2360,"date":"2018-08-03T02:42:53","date_gmt":"2018-08-03T02:42:53","guid":{"rendered":"http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/?p=2360"},"modified":"2019-11-12T00:19:16","modified_gmt":"2019-11-12T00:19:16","slug":"building-chat-bot-apps-with-google-actions","status":"publish","type":"post","link":"http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/building-chat-bot-apps-with-google-actions\/","title":{"rendered":"Building Chat Bot Apps with Google Actions"},"content":{"rendered":"\n<!-- Facebook Like Button v1.9.6 BEGIN [http:\/\/blog.bottomlessinc.com] -->\n<iframe src=\"http:\/\/www.facebook.com\/plugins\/like.php?href=http%3A%2F%2Finspiredtoeducate.net%2Finspiredtoeducate%2Fbuilding-chat-bot-apps-with-google-actions%2F&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=light\" scrolling=\"no\" frameborder=\"0\" allowTransparency=\"true\" style=\"border:none; overflow:hidden; width:450px; height: 30px; align: left; margin: 2px 0px 2px 0px\"><\/iframe>\n<!-- Facebook Like Button END -->\n<p><a href=\"http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-content\/uploads\/2018\/08\/r2d2.png\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-2365\" src=\"http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-content\/uploads\/2018\/08\/r2d2.png\" alt=\"r2d2\" width=\"430\" height=\"367\" srcset=\"http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-content\/uploads\/2018\/08\/r2d2.png 430w, http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-content\/uploads\/2018\/08\/r2d2-300x256.png 300w\" sizes=\"(max-width: 430px) 100vw, 430px\" \/><\/a><\/p>\n<p>In science fiction, we have dreamed about the days when we\u2019ll talk to our computers to make things happen. In Star Trek, crew members can talk to the Holodeck computer to \u201cprogram\u201d and explore amazing virtual experiences. Tony Stark(aka. Ironman) constantly gets situation awareness from Jarvis during battle by simply talking to his device. We\u2019re still a long way away from Holodecks, R2D2, and Ironman. As developers and makers, we can explore the potential of voice interactions with mobile devices today.<\/p>\n<p>The Google Actions toolkit enables you to integrate your services into the voice command interface of a Google assistant. This technology touches millions of devices including phones, cars, and assistant devices. You can also integrate into services provided by Google or third party services.<\/p>\n<p>This past weekend, our local <a href=\"http:\/\/gdgcentralflorida.org\/\">Google developer group of Central Florida<\/a> organized a hackathon to explore applications of voice user interfaces and Google Actions. We enjoy getting to organize community workshops like this. Love seeing our community come together. It\u2019s always a great opportunity to learn, meet people, and generate new ideas.<\/p>\n<p><a href=\"http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-content\/uploads\/2018\/08\/hackathon1.jpg\"><img loading=\"lazy\" class=\"alignnone size-large wp-image-2364\" src=\"http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-content\/uploads\/2018\/08\/hackathon1-1024x768.jpg\" alt=\"Google Actions Hackathon\" width=\"608\" height=\"456\" srcset=\"http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-content\/uploads\/2018\/08\/hackathon1-1024x768.jpg 1024w, http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-content\/uploads\/2018\/08\/hackathon1-300x225.jpg 300w, http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-content\/uploads\/2018\/08\/hackathon1-768x576.jpg 768w, http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-content\/uploads\/2018\/08\/hackathon1.jpg 2048w\" sizes=\"(max-width: 608px) 100vw, 608px\" \/><\/a><\/p>\n<p>In general, Google actions work well in three major use cases. Users on the go. People starting their day. People relaxing at the end of the day.&nbsp; &nbsp;For my Google Actions app, I tried to think of an application of Google Actions that would support our leadership team for our GDG. We recently adopted a Trello board to help us organize tasks for our club. If you&#8217;re not familiar with Trello, it&#8217;s simple a task management system popular with Agile teams. ( see a screenshot below )&nbsp; As a busy Dad and professional, I typically think of stuff that needs to be accomplished for the GDG while I&#8217;m driving.<\/p>\n<p><a href=\"http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-content\/uploads\/2018\/08\/trello_board.png\"><img loading=\"lazy\" class=\"alignnone size-large wp-image-2361\" src=\"http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-content\/uploads\/2018\/08\/trello_board-1024x451.png\" alt=\"Trello board\" width=\"608\" height=\"268\" srcset=\"http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-content\/uploads\/2018\/08\/trello_board-1024x451.png 1024w, http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-content\/uploads\/2018\/08\/trello_board-300x132.png 300w, http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-content\/uploads\/2018\/08\/trello_board-768x339.png 768w, http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-content\/uploads\/2018\/08\/trello_board.png 1132w\" sizes=\"(max-width: 608px) 100vw, 608px\" \/><\/a><\/p>\n<p>I decided to create a simple Google Action to enable me to collect a task and share it on our leadership Trello board. I tried to explore this task in three phases.<\/p>\n<p>1. <strong>Get to know the Google Actions API:<\/strong> I used a variety of resources to get to know the Google Actions interface. I, however, found this code lab very helpful.&nbsp; After doing this code lab, I was able to slightly elaborate on the tutorial to create my own stuff.<\/p>\n<p><a href=\"https:\/\/codelabs.developers.google.com\/codelabs\/actions-1\">https:\/\/codelabs.developers.google.com\/codelabs\/actions-1<\/a><\/p>\n<p>2. <strong>Build Trello integration code to add a task to a list:<\/strong> On my local laptop, I started playing around with a few options for adding task information to a list.&nbsp; I found the &#8220;node-trello&#8221; package for NodeJs worked really well.<\/p>\n<p><a href=\"https:\/\/github.com\/adunkman\/node-trello\">https:\/\/github.com\/adunkman\/node-trello<\/a><\/p>\n<p>3. <strong>Integrate the Google Actions API and the NodeJS code together<\/strong><\/p>\n<p>Here&#8217;s a quick tour of the Google Actions conversation setup. Using Dialogflow, it&#8217;s really cool that you can create conversational interface actions with almost no code.&nbsp; JavaScript code becomes necessary if you need to integrate services or databases together.&nbsp; &nbsp;Let&#8217;s focus on one intent: adding a task.&nbsp; &nbsp;In general, intents enable you to accomplish a focused interaction on your Google assistant.&nbsp; &nbsp;In my case, the user calls my action by doing the following:<\/p>\n<ul>\n<li>Ok, Google.&nbsp; Let me talk to GDG tasks\n<ul>\n<li>The system replies with a greeting and a prompt for a command<\/li>\n<\/ul>\n<\/li>\n<li>The user can reply &#8220;add task.&#8221;<\/li>\n<\/ul>\n<p>In this intent, we can configure the system to respond to similar phrases to &#8220;add task.&#8221;<\/p>\n<p><a href=\"http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-content\/uploads\/2018\/08\/intent_start.png\"><img loading=\"lazy\" class=\"alignnone size-large wp-image-2362\" src=\"http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-content\/uploads\/2018\/08\/intent_start-1024x457.png\" alt=\"Add task\" width=\"608\" height=\"271\" srcset=\"http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-content\/uploads\/2018\/08\/intent_start-1024x457.png 1024w, http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-content\/uploads\/2018\/08\/intent_start-300x134.png 300w, http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-content\/uploads\/2018\/08\/intent_start-768x343.png 768w, http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-content\/uploads\/2018\/08\/intent_start.png 1222w\" sizes=\"(max-width: 608px) 100vw, 608px\" \/><\/a><\/p>\n<p>At this point, the intent collects two pieces of information.&nbsp; (task name and task details).&nbsp; We configure the intent to fulfill the conclusion of the intent with custom code.<\/p>\n<p><a href=\"http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-content\/uploads\/2018\/08\/intent_params.png\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-2363\" src=\"http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-content\/uploads\/2018\/08\/intent_params.png\" alt=\"\" width=\"558\" height=\"343\" srcset=\"http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-content\/uploads\/2018\/08\/intent_params.png 558w, http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-content\/uploads\/2018\/08\/intent_params-300x184.png 300w\" sizes=\"(max-width: 558px) 100vw, 558px\" \/><\/a><\/p>\n<p><script src=\"https:\/\/gist.github.com\/michaelprosario\/1568a8d6658d4694044d8be5d875dc32.js\"><\/script><\/p>\n<p>Hope this code sample helps you understand the experience of building a Google Actions application.<\/p>\n<p>Here&#8217;s a few more resources and ideas to help you write your own Google Actions app.<\/p>\n<ul>\n<li><a href=\"https:\/\/developers.google.com\/actions\/templates\/\">https:\/\/developers.google.com\/actions\/templates\/<\/a>\n<ul>\n<li>These are great tutorials for &#8220;non-coders&#8221; and programmers.&nbsp; These templates are designed for teachers, educators or people curious about chat bot building.&nbsp; &nbsp;The tutorials are designed to be very short.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<blockquote class=\"twitter-tweet\">\n<p lang=\"en\" dir=\"ltr\">Checkout the Mobile Stage at DevFest Florida featuring<a href=\"https:\/\/twitter.com\/erikhaddad?ref_src=twsrc%5Etfw\">@erikhaddad<\/a>, <a href=\"https:\/\/twitter.com\/yener?ref_src=twsrc%5Etfw\">@yener<\/a>, kpaul86, <a href=\"https:\/\/twitter.com\/FaisalAbid?ref_src=twsrc%5Etfw\">@FaisalAbid<\/a>, <a href=\"https:\/\/twitter.com\/michaelrosario?ref_src=twsrc%5Etfw\">@MichaelRosario<\/a>, <a href=\"https:\/\/twitter.com\/ksivamuthu?ref_src=twsrc%5Etfw\">@ksivamuthu<\/a><a href=\"https:\/\/twitter.com\/hashtag\/androiddev?src=hash&amp;ref_src=twsrc%5Etfw\">#androiddev<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/machinelearning?src=hash&amp;ref_src=twsrc%5Etfw\">#machinelearning<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/flutter?src=hash&amp;ref_src=twsrc%5Etfw\">#flutter<\/a><\/p>\n<p>Learn more at <a href=\"https:\/\/t.co\/iQaj6WC2WD\">https:\/\/t.co\/iQaj6WC2WD<\/a> <a href=\"https:\/\/t.co\/plEkgsbigP\">pic.twitter.com\/plEkgsbigP<\/a><\/p>\n<p>\u2014 DevFest Florida ?? (@devfestfl) <a href=\"https:\/\/twitter.com\/devfestfl\/status\/1194012058255347712?ref_src=twsrc%5Etfw\">November 11, 2019<\/a><\/p><\/blockquote>\n<p><script async=\"\" src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<blockquote class=\"twitter-tweet\">\n<p lang=\"en\" dir=\"ltr\">Checkout the Web Stage at DevFest Florida featuring<a href=\"https:\/\/twitter.com\/MimmingCodes?ref_src=twsrc%5Etfw\">@MimmingCodes<\/a>, <a href=\"https:\/\/twitter.com\/meteatamel?ref_src=twsrc%5Etfw\">@meteatamel<\/a>, @zach_sais, <a href=\"https:\/\/twitter.com\/lee_warrick?ref_src=twsrc%5Etfw\">@lee_warrick<\/a>, <a href=\"https:\/\/twitter.com\/PizzaPokerGuy?ref_src=twsrc%5Etfw\">@PizzaPokerGuy<\/a>, <a href=\"https:\/\/twitter.com\/loiane?ref_src=twsrc%5Etfw\">@Loiane<\/a>, <a href=\"https:\/\/twitter.com\/DavidKPiano?ref_src=twsrc%5Etfw\">@DavidKPiano<\/a><a href=\"https:\/\/twitter.com\/hashtag\/javascript?src=hash&amp;ref_src=twsrc%5Etfw\">#javascript<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/angular?src=hash&amp;ref_src=twsrc%5Etfw\">#angular<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/CloudComputing?src=hash&amp;ref_src=twsrc%5Etfw\">#CloudComputing<\/a><\/p>\n<p>Learn more at <a href=\"https:\/\/t.co\/iQaj6WC2WD\">https:\/\/t.co\/iQaj6WC2WD<\/a> <a href=\"https:\/\/t.co\/HQ9ONaYouU\">pic.twitter.com\/HQ9ONaYouU<\/a><\/p>\n<p>\u2014 DevFest Florida ?? (@devfestfl) <a href=\"https:\/\/twitter.com\/devfestfl\/status\/1193861052917854210?ref_src=twsrc%5Etfw\">November 11, 2019<\/a><\/p><\/blockquote>\n<p><script async=\"\" src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n\n<!-- Facebook Like Button v1.9.6 BEGIN [http:\/\/blog.bottomlessinc.com] -->\n<iframe src=\"http:\/\/www.facebook.com\/plugins\/like.php?href=http%3A%2F%2Finspiredtoeducate.net%2Finspiredtoeducate%2Fbuilding-chat-bot-apps-with-google-actions%2F&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=light\" scrolling=\"no\" frameborder=\"0\" allowTransparency=\"true\" style=\"border:none; overflow:hidden; width:450px; height: 30px; align: left; margin: 2px 0px 2px 0px\"><\/iframe>\n<!-- Facebook Like Button END -->\n","protected":false},"excerpt":{"rendered":"<p>In science fiction, we have dreamed about the days when we\u2019ll talk to our computers to make things happen. In Star Trek, crew members can talk to the Holodeck computer to \u201cprogram\u201d and explore amazing virtual experiences. Tony Stark(aka. Ironman) constantly gets situation awareness from Jarvis during battle by simply [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[24,15,23],"tags":[],"_links":{"self":[{"href":"http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-json\/wp\/v2\/posts\/2360"}],"collection":[{"href":"http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-json\/wp\/v2\/comments?post=2360"}],"version-history":[{"count":8,"href":"http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-json\/wp\/v2\/posts\/2360\/revisions"}],"predecessor-version":[{"id":2468,"href":"http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-json\/wp\/v2\/posts\/2360\/revisions\/2468"}],"wp:attachment":[{"href":"http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-json\/wp\/v2\/media?parent=2360"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-json\/wp\/v2\/categories?post=2360"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/inspiredtoeducate.net\/inspiredtoeducate\/wp-json\/wp\/v2\/tags?post=2360"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}