Voice User Interfaces (VUIs) like Alexa and Google Assistant are a powerful way to communicate with technology and are set to dominate the digital landscape in the next few years. With this in mind, the FX Digital R&D team thought about how an Alexa development can make communicating with people easier too, especially for those who struggle with screen accessibility.
Alexa has great built-in tools for live communication, such as conference calling and video chat with the Echo Show, but it doesn’t have a popular solution for interacting with existing communication channels – notably email. As a business, we use Google’s GSuite platform for our emails, so we set about creating a Gmail Alexa Skill.
One important aspect of creating a great voice experience, is ensuring the app is clear and concise.
From an early stage, we decided that the Gmail Alexa Skill should be able to perform the most common of email-related tasks: check a user’s inbox for any unread emails, notify the user of the email’s contents and give a set of operations that can be performed on the emails.
The screen on the Echo Show and Echo Spot devices helps to give users more information, but interactions with Alexa should be considered “voice first” – a user shouldn’t be expected to tap a screen if they are using the far-field microphones installed on Echo devices. It defeats the object.
Helping Users with the Gmail Alexa Skill
Contextual help was a must. This is where the user can trigger the
AMAZON.HelpIntent by saying ‘help’, ‘help me’ etc. The skill will respond with useful information about what utterances can successfully be employed, based on the current context.
For example, Alexa would give different advice after reading out the snippet of an email, compared to informing the user of the number of unread emails they have. Providing help to users is a requirement as per Amazon’s checklist for skill certification.
Calling external APIs helps create a rich and meaningful user experience for voice skills. However, since voice users expect answers immediately, API calls need to be quick, considered and, sometimes, cached.
Since the FX Digital team are proficient PHP developers, we decided to use this language to create the My Emails skill, instead of the popular Node.js language. Google has recently launched a PHP SDK for their API platform and, initially we decided to use it. However, upon testing, this solution was too heavy (and unnecessary) as API calls to some user’s inboxes would take too long, detracting from the actual voice experience. Instead, we decided to use native HTTP integration to Google’s API endpoints. These require the use of an OAuth authorization token given to us by Alexa once the user links their Amazon account to their Gmail account, which is within the scope of our skill.
User of the My Emails Gmail Alexa Skill are able to check email while carrying out other tasks, like cooking or typing. Or dancing. And initial testing shows more unwanted messages are being maked as spam thanks to the skill’s ability to respond to users saying, “Alexa, that’s spam”, while an email is being read out.
The fact we chose not to allow the My Emails skill to delete email, means that marking an email as spam is the only way to remove it from the inbox. When Alexa reads out the emails, it also gives spam emails the same importance weighting as other emails.
As with any software, Alexa Skills can be updated with new features, security enhancements, and improved functionality.
We have options on how we can improve the My Emails skill in the future. For instance, we could allow users to send a quick reply to emails, or sign up to Google Cloud’s notification service to forward new email alerts to Alexa. If you have any ideas yourself, we’d love to hear from you. Email us at firstname.lastname@example.org.
To get started, simply enable the skill and link your Google account. Once setup, just say, “Alexa, open my emails”, to hear the contents of your inbox.
Alexa will navigate you around your unread emails, and ask if you would like to do anything with them. You can mark emails with a flag (also called starred in Gmail), put them in your spam folder, or ask for them to be left unread. When Alexa has read out a snippet of an email, that email will be marked as read in your inbox. We’ll never delete any of your emails.
When enabling the Alexa Skill, you’re asked to sign in and link the skill to your Google account. When this is complete, Google gives us an authorization token that we can use to read your emails in your inbox.
We don’t collect or store your email data in persistent memory. Instead we transform responses from Google’s API (containing information about your unread emails) and forward it on in a format that Alexa understands.
Amazon provides developers anonymised analytics data about the skill usage. This doesn’t contain any account-specific content and we cannot use this to identify users of the skill.
Processing Your Data
As mentioned, we only transform email data received from Google into a format that Alexa understands. Web-based programming languages help us do this. We don’t apply any algorithms to and certainly don’t use this to serve you ads.
The data provided to us from Google comes after you agree to link your account. You can also remove our access by revoking our app access.
Apart from sharing data from your Gmail account to the Alexa platform (your Echo device) and the people within earshot of the speaker, we don’t share your personal, or email data, with anyone – that would be evil, and we certainly don’t use the data to serve you targeted ads.
Authenticate the Skill with your Gmail Account
Our Voice Apps
Surge Radio is the University of Southampton’s student radio and has been operating from Southampton since 1976. We created an Amazon Alexa skill so users can stream Surge’s live content…
Leeds Parking Spaces
Leeds Parking Spaces is an Amazon Alexa Skill developed by FX using Open Data to help users find the best places to park in and around Leeds city.
An Amazon Alexa game skill developed with support for the Echo buttons. Race friends and family through word memory, trivia, and mind puzzle challenges to be the ultimate champion. After…