Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Workshop: Building Actions for the Google Assistant - Udaipur2019

Workshop: Building Actions for the Google Assistant - Udaipur2019

Actions on Google is a developer platform that lets you create software to extend the functionality of the Google Assistant, Google's virtual personal assistant, across more than 500 million devices, including smart speakers, phones, cars, TVs, headphones, and more.

There are three levels of codelabs which includes level_1, level_2, and level_3 that we’re going to cover. At last, you’ll be able to develop an rich interactive application by yourself.

Level_1:
This codelab covers beginner-level concepts for developing with Actions on Google like how to get started with your first project on action console, how to create entities and intents with simple response and integration with google assistant.

Level_2:
This codelab will cover intermediate-level concepts like getting permission from the user for accessing personal data like Name, Location etc. Also, it covers how to write your own webhook in Node.js and deploy it to firebase.

Level_3:
This codelab covers intermediate and advanced-level concepts for developing with Actions on Google. It covers Rich Responses like adding Lists, Carousel into your application, how to handle user’s silence and cancellations and so on.

Jaldeep Asodariya

September 14, 2019
Tweet

More Decks by Jaldeep Asodariya

Other Decks in Technology

Transcript

  1. Triggering Ok Google, talk to codelabs actions. Hey Google, let

    me talk to codelabs actions. Ask codelabs actions to tell me brief about GDG.
  2. Intent Matching - Match and categorize user utterances to an

    intent. Entity Extraction - Identify key words and phrases spoken by the user. “ @
  3. Setup for Firebase Cloud Functions Install firebase command-line interface $

    npm -g install firebase-tools $firebase login $firebase init … $ npm install … $firebase deploy
  4. const { dialogflow, Permission, Suggestions, } = require('actions-on-google'); const functions

    = require('firebase-functions'); const app = dialogflow({ debug: true }); app.intent('Default Welcome Intent', (conv) => { conv.ask(new Permission({ // Asks the user's permission to know their name context: 'Hi there, to get to know you better', permissions: 'NAME', })); }); ... exports.dialogflowWebhook = functions.https.onRequest(app);
  5. ... // Handle the Dialogflow intent named 'actions_intent_PERMISSION'. app.intent('actions_intent_PERMISSION', (conv,

    params, permissionGranted) => { const welcomeResponse = `Hi!, Welcome to Google Developers Groups. What you want to know about this platform?`; if (!permissionGranted) { // If the user denied our request, go ahead with the conversation. conv.ask(`OK, no worries. ` + welcomeResponse); conv.ask(new Suggestions('About GDG Ahmedabad', 'Brief about')); } else { // store their name in the 'conv.data' object conv.data.userName = conv.user.name.display; conv.ask(`Thanks, ${conv.data.userName}. ` + welcomeResponse); conv.ask(new Suggestions('About GDG Ahmedabad', 'Brief about')); } }); ...
  6. Personalize your responses with helper intents Helper intents return frequently-requested

    information such as the user's name and location actions_intent_PERMISSION
  7. Thank you! Dank je! धन्यवाद! ধন্যবাদ! ہﯾرﮑﺷ ﺎﮐ پآ! ﻲﻧﺎﺑرﮭﻣ

    ﻲﺟ نﺎھوﺗ! ေကျးဇူးတင်ပါတယ်! ന ി! ありがとうございました! Ευχαριστώ! Gràcies! ਤੁਹਾਡਾ ਧੰਨਵਾਦ! ಧನ್ಯವಾದ! À ringrazià ti! 谢谢! நன்றி! ధన్యవాదాలు! ¡Gracias! Faleminderit! આભાર! ขอขอบคุณ! Jaldeep Asodariya @jaldeepasodariy