Pages

Thursday, August 30, 2018

How to Connect a Bot to Amazon Alexa

Through Bot Libre, you can now use your own bot to send and receive messages using any Amazon Alexa device. This "How To" will give you a step by step process to connect your bot with Amazon Alexa.

Step 1 - Create a Bot

First you must create a bot that you want to connect to Alexa, or you can use one of your existing bots. To create a bot, follow the instructions here: How to create your own chat bot in 10 clicks.

Step 2 - Amazon Developer Console

Click the "Sign In" button to sign into or create a new Amazon Developer account.

Once you have signed in, mouse over "Your Alexa Consoles" and select "Skills".

In the Alexa Skills Console, click the "Create Skill" button to continue.

Enter a name for your Alexa skill and select the language you will use. You will be able to add more languages later. Your skill will only work on devices set to this language, so a skill set to English(UK) won't work on a device set to English(US), for example. Make sure "Custom" is selected at the bottom, then click the "Create skill" button.

Step 3 - Create Interaction Model

Click the "Invocation" option in the left sidebar under Interaction Model.

In the "Skill Invocation Name" field, enter the name the user will use to begin interacting with your bot. The invocation name should be two or more words. Click the "Save Model" button when complete.

Click the "+ Add" button next to "Intents" in the left sidebar. Enter a name into the field, it does not matter what it is. I will enter "conversation" in my example. Press the "Create custom intent" button.

In the "Sample Utterances" field, enter some phrases that a user could say to signal their intent to speak with your bot.

Scroll down to the Intent Slots section. Enter a name for the slot and press the "+" button. It does not matter what the name is, I will use "message" in this example.

Select "AMAZON.SearchQuery" for the slot type. Press the "Save Model" button when complete. Click the "Edit Dialog" text under "Actions".

Toggle the "Is this slot required to fulfill the intent?" option to the ON position. Enter any text into the "Alexa speech prompts" field. It does not matter what is says, it will not be used, but something must be there.

Press the "Save Model" button when complete.

If you would like to add support for additional languages, click the language dropdown in the top-left, and select "Language Settings".

Click "+ Add new language" and select the language(s) you would like to add support for. You will then need to complete the Interaction Model (step 3 in this guide) for each new language you've added.

Then click the "Build Model" button and wait for it to finish.

Step 4 - Enter Endpoint

Return to the Bot Libre website and navigate to your bot's Admin page by click the gear icon on your bot's page.

Select the "Alexa" option to enter the next screen. Copy the "Alexa Skill Endpoint URL" to your clipboard.

Return to the Alexa Skills Console and click the "Endpoint" button on the left sidebar. Select the "HTTPS" option.

In the "Default Region" section, paste the "Alexa Skill Endpoint URL" into the "Enter URL" field, and select "My development endpoint has a certificate from a trusted certificate authority" in the "Select SSL certificate type" dropdown.

Click the "Save Endpoints" button at the top of the page.

Step 5 - Bot Libre Settings

Return to the Bot Libre website and navigate to your bot's Alexa settings page. You will need to enter some responses to handle Alexa's built-in intents. These will only be active until the conversation with your bot begins. After the conversation has begun, your bot will handle all responses. In the "End Conversation Phrases" box, enter some phrases/words the user can say that will cause the conversation to end.

Click the "Save" button when complete.

Step 6 - Finish

You should now be able to test your bot using the Alexa Skills Console or an Alexa device that is connected with your account. To test on the Alexa Skills Console, click the "Test" button.

You will need to enable testing for your skill by clicking the toggle that says "Test is disabled for this skill."

You will now be able to test your bot by typing into the text box or clicking on the mic icon to use your voice.

To make your Alexa Skill available to the public, you will need to complete the required information in the "Distribution" tab.

Next, click on the "Certification" tab. You will need to click the "Run" button to complete validation. When your skill has successfully passed validation, click on "Submission" in the left sidebar and then click the "Submit for review" button. You will then need to wait for Amazon to review your Alexa Skill before it is available for the public.

Your bot will now be able to send and receive messages on an Amazon Echo or any other Amazon Alexa-compatible device. If you encountered any issues, or would like help setting up your bot please email us at support@botlibre.com or upgrade to our Platinum service and we can build your bot for you.

