In this tutorial we will create an Alexa skill to get weather information using the open weather map API.
Currently, if you wanted to create an Alexa skill that talks to an API, you need to write a custom lambda function using one of the supported languages (NodeJS, Python, or Java). This can be a tedious process. ApiToBot makes this simple and you can create your own Alexa skill in minutes without any coding.
Steps to create your own weather skill:
Login with your google account.
2. Create an application
Click on “Add App” and start filling out your app’s information.
3. Enter a welcome message
Users will hear this welcome message when your Alexa skill is triggered.
4 . Create an intent
Under “Intents”, click “Create Intent” to begin setup of your individual user interactions with your API. An intent represents an action that fulfills a user’s spoken request.
5. Enter user utterances
This intent will be triggered when a user utters these phrases.
6. Enter the weather API information
Enter details of the API which should be called when this intent is triggered by the user.
You can find the API doc of open weather map here.
7. Build the response returned to the user
This is how the actual API response looks:
We can use the content of the API response to build the response to the user. Using these functions, you can build a response similar to the one shown below.
Use the “Test Response” button to test the response the user will hear after a successful trigger of this intent.
9. Deploy the skill to Alexa:
If everything looks good, we can deploy the skill to Alexa.
Click on “Integrate with Alexa/Google Assistant”. Click “Alexa”. Login with your Amazon developer account and follow the steps shown.
Once your skill is deployed, you can test your skill from any of your Alexa devices.
If you have any questions please let us know at firstname.lastname@example.org.
10. Demo video: