REST API Tutorials

Build an Alexa Flight Departure Time Skill [TUTORIAL]

We’ve all been there. You *think* your flight is on time. But sure enough, by the time you get to the airport, you find that it’s been delayed for hours.

Source: GIPHY

What if you could ask Alexa about your flight status before heading out the door? We built a skill that connects Alexa to the Laminar Flight API so that you can ask Alexa the status of your flight. Even better? We created a video tutorial that walks you through every step of the process. Check out the video tutorial below or visit our GitHub to see the code.

This video tutorial will go through…

  1. Adding the departure time skill to Amazon Alexa
  2. Creating the skill’s backend in AWS Lambda
  3. Connecting Alexa to the Laminar Flight API using RapidAPI

The result

The end result will look something like this…

What you’ll need:

  • Amazon Echo device
  • Amazon account

Let the hacking begin! Watch the tutorial below, follow along on GitHub and feel free to leave any questions in the comments.

Feeling inspired?

One Alexa skill is never enough. Here are other project ideas that you could build by connecting to RapidAPI:

Let us know what you come up with and happy hacking.

4.8/5 - (37 votes)

View Comments

  • Hi David, really helpful tutorial. I was trying to build a skill for events using the Ticketmaster API on RapidAPI. I was having trouble parsing the responses. I receive an error:

    TypeError: Cannot read property 'name' of undefined
    at Object.EventHub.rapid.call.on [as success] (/var/task/index.js:25:41)
    at Request.e [as _callback] (/var/task/node_modules/rapidapi-connect/index.js:90:46)

    The error refers to the var eventName line in the index.js code below. I have tried but am having trouble parsing the response. It seems that the callback is successful but it cannot access the slots. Any ideas?

    var Alexa = require('alexa-sdk');
    const RapidAPI = new require('rapidapi-connect');
    const rapid = new RapidAPI('EventHub', '####');

    var handlers = {
    'LaunchRequest': function() {
    this.emit(':ask', 'Welcome to Event Hub. Ask something like, find rock concerts near Seattle');
    },

    'EventHub': function() {
    var keyword = this.event.request.intent.slots.keyword.value;
    //var region = this.event.request.Events.slots.Region.value;

    rapid.call('Ticketmaster', 'searchEvents', {
    'apiKey': '####',
    'keyword': keyword

    }).on ('success', (payload) => {
    //console.log(payload);
    var eventList = payload[0]["_embedded"]["events"];
    this.emit(':tell', 'Listing 5 most recents events for ' + keyword);

    for (var i = 0; i {
    this.emit(':tell', 'Sorry, there was an error finding the event.');
    });
    }
    };

    exports.handler = function(event, context, callback) {
    var alexa = Alexa.handler(event, context);
    alexa.appId = "####";
    alexa.registerHandlers(handlers);
    alexa.execute();
    };

Share
Published by

Recent Posts

Power Up Your Enterprise Hub: New March Release Boosts Admin Capabilities and Streamlines Integrations

We're thrilled to announce the latest update to the Rapid Enterprise API Hub (version 2024.3)!…

2 weeks ago

Unveiling User Intent: How Search Term Insights Can Empower Your Enterprise API Hub

Are you curious about what your API consumers are searching for? Is your Hub effectively…

3 weeks ago

Rapid Enterprise API Hub Levels Up Custom Branding, Monetization, and Management in February Release

The RapidAPI team is excited to announce the February 2024 update (version 2024.2) for the…

1 month ago

Supercharge Your Enterprise Hub with January’s Release: Search Insights, Login Flexibility, and More!

This January's release brings exciting features and improvements designed to empower you and your developers.…

3 months ago

Enhanced Functionality and Improved User Experience with the Rapid API Enterprise Hub November 2023 Release

Rapid API is committed to providing its users with the best possible experience, and the…

5 months ago

The Power of Supporting Multiple API Gateways in an API Marketplace Platform

In today's fast-paced digital world, APIs (Application Programming Interfaces) have become the backbone of modern…

6 months ago