You can now also talk to the Bot Libre Help Bot, Brain Bot, and Julie on Alexa.

say "Alexa, open Bot Libre" (lee bra) to talk with the Bot Libre Help Bot

say "Alexa, open Brain chatbot" to talk with the Brain Bot

say "Alexa, open Julie chatbot" to talk with the Julie

Thursday, August 9, 2018

How to create a bot for Google Home and Google Assistant

Through Bot Libre, you can now use your own bot to send and receive messages on Google Home or any other Google Assistant-compatible device. This "How To" will give you a step by step process to connect your bot with Google Assistant.

Note: A previous version of this blog post begins by creating an Action in the Google Actions Console. However, that procedure no longer works due to changes that Google has made to Actions. The Dialogflow Agent must be now be created first.

Step 1 - Create a Bot

First you must create a bot that you want to connect to Google Assistant, or you can use one of your existing bots. To create a bot, follow the instructions here: How to create your own chat bot in 10 clicks.

Step 2 - Create a new Dialogflow Agent

Go to https://dialogflow.cloud.google.com/ and sign in to your Google account.

Click the "+ Create Agent" button to continue.

Enter an agent name and select your language and time zone, then press "Create" to continue.

Step 3 - Configure Dialogflow Agent

Click the "Fulfillment" option on the left sidebar.

Then, click the "Webhook" toggle to enable it, then return to the Bot Libre website. 

On the Bot Libre website, navigate to your bot's Admin page by clicking the gear icon on your bot's page.

Select the "Google Assistant" link on your bot's Admin page to continue to the next screen.

Copy the "Google Assistant Webhook URL" to your clipboard and return to the Dialogflow website.

Paste the URL into the "URL" field, then scroll down and press the "Save" button.

Next, click the "Intents" option on the left sidebar.

Click on "Default Fallback Intent". Scroll to the bottom of the page and expand the Fulfillment section. Toggle "Enable webhook call for this intent" to the on position. Press the "Save" button. Repeat the same process for the "Default Welcome Intent".

Step 4 - Integrate with Google Assistant

Click the "Integrations" option on the left sidebar.

Under "Google Assistant", click on "Integration Settings". This will bring up the integration popup for Google Assistant.

Click on "Test" at the bottom of the popup. This will create a new project for Google Assistant, with Dialogflow integrated as an Action.

A new tab will appear for the Actions Console, with your new project opened.

Step 5 - Google Assistant Action Settings

On the top navigation bar in the Actions Console, click on "Develop".

On the left sidebar, select the "Invocation" option.

From here, you can enter a "Display name" which the user will say or type to begin interacting with your bot. You can also select a voice that your bot will use on Google Assistant.

Press "Save" when finished.

Step 6 - Bot Libre Settings

You may now close the Dialogflow website and return to your bot's Admin page on the Bot Libre website.

In the "End Conversation Phrases" box, enter some phrases/words the user can say that will cause the conversation to end.

Click the "Save" button when finished.

Step 7 - Finish

You should now be able to test your bot using the Simulator available on the the Google Actions Console by clicking on "Test" in the top navigation bar. Alternatively, you can test your bot on any device associated with the Google account used to create your Google Assistant action. To test using the simulator, make sure the "Web & App Activity", "Device Information", and "Voice & Audio Activity" permissions are enabled on the Activity controls page for your Google Account.

Note: Do not test the bot from the Dialogflow website, since they use a different API.

To make your Google Assistant Action available to the public, click on "Deploy" in the top navigation bar. Then, click on "Directory information" option in the left sidebar and fill out the required information.

Next, click the "Release" option in the left sidebar. If all necessary information has been completed, you will be able to click the "Submit for Production" button to make your bot available to all Google Assistant users.

Your bot will now be able to send and receive messages on Google Home or any other Google Assistant-compatible device. If you encountered any issues, or would like help setting up your bot please email us at support@botlibre.com or upgrade to our Platinum service and we can build your bot for you.

You can now also talk to the Bot Libre Help Bot, Brain Bot, and Julie on Google Home and Google Assistant.

say "talk to Bot Libre" (lee bra) to talk with the Bot Libre Help Bot

say "talk to Brain chatbot" to talk with the Brain Bot

say "talk to Julie chatbot" to talk with the Julie