amazon-web-servicesdialogflow-esintegrationamazon-echo

Dialogflow/API.ai Amazon Echo integration: Simple plain text bot for testing


I have been trying to make my simple test bot (it's just a single intent with three different text based responses) and hook it up to my amazon echo for a proof of concept demo.

I am having trouble with the amazon side of the integration. Here are my questions:

  1. How do I make it so I can test my skill on my echo. Do I need to publish it even before I can test it? How does it work
  2. How do I make my echo communicate with the api.ai/dialogflow server to get the response I want?
  3. What link do I fill in in the 'Endpoint' part of the configuration
  4. What is the SSL Certificate and how do I configure it?

All I want my bot to do with alexa is to recognise what I say and reply with a simple text answer...

Thanks for helping me out!


Solution

  • Here is what you need to do.

    1. Follow the instruction at https://dialogflow.com/docs/integrations/alexa-exporter to export your DialogFlow interaction model and sample utterances and to create the skill in http://developer.amazon.com.
    2. You will need to create a skill service (the 'Endpoint') that calls the DialogFlow API to send and receive requests / responses between DialogFlow and the Amazon Alexa Service. I'd do that with AWS Lambda - that way you won't have to worry about configuring an SSL certificate.

    After you have a skill property configured in the Amazon Developer Console you can 'enable testing' in the skill configuration to make it possible to test the skill before it's published.

    Here is a video I did that walks through creating a custom Alexa skill. All of the steps in the video would apply for what you're trying to do but in addition you'd need to call the DialogFlow API using one of the DialogFlow SDKs which you can find at https://dialogflow.com/docs/sdks. If you decide to use AWS Lambda for your skill service endpoint, I'd suggest using Node.JS and the Node.JS SDK for DialogFlow.

    Suggestion. If you're goal is to create a simple skill for Alexa, it might be simpler to just create the skill without DialogFlow. If you want a skill that works both for Amazon Alexa and Google Home I'd check out the Jovo Framework.

    Also, for more videos on creating Alexa skills visit http://youtube.com/dabblelab or http://learn.dabblelab.com

    I hope this helps!