In this lab, you will build a Google Assistant application with Dialogflow and Cloud Functions for Firebase.




Overview

Google Assistant is a personal voice assistant that offers a host of actions and integrations. From making appointments and setting reminders, to ordering coffee and playing music, the 1 million+ actions available suit a wide range of voice command tasks. Google Assistant is offered on Android and iOS, but it can even be integrated with other devices like smartwatches, Google Homes, and Android TVs.
Actions is the central platform for developing Google Assistant applications. The Actions platform integrates with human-computer interaction suites, which simplifies conversational app development. The most widely used suite is Dialogflow, which uses an underlying machine learning (ML) and natural language understanding (NLU) schema to build rich Assistant applications. The Actions platform also integrates with Cloud Functions, which lets you run backend fulfillment code in response to events triggered by Dialogflow requests.
In this lab you will get hands-on practice with the Actions platform, the Dialogflow suite, and Cloud Functions by building a "Silly Name Maker" application, which returns a user with a silly name after they have entered in a lucky number and favorite color. You will build a Dialogflow agent that intelligently parses user input for specific information. The agent will be supplemented with a webhook, which will trigger a Cloud Function that handles fulfillment logic and returns your user with their silly name.
What you will learn
In this lab, you will learn how to:
  • Create an Actions project and build an Action.
  • Create a Dialogflow agent and configure the default welcome intent.
  • Build a custom intent with entities.
  • Initialize a Cloud Function.
  • Add fulfillment logic and packages to your Cloud Function.
  • Add a webhook to your Action.
  • Test your Assistant application with the Actions simulator on expected and unexpected conversational paths.
  • Optional: test your Assistant application on a Google Home device.
Prerequisites
This is a fundamental level lab. Familiarity with the Actions Console and the Qwiklabs platform is expected. If you need to get up to speed with the lab's requirements, please complete one of the following Qwiklabs:
Since this lab works with the Actions simulator, having a pair of headphones or turning the volume up on your computer is recommended. If you want to test your Assistant application on a Google Home, keep your device handy.
Once you're ready, scroll down and follow the steps below to set up your lab environment.

Setup

Google Cloud Platform Console
How to start your lab and sign in to the Console
  1. Click the Start Lab button. If you need to pay for the lab, a pop-up opens for you to select your payment method. On the left is a panel populated with the temporary credentials that you must use for this lab.



  1. Copy the username, and then click Open Google Console. The lab spins up resources, and then opens another tab that shows the Choose an account page.
  1. Tip: Open the tabs in separate windows, side-by-side.
  1. On the Choose an account page, click Use Another Account.


  1. The Sign in page opens. Paste the username that you copied from the Connection Details panel. Then copy and paste the password.
  1. Important: You must use the credentials from the Connection Details panel. Do not use your Qwiklabs credentials. If you have your own GCP account, do not use it for this lab (avoids incurring charges).
  1. Click through the subsequent pages:
  • Accept the terms and conditions.
  • Do not add recovery options or two-factor authentication (because this is a temporary account).
  • Do not sign up for free trials.
After a few moments, the GCP console opens in this tab.