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

Cryptocurrency Price Checker!
  • 147
  • 2

Full instructions

With the recent rise in cryptocurrencies, this Price Checker will keep you up to date with the most recent market fluctuations!

Smart Office Automation Using Raspberry Pi
  • 361
  • 1

Full instructions

We hope to show how you can easily automate your office or workplace with Prota OS with no skills and tailored specifically to your needs.

How to Add Alexa to a Raspberry Pi
  • 3,973
  • 28

Full instructions

Solution that allows turning any Linux-based device into an Amazon Echo.

Automation Using Amazon Echo Alexa and NodeMCU Without IFTTT
  • 673
  • 4


Control relays attached to NodeMCUs using Amazon Echo Alexa without IFTTT.

Trademark Master
  • 321
  • 10

Work in progress

Trademark Master tells you if any string has already been registered.

Opening Bell
  • 1,537
  • 23

Full instructions

A simple Alexa voice skill to retrieve the current performance of a publicly traded stock (NASDAQ, NYSE) using the company name.

Sign up / LoginProjectsPlatformsTopicsContestsLiveAppsBetaFree StoreBlog