Background:
Who doesn’t like pictures of cute animals? This skill allows you to get any type of cute animal pictures to be sent to yourself through Alexa!
Inspiration:
I actually got inspired to make this Skill because one of my Facebook friends would always posts statuses like:
"Can people send me some cute animal pictures to help brighten my day"
This led me to creating my Skill, Daily Cutiemals.
How it Works:
You may say something like:
Alexa, ask Daily Cutiemals to send me a cute cat picture
or
Alexa, ask Daily Cutiemals to send me an adorable ferret picture
.
Alexa will first check if you have a verified email registered.
- If you have no email registered, Alexa will lead you through the process of registering an email address.
- If you have an unverified email, Alexa will send you an authentication token that you will need to repeat back to her. Afterwards, you may use the one-shot model to ask Alexa for some cute animal pictures!
- If you have a verified email, Alexa will then attempt to find you a picture of what you asked for and send it to your email.
The Code:
If it is your first time using this Skill, you will need to set up your email. Your email is stored using Amazon DynamoDB, and your Amazon Echo Device’s unique Key
which is used to reference your email.
I have also implemented my own authentication system in which you will be sent a code that you must repeat back to Alexa. This is the prevent people from signing up an email address that does not belong to them. There is also a limit to how many times you can resend the authentication in order to prevent spam. Once you have verified your email, you will never have to do it again, all your information is saved in DynamoDB.
Sending the pictures uses ES6 fetches/promises
in order to interact with the Flickr API. It uses your query keywords {adjective} {animal} to hit the API and find an image link for you. It will then embed your link into an email template which will then be sent to you through Sendgrid.
Also in complience with the CAN-SPAM Act I have added an unsubscribe button to all emails using Amazon API Gateway.
Where to Find:
It has been certified and can be found under Alexa Skills by typing in Daily Cutiemals.
Comments