Thanksgiving is just few days away and the theme for MLH's this weekend hackathon was a project to show gratitude. I was interested in building a project to show gratitude and say thanks. I recently learned to build Alexa skills with Voiceflow, so I decided to build an Alexa skill to say thanks.

What it does

Thank In Return is an Alexa skill to generate a personalized poem and send it to the person. You can get started by saying "Alexa, open Thank In Return" (But not yet available in the Alexa Skill Store). Then you are asked the name of the person for whom you are creating the poem. After you say the name you are asked for why he/she is a blessing, what he/she did to you, what did you achieve because of him/her. After you give these details and Thanksgiving poem is created. The poem would be said by a different voice (Not Alexa's) which sounds emotional and the poem will remind of that person.

Then you have the option to send the poem as a text message (SMS) to the relevant person. You need to tell the phone number of the person and the text message will automatically be sent to the relevant person with a - "From {yourname}" tag too.

How I built it

This Alexa skill was built using Voiceflow.

The user's name is requested by a permission. Then the receiver's name is asked by the user. And few more details about what he/she has done to you is asked. Using all these details a personalized poem is generated. This is done by the use of custom code (JavaScript) within Voiceflow.

The use of other voices except for Alexa's is offered by Voiceflow, so such a voice is used to sing the poem.

Then the phone number of the receiver is asked. Using the Twilio API the generated poem is sent to the receiver.

The APL (interface of Echo Show devices) was created using the Alexa Developer Console's Multi-media response developing platform.

Challenges I ran into

Some of the challenges I faced were:

  1. The creation of the poem. After the details are requested the poem has to be created. Then this created poem had to saved as a separate variable which will be used later to be sent as a text message.

  2. Voice to sing the poem Alexa's voice was not the best voice for a poem. It was fast and it didn't sound as a poem. After experimenting with different voices I found another female voice which was great to sing a poem.

  3. Sending the message. Firstly, I experimented with Sendgrid to send an email to the receiver. It failed as the integration didn't work properly. Then I tried a zapier integration, it too failed because Voiceflow allows only 1 variable to be taken to zapier. But I need the body of the message and the receiver's email, so it failed too. Finally I tried out Twilio text messages and it worked. But there were issues with it too and I got the help of a mentor and solved it.

Accomplishments that I am proud of

I am really proud of successfully building the feature to send a text message. I've never worked with sending text messages like this.

I am also proud of the Thank In Return skill, as it is a great Alexa skill that matches the coming-up event Thanksgiving.

What I learned

I learned to build a message generator using Javascript. Also I learned to send text messages simply with Twilio.

What's next for Thank In Return

Today itself I will submit this skill for certification to the Alexa skill store. I hope it'll be available in the skill store before the 26th (Thanksgiving day). In the future I hope to add more personalization and more messages.

Built With

Share this project: