Integrating Dialogflow with babelforce is easy, however, there are a few steps you need to be doing on the Google side. This article is a step-by-step explanation.
1st: Create an Agent
Before getting started, make sure to setup the Agent you want to use in your Dialogflow. For each agent, you must create a new integration.
Also, you need to be the owner of the Agent to do the necessary changes.
2nd: Setup a new Service Account in Google Console
To get started, go to the IAM section in the Google console : https://console.cloud.google.com/iam-admin/iam. Select the agent you want to integrate from the top-bar drop down and then go to the side menu item Service Accounts (see screenshot below).
Now create a new Service Account:
Give it any name in the first step, in the second step, select the account access to the Dialogflow API Client.
In the last step, create a new key. Download the JSON file to your computer. This is very important, you will need this file for completing the integration on the babelforce side.
Now go to the file and open it. It will look a bit like the code block below. The three important elements from this file are marked yellow and bold. The only difference will be that you private_key is going to be much longer:
"private_key": "-----BEGIN PRIVATE KEY-----\ndfajladsf+adfliasdfaenfl\nafsdjfladf7894n2nlq4nfef.fwefq342lifneli32\nfajdsflasdf7adf92349324032rjlieafln\n-----END PRIVATE KEY-----\n",
3rd: Format the private key
Copy the whole key into the formatter and press unescape. The result should look something like this (just much longer):
4th: The babelforce bit:
The rest is super easy. Go to your babelforce account, find the integrations sections and click on Add.
Search for Dialogflow
In your last step, fill out the form with the details from the JSON file. For the private key please use the formatted version we created in the step above.