Things used in this project

Hardware components:
Amazon Alexa Amazon Echo
Software apps and online services:
Dp image kit 02
Amazon Alexa Alexa Skills Kit
Screen%20shot%202015 07 20%20at%206.10.26%20pm
Amazon Web Services AWS Lambda


How the skill works
Alexa diagram d5zfptlsid


AWS Lambda codeJavaScript
Server end code to generate Alexa response
'use strict';
var Alexa = require('alexa-sdk');

var APP_ID = "ID here";
var SKILL_NAME = "ironrich";

 * Array containing iron rich foods.
var lines = [
"Clams, canned, drained Kellogg's",
"Special K cereal Grape Nuts",
"Cream of Wheat (instant)",
"Raw oysters",
"Carnation Instant Breakfast",
"Pizza w/meat, vegetables, thick crust Lentils",
"Potato, baked",
"Beef steak, lean",
"Kidney beans",
"Spaghetti w/tomato sauce Oatbran muffin",
"Turkey, dark meat, cooked Hummus",
"Pumpkin, canned",
"Eggs, scrambled Mushrooms, cooked",
"Tofu, raw, firm",
"French toast",
"Whole wheat bread",
"Green peas",
"Figs, dried"

exports.handler = function(event, context, callback) {
    var alexa = Alexa.handler(event, context);
    alexa.APP_ID = APP_ID;

var handlers = {
    'LaunchRequest': function () {
    'GetNewFactIntent': function () {
    'GetFact': function () {
        // Get a random  food from the   list
        var factIndex = Math.floor(Math.random() * lines.length);
        var randomline = lines[factIndex];

        // Create speech output
        var speechOutput = randomline;

        this.emit(':tellWithCard', speechOutput, SKILL_NAME, randomline)
    'AMAZON.HelpIntent': function () {
        var speechOutput = "Say something like give me a food rich in iron";
        var reprompt = "Give me a food rich in iron";
        this.emit(':ask', speechOutput, reprompt);
    'AMAZON.CancelIntent': function () {
        this.emit(':tell', 'Goodbye!');
    'AMAZON.StopIntent': function () {
        this.emit(':tell', 'Goodbye!');



Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback


Similar projects you might like

Movie Quotes Trivia
  • 9
  • 1

Full instructions

Test your knowledge of great movies by matching five famous movies quotes. It will be great fun activities among famaly and friends.

Wise Quotes
  • 124
  • 3

Full instructions

More than 100 wise quotes to empower you everyday.

Wildlife Facts Skill
  • 48
  • 2

Learn more about wildlife animals with more than 200 interesting facts with this Alexa skill.

Compost Helper Alexa Skill
  • 144
  • 3

Use Alexa to find out if a household item can be added to your compost.

Ferrari Facts
  • 256
  • 4

Full instructions

learn about the most expensive cars in the world with Ferrari Facts you you will know some interesting facts that you probably didn't hear a

A Study in Gameful Thinking :: Gamification
  • 39
  • 1

Full instructions

Learn about gamification principles and current research associated with adoption of it.

Add projectSign up / Login