Google Assistant (Conversational)

Integration published by Jovo | 2,562 downloads

Build Conversational Actions for Google's Assistant platform

Push Notifications

Learn more about how to send push notifications to your Google Action users.

Introduction

The Push Notifications feature allows you to send user's notifications, which, if tapped, triggers a predefined intent of your Google Action. To send a push notification, you need to setup the Actions API and configure scenes to handle the individual steps of configuring push notifications.

Configuration

Service Account

Push Notifications will be sent over the Actions API, which you'll need to setup for your Google Cloud project linked to your Conversational Action.

First, go to the Google API Console and select your project. Make sure the project's ID is the same as your Conversational Action's ID. After you selected your project, enable the Actions API.

Next, you'll create a service account with respective credentials, that you'll use to send the notifications to your users.

After you gave your account an appropriate name, choose the Role Project > Owner, to give your account all necessary permissions. When you're done, go to the Service Account details and add a new key certificate in JSON format, which you can then download and store in your project's directory.

Scenes

To implement Push Notifications in your voice application, we recommend using scenes to handle the setup.

There are multiple ways of setting up the scenes necessary, we recommend creating them inside your model file to deploy them directly to the Google Conversational Actions Console.

These two scenes, located inside your Jovo model, determine how to set-up Push Notifications.

PushNotificationsScene propagates the request to PushNotificationsScene_Notifications, if the intent PushNotificationsIntent has been triggered by the user, where the user will be asked whether to opt in or out of push notifications.

In order for your action to listen for PushNotificationsIntent, you need to instruct your Google Action to handle the next conversation step with the specified scene:

ON_PERMISSION

After the user has responded to your request, you will receive a request to notify you about the result, which will be mapped to the Jovo built-in ON_PERMISSION intent:

Sending the Notification

Using the class PushNotificationsApi and your credentials, you can now send a push notification:

Example Javascript | Example Typescript

Google Assistant Changelog

Current version might be higher than the latest changes displayed below because of updates of dependencies.

2021-02-22 [3.5]

  • #901 Move setResponse from response to after.response middleware (@aswetlow)
  • #901 Fix missing unit test methods in ConversationalResponse (@aswetlow)
2021-02-04 [3.4.0]
  • #892 ✨ Transactions for Google Assistant Conversational Actions (@aswetlow)
2021-01-28 [3.3.2]
  • #890 ✨ Add Conversational Actions functionality to Jovo Debugger (@aswetlow)
2020-12-03 [3.3.0]
  • #871 Add missing and broken Google Conversational Action features (@aswetlow)
2020-11-20 [3.2.4]
2020-11-16 [3.2.3]
  • Adds Interactive Canvas to Google Conversational Actions (@aswetlow)
2020-11-10 [3.2.2]
  • #856 Fixes several Google Conversational Actions issues (@aswetlow)
2020-11-05 [3.2.1]

Fix missing locale in push notifications object

2020-09-29 [3.1.3]
  • #831 :recycle: Enhance Google AssisConversational Actions (@maswetlow)

2020-09-29 [3.1.0-alpha.0]

  • #829 ✨ Work In Progress: Google Assistant Conversational Actions (@aswetlow)

Join Our Newsletter

Be the first to get our free tutorials, courses, and other resources for voice app developers.