Skip to content

[WIP] An example Amazon Alexa node.js skill integrated with Dialog Analytics running on AWS Lambda

Notifications You must be signed in to change notification settings

dialoganalytics/alexa-node-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Amazon Alexa Node.js Skill

An example Amazon Alexa node.js skill integrated with Dialog Analytics running on AWS Lambda. Built with claudiajs/claudia.

Getting started

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": "..."
}

Creating an Alexa skill

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:

Configuration Model

Intent Schema

{
  "intents": [
    {
      "intent": "GetName",
      "slots": [
        {
          "name": "Name",
          "type": "LIST_OF_WORDS"
        }
      ]
    },
    {
      "intent": "ExitApp"
    }
  ]
}

Custom Slot Types

Type: LIST_OF_WORDS

Values:

James
Peter
Mike
Andrew

Sample Utterances

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

Configuration

  1. In the Endpoint section, select HTTPS.
  2. Run npm run create from this respository to create and publish a lambda function with claudia.
  3. Copy the endpoint URL claudia prints out in your terminal and paste it into the input field of the Amazon Developer Console.

SSL Certificate

Select My development endpoint is a sub-domain of a domain that has a wildcard certificate from a certificate authority.

Good job, your done!

Usage

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.

Service Simulator

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?

Your Skills

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?.

Go further

Read more on how to make the most out of the possibilities offered by Dialog here: https://dialoganalytics.com

About

[WIP] An example Amazon Alexa node.js skill integrated with Dialog Analytics running on AWS Lambda

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published