Inspiration
If I have a good start of the day I usually have a great day ahead. And what would be better than Alexa giving a new compliment everyday? And how cool would it be to tweet about it and tag my followers as well? Which led to this Life Hack skill, called, Good Morning, Friends.
What it does
"You're funnier than me!" If Alexa says it to someone, it certainly is a compliment as all those who use Alexa are well aware that she is quite funny and unexpected. Her jokes cracks everyone up and they are suitable for all age groups. But how about Alexa giving the user a compliment?
That is exactly what this skill does. It generates a new compliment each time you greet Alexa with "Good Morning" and to extend the capabilities and share a good laugh with your followers on twitter, a user can tweet along with tags the same generated compliment!
How I built it
I have used Echo device's address to gather the current location of the echo device which is then used to gather the local time using google-timezone api. This is done so that, based on the current time, Alexa can generate an appropriate greeting (along with a compliment of course). I have also used http module to scrap a website from where compliments are being extracted.
A user can also login to twitter and let Alexa tweet the compliment, so, twitter api was also used in this project. I hosted twitter app on heroku for Oauth, that is how Alexa links twitter accounts.
Challenges I ran into
I had never used oauth before, so, this project helped me knowing how oauth works and how different accounts like facebook, twitter or google can be linked with Alexa.
Along with this, I had never expected getting user's local time would take this much of code. But as this is a crucial part of this skill, I had to understand how it could be done. Therefore, for the first time I have asked for user's personal information like device address. Consequently, I had to create a privacy policy as well. This was the first time that I had ever created a privacy policy for a skill.
Accomplishments that I'm proud of
Learning about the whole process of oauth was exhausting. There isn't much tutorial available for it on the web which made the task a bit tricky as I had never used oauth before for any kind of application. However, while developing this skill, I managed to use oauth for google, facebook and twitter (all three). Besides, I got to know more about asynchronous function calls and while searching for an elegant solution I got to know about axios module of npm. Now, I feel much more comfortable working with asynchronous functions as well.
I also got an opportunity to attend a few, yet quite beneficial, webinars hosted by Alexa professionals. This definitely helped me in knowing how a skill can be made better, which I tried to exercise in my skill as well.
What I learned
I had already developed a few skills but I had never made a skill for echo show. While creating this application I jumped from quite a few ideas which also included echo-show templates. This is what I will be integrating in the next update.
But as of now, I am glad to know the process of oauth. Oauth is an elegant way to link accounts which is supported by Alexa. To link twitter account, I had to use oauth, but the tricky part was hosting twitter app on heroku and linking it with Alexa. Apart from that, for better user experience I implemented the concept of fuzzy-string-matching so that the skill could make a best guess even if the name captured by the Alexa isn't 100% accurate.
What's next for Good Morning, Friends
In the next update, Good Morning, Friends will become suitable for echo devices with a screen. And as of now, only one person can be tagged to the post, that too from the follower's list only. In the upcoming version, user will be able to tag multiple followers. And in fact, the user will be able to tag others from the "following" list of twitter, as well.

Log in or sign up for Devpost to join the conversation.