How to use a custom Dialogflow project
On this page, you’ll learn how to:
Configure ZBOS to use Dialogflow
To allow ZBOS to use Dialogflow, a service account needs to be configured on Google Cloud. If a service account and the corresponding keys are already available, skip to configure zbos.
Tap the option 'Create new service account' at the top of the page to create a new service account:
Enter a name to use for the service account:
Enter a name for the service account. This will generate a unique id for the account.
Optionally, enter a description for the account.
Tap the button 'Create and continue' to continue setting up the service account.
Tap the role setting to view the list of available options:
Tap the option 'Dialogflow API Admin' in the list of available options to assign the required role:
Tap the button 'Continue' in the final step to finish creating the service account. The service accounts page will be shown displaying the newly created account:
The final step in configuring the Google Cloud to allow the ZBOS platform to use the Dialogflow project is to create the credentials for use.
Tap the option next to the service account and tap the option 'Assign keys' in the menu to create (new) keys for the service account:
Tap the option 'Add key' and tap the option 'Create new key' to create a new key for the service account:
Tap the option 'JSON' in the new modal and tap the button 'Create' to create the new keys:
This will download a JSON file containing the required keys and credentials for use in the ZBOS configuration.
|These credentials are fictitious and should not be used.|
See the chapter assign keys for more information on creating a key containing the required information for the ZBOS configuration.
Open the ZBOS Control app or website, connect to the device to use Dialogflow and open the Apps & Config page. Next, tap the option 'Robot' followed by 'Settings':
Scroll down the list to the 'Advanced settings' in the 'Speech' section:
Tap the option 'Advanced settings' to view the additional options.
Tap the option 'Dialog profile' and select the option 'Google' to use the Google Dialogflow.
Additional options will be shown once the Google profile has been selected. Enter the credentials as retrieved from the JSON for the service account as shown:
|The private key needs to have the '\n' characters replaced by line breaks. The website https://www.freeformatter.com/json-escape.html can be used for this (for example).|
The entry for the example JSON shown earlier shows the following: