How to build Actions on Google.

In this blog I am explaining how to build Actions on Google in step by step process.

Actions on Google:

  • Actions on Google is a platform allowing developers to create software applications known as “Actions” that extend the functionality of the Google Assistant on devices such as the Google Home smart speaker and the Google Pixel smartphone and on the Google Allo mobile app.
  • Actions let users get things done through a conversational interface that can range from a quick command to turn on some lights or a longer conversation, such as playing a trivia game.

Dialogflow:

  • Dialogflow(Previously known as API.AI) is where the magic happens. It works on natural language processing and backed by Machine Learning. At Dialogflow the whole ‘conversation’ take place.
  • Dialogflow is backed by Google and runs on Google infrastructure, which means you can scale to millions of users.

How to integrate Dialogflow with Actions on Google:

1. First build your agent in dialogflow.

2. Then click on integrations and select Google Assistant, you will be navigated to Pop box as shown below:

3. Click on test button and then now you are able to test your agent.

To approve the Actions on Google from the Google team you need to follow the below instructions:

1. Microphone and small talk should be disabled.

2. You need to provide the privacy policy URL.

How to submit your application to Google team for approval:

  1. Navigate to Directory information section in Deploy and fill Description, Sample invocations, Images, Contact details, Privacy and consent related to your application. In Privacy and consent you need to provide your privacy policy URL.

2. In Additional information Select the Category, For Families, Alcohol and Tobacco, fill Testing Instructions based on your application and tick mark the Mic policy.

Account Linking:

  • You can use account linking to connect your users’ Google accounts with user accounts in your authentication system.
  • If your Action is a companion of existing apps on different platforms (for example, the web or Android), you can use account linking to securely make users’.
  • By using account linking you can restrict the users and easy to use in business.

Account linking with OAuth:

The OAuth linking type supports two industry standard OAuth 2.0 flows, the implict and authorization code flows. In this I have used authorization code

To configure to your project, you need to follow these steps:

  1. Navigate to the Account linking section in Advanced Options and select No, I only want to allow account creation on my website in Account Creation then click on Next.

2. In Linking type, choose OAuth and Authorization code then click on the NEXT.

3. In client information provide the details from your OAuth account and then click on Next.

4. In configure your client add scopes as follow

5. In testing instructions provide Your OAuth account gmail username, password and information to test your application by the review team.

Now you can test your application in Google assistance with invocation name which you have given before, if it is approved by Google team.

To link your google account, you need to give the permissions by saying YES. Then you need to provide the OAuth user username and password.