Make an API Call from an Alexa Skill and Action on Google
No Alexa Skill or Action on Google lives in the vacuum. The more exciting voice application you have in mind, the more likely it is that you need to request some external data.
Table of Contents
- What you’ll build
- Requesting Trello API key and Token
- Understanding Trello Rest API
- List the cards in the TODO column with GET
- Create a new card with POST
- Move a card from DOING to DONE with PUT
- Delete a card with DELETE
- Source Code
What you’ll build
Before we start building any Alexa Skill or Google action, it's a good idea to take a minute or two and write a sample dialogue first.
This dialogue depicts a happy path - when the interaction between a voice assistant and a user runs perfectly:
User: Hey Alexa / Google, open Task Manager
Assistant: Here is what you need to do today. [LIST OF TASKS]
User: Create a new task called "Walk the dog tonight".
Assistant: Creating a new task: "Walk the dog tonight".
User: Move the last task from TO DO into DOING.
Assistant: Moving "Walk the dog tonight" to "DOING".
User: Delete the last task from "DONE".
Assistant: Deleted "Record YouTube Video" from "DONE"
The cool thing is, the voice application we're building interacts with the Trello API. Moreover, you can see the results of your voice commands on your screen - in your Trello board.