Creating an Alexa skill called acme insurance along with a Webhook channel lets you chat with a specific bot.
Set up a developer account in the Amazon Developer Portal. Choose Alexa Skills Kit.
In the Bot Builder, create a webhook channel for your bot:
-
In the Create Channel dialog, enter the outgoing Webhook URL as
https://YOUR_PUBLIC_FACING_URL/singleBotWebhook/messages
. This URL is where your bot will send its responses back to the Alexa skill. -
Keep the Secret Key and Webhook URL close by because you need to add them to the
service.js
file. Also, remember to set the amazon skill id (to be created in the next step). For example:var metadata = { waitForMoreResponsesMs: 200, amzn_appId: "amzn1.ask.skill.b6a603ad-5f3f-471e-b509-922ddc2aded9", channelSecretKey: 'RpBrYK14O48vQXxDMOpYw32j7q8O8B8J', channelUrl: 'http://bots-connectors:8000/connectors/v1/tenants/5c82a414-e2d0-45fd-b6a2-8ca3b9c09161/listeners/webhook/channels/E8D22577-3F91-487F-9018-1D6E884DED1A' };
-
Save the file.
-
Run the command on the folder: npm install
-
Finally, run the server: node index.js
- Open the Amazon Developer Console.
- Choose Alexa Skills Kit.
- Select Custom Interaction Model as the Skill Type:
- Enter singleBot for the name.
- Enter singlebot (or any name that you want to use to invoke this skill) as the Invocation Name.
- Select No for the Audio Player option.
Next, add the CommandBot intent, which sends a voice text to the configured bot. Please copy paste invocation.json file in the invocation model's JSON editor
- Choose HTTPS
- Choose North America.
- Enter the HTTPS ngrok URL for port 8888 that's appended with
/alexa/app
. For example:https://<ngrok URL for port 8888>/apps/alexa-singleBot/alexa/app
- Choose No for Account Linking
Choose My development endpoint is a sub-domain of a domain that has a wildcard certificate from a certificate authority.