Connect Microsoft Bot Framework Azure Bot to Google Assistant Action as a channel. We will use Actions SDK and DialogFlow Adapter for Bot Builder v4 .NET SDK.
I will be working on the Core Bot template considering the sequential conversation and testing it on Google Actions Console. Many other demos use the Echo bot for its simplicity.
This is the bot series on Connecting Microsoft Azure Bot to Google Assistant Action Channel and in this second part, we will Configure the Google Actions.
The Google adapter supports connecting to Actions on Google (the conversations webhook) or via DialogFlow. It is recommended to use Actions on Google if possible.
Prerequisites
Create an Actions on Google Project
Log in to Actions on Google Console and click on New Project
.

Provide the name of the project and choose the language and your country. Click on Create project
.

From the list of Actions, choose the Custom
Action and click on Next.

Choose the Blank project
and click on Start building
.

When the project is created, an Overview page will be shown. Click on Decide how your Action is invoked
.

Give an Invocation name and click on Save. I have given the Invocation name as My Flight Booking Bot
.

Now, go back to the Startup.cs file on your bot source code in Visual Studio. Add the Invocation name that you have provided in the previous step. Also, you will have to provide the project id. It can be found by clicking on the top menu and selecting Project settings.

Copy the Project ID and paste it in the Startup.cs file.

Below is the Startup.cs Google adaptor services will look like.
services.AddSingleton(sp =>
{
return new GoogleAdapterOptions()
{
ActionInvocationName = "My Flight Booking Bot",
ActionProjectId = "fli.....",
ValidateIncomingRequests = true,
WebhookType = GoogleWebhookType.Conversation
};
});
In this case, I have removed the DialogFlowAuthorizationHeader because this is the first way of doing this using Actions SDK. The other way is using the DialogFlow that we will see in the next parts.
You must be logged in to post a comment.