An example Amazon Alexa node.js skill integrated with Dialog Analytics running on AWS Lambda. Built with claudiajs/claudia.
Clone this repository and run npm install
Create an account on https://app.dialoganalytics.com, grab your Dialog API token and bot ID.
Set environment variables in .env.json
:
{
"DIALOG_API_TOKEN": "...",
"DIALOG_BOT_ID": "..."
}
Go to the Amazon Developer Console and create a new Alexa Skill. Then follow the setup wizard and leave the defaults, except for the following configurations:
{
"intents": [
{
"intent": "GetName",
"slots": [
{
"name": "Name",
"type": "LIST_OF_WORDS"
}
]
},
{
"intent": "ExitApp"
}
]
}
Type: LIST_OF_WORDS
Values:
James
Peter
Mike
Andrew
GetName what do you think of {Name}
GetName what you think about {Name}
GetName what is your opinion on {Name}
GetName what do you think about {Name}
ExitApp stop
- In the Endpoint section, select HTTPS.
- Run
npm run create
from this respository to create and publish a lambda function withclaudia
. - Copy the endpoint URL claudia prints out in your terminal and paste it into the input field of the Amazon Developer Console.
Select My development endpoint is a sub-domain of a domain that has a wildcard certificate from a certificate authority.
Good job, your done!
You can test your new skill in two ways. In all cases the conversation will be tracked by Dialog as soon as the skill is triggered.
In the Amazon Developer Console Test section you can input an utterrance and preview both the request and response of the lambda function. For example you could try: What do you think of Phil?
Go to your Alexa App in the Skills section, and click on the Your skills button. You'll see the new skill listed, which means you can ask your Amzon Echo something like: Alexa, ask {name of your skill} what do you think about Phil?
.
Read more on how to make the most out of the possibilities offered by Dialog here: https://dialoganalytics.com