RSS Feeds are a great way to get live updates on news or weather. It’s easy to integrate them into custom Alexa Skills.

 

  1. Find a link to the RSS feed you’d like to use. I’m using http://rss.cnn.com/rss/edition.rss for major news updates.
  2. Visit https://rss2json.com/ and paste the link of your RSS feed where prompted and click ‘convert’.
  3. Copy the link next to API call. Ours is: https://api.rss2json.com/v1/api.json?rss_url=http%3A%2F%2Frss.cnn.com%2Frss%2Fedition.rss
  4. Open up your project in Storyline, and where you want Alexa to say the headlines, select ‘add JSON API Request’ in the bottom right corner of the block editor window.
  5. The request title can be anything – it’s for your reference. I’m naming mine ‘headlines’.
  6. In the URL box, paste the link we copied (https://api.rss2json.com/v1/api.json?rss_url=http%3A%2F%2Frss.cnn.com%2Frss%2Fedition.rss)
  7. Now, we need to choose what information we want to get. I recommend downloading the chrome extension called ‘Beautify JSON’ to do this step.
  8. Go to the API link. You’ll see something like this: You can see it is formatted as:
    status
    feed
    url
    title
    link
    author
    description
    image
    items
    title
    pubDate
    link
    etc.

    To make our API request, we need to give the computer directions to the information. I want to get the ‘title’ information, where it says ‘Erodogan decla…’. The first paths our computer can choose to take are ‘status’, ‘feed’, and ‘items’. Since our information is under the items category, our first direction will be ‘items’. So far, our API request is ‘headline=items’. Then, the next categories to choose from are ‘title’, ‘pubDate’ etc. We want the ‘title’ so our API request is now ‘headline=items.title’. However, this won’t work. If you scroll further down the JSON file, you’ll see there’s lots of titles that we can choose. So, we need to specify that it’s the first item we want. To do this, our API request becomes ‘headline=items.0.title’ (computers count from 0, not 1).

    Now, we just need to get Alexa to play back the information she got. We saved the information as ‘headline’ so we’re going to create a new Alexa Statement block which contains {{headline}}. Use {{xxx}} to play a variable. ‘Headline’ is our variable. The variable playback must be in the same block as the API request.

    And that’s it!

Categories: BuildRSS Feeds

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.