Blog

Simple and Powerful - the Alexa Flash Briefing Skill API

I have had a Amazon Echo for a few months now and I really love it! I agree that it will likely become the operating system of the home - there are just so many services that are easily controllable through voice (at least for the most common use cases) and having them readily available in your home without the need to search for your phone or open your laptop will surely change how people use these services in the years and decades to come.

Since I bought the Echo, I wanted to write a Skill for Alexa myself. Then I stumbled upon the news that the Alexa Flash Briefing Skill API became available in the UK and Germany on March 28, 2017. Flash Briefing Skills are a group of Skills that can be activated by Alexa users for their Flash Briefing, a customizable news update that Alexa reads to you when you ask her "Alexa, what's new?" (and it has some other triggers as well of course).

Simplicity

Creating a Flash Briefing Skill is quite simply as it turns out - it's just a JSON feed (in a specific format) with the items that should be read by Alexa. You can then add the Skill in the Amazon Developer Services portal and immediately test it on your own Alexa device by activating it in the Flash Briefing section in your Alexa mobile app. Once you're happy with the result, you can add a description and some more info to the Skill and submit it for verification, which only took one day in my case. After that your Skill is live for all everyone to use.

When first browsing the available Flash Briefing Skills, I noticed that there was one for Gr├╝nderszene but none for Deutsche Startups (the two major startup websites in Germany). So after contacting the chief editor of Deutsche Startups to check whether I could use their content (Amazon explicitly mentions that you need permission to use the content that your Flash Briefing Skill supplies, if it's not your own) and he agreed, I sat down to figure out how to implement it.

Implementation

As I mentioned, the Skill is basically a JSON feed that contains the texts that Alexa reads out loud in the Flash Briefing. My first idea was to create a simple Sinatra with one endpoint for the feed, and a Rake task that could be called independently at regular intervals to fetch the latest content from Deutsche Startups and save it in a database. Then I noticed that even Sinatra is overkill for this task - since the feeds are static and don't depend on any input data from the request, I could simply store them on Amazon S3 and make them publicly accessible.

For calling the Rake task regularly I deployed it to Heroku and set up the Heroku Scheduler with a 10 minute interval.

The only costs this setup generates are a few cents a month for updating and serving the feeds from Amazon S3.

Conclusion

In the end it took only a few hours to set everything up and it worked flawlessly. You can find the source code on GitHub and the Skill on Amazon. Please try it out in your daily Flash Briefing and let me know what you think! If you find it useful, I'd be very happy about a positive review on Amazon.

Discuss this post on Hacker News

Ideas? Constructive criticism? Think I'm stupid? Let me know in the comments!