Covid-19 Amazon Alexa Skill - Twiliohackathon
Tags: twiliohackathon
Published: 2020-04-28 16:30:55

[Comment]: # (All of this is placeholder text. Use this format or any other format of your choosing to best describe your project.)

[Reminder]: # (Make sure you've submitted the Twilio CodeExchange agreement: https://ahoy.twilio.com/code-exchange-community)

[Important]: # (By making a submission, you agree to the competition's terms: https://www.twilio.com/legal/twilio-dev-hackathon-terms)

## What I built
I built an Amazon Alexa skill to get information about coronavirus cases in India. You can ask it questions like 
- "How many cases are there?"
- "What's the current status in Maharashtra?"
- "What's the current number of cases in Uttar Pradesh?"

To get more details, you can ask
- "Give me additional information for India"
- "Tell me more details about Rajasthan".

#### Twilio API
I'm using Twilio's SMS API. Users may choose to receive an SMS containing links to resources on Covid-19 by giving the required permissions to the skill in their Alexa app settings and saying something like
- "Send me information about coronavirus"
- "Send me an SMS"
- "Send additional resources to me"

#### Category Submission: Exciting X-Factors

## Screenshots
<img width="350" height="630" src="https://raw.githubusercontent.com/InfernoCoder11/Covid-19-India-Alexa-Skill/master/Screenshots/conv0.png" />
<img width="350" height="630" src="https://raw.githubusercontent.com/InfernoCoder11/Covid-19-India-Alexa-Skill/master/Screenshots/conv1.png" />
<img width="350" height="630" src="https://raw.githubusercontent.com/InfernoCoder11/Covid-19-India-Alexa-Skill/master/Screenshots/sendSMS.png" />
<img width="350" height="630" src="https://raw.githubusercontent.com/InfernoCoder11/Covid-19-India-Alexa-Skill/master/Screenshots/SMS.jpg" />

## Demo Link
You can enable this skill on your Alexa device through this [beta testing link](https://skills-store.amazon.com/deeplink/tvt/2abaa6a6e112fc4f7739ce5662bfd18f9f400aa51295a817d9b5ca86ee91cc5aa3bad178e634fdcbb7a852cb94249e772aea02a2885c8fffe36a952b6387a1d104ab0c43ac97c97de50305f9d2936ee2f8db2eaafd9c5a585749c18614bfa4f9571effeb4932b925e00c95f1aef23a). Set the skill's language to English (US) or English (IN) according to the language to which your Alexa device is set. Please note that there is a problem in fetching phone numbers during beta testing. To test the SMS feature you'll have to build the skill yourself using the instructions given in the project's repository.

## Link to Code
{% github InfernoCoder11/Covid-19-India-Alexa-Skill %}

## The Journey
For a long time I couldn't decide on what to make for the hackathon. I would get an idea, then immediately discard it thinking it was too easy/too complicated. Finally, I decided that I would make whatever I thought of next. As they say, "The hardest part is starting".

I thought of making an Alexa skill that would give users information about the coronavirus pandemic and send emails related to it. Motivated by finally deciding what to make, I set out planning to use the [SendGrid](https://sendgrid.com/) API. Unfortunately, my account got blocked right after registration and so I had to drop the idea 🤷‍♂️.

Even though the issue was later resolved, I didn't want to lose any momentum, so I tweaked my idea to use [Twilio's SMS API](https://www.twilio.com/sms). It would send users a message containing links to trusted websites (like [WHO](https://www.who.int/) and [Ministry of Health and Family Welfare](https://www.mohfw.gov.in/)) having information about the pandemic.

Getting Twilio's SMS API up and running was surprisingly easy. I was all geared up to spend countless hours trying to get it to work as I felt that sending emails/SMS through code would be an intricate process. I was pleasantly surprised to find it working in the first attempt itself! (Nothing ever works for me in the first attempt 😜) 

On the flip side, using Amazon's Alexa documentation proved to be a nightmare as there was little to no documentation for Python unlike for Javascript. Trying to apply the JS docs to Python was not working. Though I felt that I made a mistake choosing Python to make the skill, I took it as a challenge. I was able to figure out stuff and in the end I was happy with the results.

I'm glad I participated in this hackathon since I learnt a lot of things I otherwise might have never learnt. The knowledge I gained through this project will surely come in handy for me.