Inspiration

Alexa has become a big part of my evening and weekend routine. I use Alexa to create reminders, add things to my shopping list, and set timers. Unfortunately, Alexa isn't as useful on days that I work from home. I use Microsoft Outlook to manage my work calendar, and Alexa doesn't integrate and function in the way I need it ("her"?) to. Alexa can access Outlook calendars; she just doesn't function in an efficient manner. For example:

  • I often want to know when my next meeting is (in an hour, it started 10 minutes ago, at 2pm, etc). Alexa will tell me my next 4 meeting events, and will pull in "day-long" events. While that is helpful, it's too long of a response and doesn't address my specific question ("when is my next meeting")
  • When I am running late for a meeting, I often want to tell the attendees that I'm running late. Alexa can't do that.
  • Even though Alexa has access to my calendar, she can't remind me of upcoming birthdays of my contacts.

So, I decided to build a skill that addresses some of those concerns

What it does

Appointment Assistant enhances Alexa's integration with Outlook Calendars to:

  • Tell me the time of my next meeting (it started 5 mins ago, in 20 mins, at 8:30 am tomorrow)
  • Cancel or decline my next meeting
  • Tell the attendees (or meeting organizer) of my next meeting that I am running late
  • Remind me of upcoming birthdays (The skill looks at my Outlook contacts to determine if there are any upcoming birthdays. The skill will remind me to give the contact a call or send an email. The skill offers to add a reminder to my Outlook Tasks).

Note: The skill normally closes the request after the information is provided; however when a meeting start time is plus/minus 10 mins from the current time, Alexa will ask "anything else?". I do this in order to allow users to - (a) tell meeting attendees that they are late or (b) decline the meeting - without opening the skill again.

What it doesn't do

There are some things that Alexa and Outlook arean't great use cases for. I didn't want to get into reading or sending emails (faster on a computer or phone) or sending messages to my contacts (fuzzy search to match the requested name to the contact still has a way to go).

In addition, I originally planned to build a skill that handled both calendar events and creation of tasks, but decided that it broke the "do one thing really well" rule.

How I built it

The skill leverages a number of AWS services:

  • Lambda (execution logic/code)
  • DynamoDB (session management)
  • S3 (image storage)

In addition, I use the following libraries/APIs:

  • Microsoft Graph API - this provides access to the Microsoft Outlook Calendar, Task, User Mailbox (needed for time zone information) and email with one library
  • Moment and Moment.Timezone - used for time management calculations (the skill behaves differently if the next meeting has already started, versus it starting in 30 mins, versus if it starts tomorrow).
  • Microsoft Azure Atlas API - Converts Microsoft Timezone IDs to IANA Timezone IDs (explained more in the "challenges" section.

Challenges I ran into

Finding the right name I really struggled to find a name that represented what the skill does. I originality called it "My Executive Assistant", but quickly realized that the name didn't reflect what the skill does (or rather what, it does not do - like take messages, order lunch, schedule meetings, buy anniversary gifts, etc).

Finding a good name was additionally impacted by the functionality - my skill, very simply, tells you when your next meeting is (and does a few things based on that information). The word "calendar" will usually activate the Alexa calendar function. "Next" is used to advance a playing track. So, I had to play around with a number of word and phrase combinations before landing on an invocation name that accurately described the skill and was easily activated.

Timezones I needed to understand the time zone of the user to accurately provide the start time for upcoming meetings. Outlook provides timezone information - unfortunately this information is provided in the Microsoft timezone format, instead of the IANA Timezone format (needed for libraries like moment.js for time comparison). Microsoft provides an API that translates MS Timezone ID to IANA Timezone ID, so the only challenge was integrating to the API (which requires you to sign up for the MS Azure cloud service).

SPAM/Disabling Account During Certification My test Outlook.com account was suspended during certification testing due to the number of email messages being sent out (to test the "I'm running late" functionality). Luckily, I was able to explain the problem to the certification team! A few years ago, it would have taken weeks to communicate and resolve the problem.

Accomplishments that I'm proud of

When I work from home, I use this skill every few hours... so if nothing else, I am getting a lot out of it!

What I learned

I learn a little more each time I build a skill. This was the first skill with Account Linking that I've built in a while. My first attempts were admittedly "kludgey"; I believe I implemented linking in a much more natural way for this skill. In addition, I think I found a good balance between driving a "voice first" point of view, and still enhancing the experience for those with an Echo Show or Echo Dot.

What's next for Appointment Assistant (and other Work from Home applications)

  • I could see this being a suite of Outlook Virtual Assistant applications - add my Outlook task, change my Skype availability, etc
  • I'd like to offer notifications - but only when the user requests it, and only for the "next meeting". For example, I often look at my calendar, realize that I have 10 mins before my next conference call, and I start working on something else. Then, I realize 15 minutes have gone by and I'm now late for the call. I'd like to give a user the ability for to set a notification to be reminded at the meeting start time (if the meeting is in 30 mins). I'm hoping to get into the Notifications beta to implement this functionality.
  • I only look for birthdays, but I may expand to look for anniversaries as well.

Built With

Share this project:
×

Updates