Skip to content

dothework/bloc-skill-sample-nodejs-flash-briefing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build An Alexa Flash Briefing Skill

This Alexa sample skill is a template for a flash briefing skill. This flash briefing skill will read today's quote.

If this is your first time here, you're new to Alexa Skills Development, or you're looking for more detailed instructions, click the Get Started button below:

Be sure to take a look at the Additional Resources at the bottom of this page!

About

Note: The rest of this readme assumes you have your developer environment ready to go and that you have some familiarity with CLI (Command Line Interface) Tools, AWS, and the ASK Developer Portal. If not, click here for a more detailed walkthrough.

Usage

Alexa, flash briefing.
	>> From My Flash Briefing, Hard work pays off...

Repository Contents

Setup w/ ASK CLI & AWS Management Consoles

Pre-requisites

Installation

  1. Clone the repository.

    $ git clone https://github.com/dothework/bloc-skill-sample-nodejs-flash-briefing/
  2. Initialize the ASK CLI by Navigating into the repository and running the command: ask init. Follow the prompts.

    $ cd bloc-skill-sample-nodejs-flash-briefing
    $ ask init

AWS Deployment

  1. Create a Lambda function. This sample expects the name to be alexaFBSkillQuoteToday. If you choose another name you will have to adjust accordingly.

    • Author from scratch.
    • Select the Node.js 6.10 runtime.
    • Set the execution role appropriately.
    • Do not add any triggers at this point.
    • Choose 'Upload a .ZIP' file as the Code entry type. Upload the archive located at ./lambda/index.zip
    • Save the function.

    The ASK CLI does not currently support creation and deployment of the backend for Flash Briefing skills.

  2. Create the API Gateway endpoint. This sample expects the endpoint name to be alexaFBSkillQuoteToday. If you choose another name you will have to adjust accordingly.

    • Open the Lambda function created above.
    • Add an API Gateway trigger.
    • Enter alexaFBSkillQuoteToday as the API name.
    • Select 'prod' as the Deployment stage.
    • Choose 'Open' as the Security option.
    • Click Add at the bottom of the API Gateway section.
    • Click Save at the top of the page to save all changes and create the API Gateway endpoint.
    • Copy the Invoke URL. You will use this in the next step.

    Consider modifying the API Authorization options as future task.

Customization

  1. ./skill.json

    • Edit the url value of the . Replace the existing value https://aaaaaaaaaa.execute-api.us-east-1.amazonaws.com/prod/alexaFBSkillQuoteToday with the Invoke URL from step 2 above.
    • Change the skill name, skill description, feed details, icons, testing instructions etc ... See the Skill Manifest Documentation for more information.
  2. ./lambda/src/index.js

    Modify the skillTitle constant.

  3. ./lambda/src/data.js

    Modify the daily tip/quote data. See the Additional Resources section below for a tool to ease this effort.

  4. ./lambda/src/package.json

    If you changed the name of the lambda function in AWS Deployment section above, modify the --function-name 'alexaFBSkillQuoteToday' accordingly.

  5. Deploy the Lambda function. Navigate into the /lambda/src directory and run the npm command: npm run deploy

    Only run the npm run deploy command after you've created the function in the AWS Lambda Management Console. Executions will fail if the function does not already exist.

    $ cd lambda/src/
    $ npm run deploy
  6. Deploy the skill using the ASK CLI.

    $ ask deploy

Testing

  1. To test, you need to login to Alexa Developer Console, and enable the "Test" switch on your skill from the "Test" Tab.

  2. Once the "Test" switch is enabled, your skill can be tested on devices associated with the developer account as well. Speak to Alexa from any enabled device or through your Amazon Mobile App and say :

    Alexa, flash briefing
    

Certification

When you have tested your skill and made any final adjustments to the content and/or it's behavior, submit the skill for certification from the Alexa Developer Console.

Additional Resources

Community

Tutorials & Guides

  • Voice Design Guide - A great resource for learning conversational and voice user interface design.

Documentation

About

An Alexa Skill Sample showing how to build a flash briefing skill using Node.js

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published