Sending a Notification to Alexa when Netlify Builds Your Site
Tags: webdev
Published: 2019-09-20 19:44:50

---
title: Sending a Notification to Alexa when Netlify Builds Your Site
published: true
tags: webdev
canonical_url: https://www.raymondcamden.com/2019/09/20/sending-a-notification-to-alexa-when-netlify-builds-your-site
cover_image: https://static.raymondcamden.com/images/banners/zerohearts.jpg
---

This will be a quick post and credit for the idea goes to [Stacey Higgenbotham](https://staceyoniot.com/how-to-trigger-custom-alexa-notifications-from-a-smart-home-event/) and her post from last year, [“How to trigger custom Alexa notifications from a smart home event”](https://staceyoniot.com/how-to-trigger-custom-alexa-notifications-from-a-smart-home-event/).

In her post, she describes how to use the [Notify Me](https://www.amazon.com/Thomptronics-Notify-Me/dp/B07BB2FYFS/ref=sr_1_1) skill on Alexa to allow for custom notifications. When you add the “Notify Me” skill to Alexa, you get an email with a unique access code. You can then head over to the web site, [https://www.thomptronics.com/about/notify-me](https://www.thomptronics.com/about/notify-me), and check out the docs. At the simplest level, you can just hit a URL like so:

https://api.notifymyecho.com/v1/NotifyMe?notification=Hello%20World!&accessCode=ACCESS\_CODE

That’s the entire API, seriously. You can pass an additional title attribute and the API is flexible in terms of accepting GET, POST, or PUT. Here’s an example of how it looks on my Echo Spot.

![Example of Alexa notification being shown](https://static.raymondcamden.com/images/2019/09/notification1.png)

In this case, the text of the notification is not visible, just the title, but if I ask her for my notifications, I’ll hear the full text.

Given that you’ve enabled the skill and gotten your access code, then how would you set it up to get notifications on builds?

Log in to Netlify, go to your site, Settings, “Build & deploy”, and then finally “Deploy notifications”:

![Netlify's list of notifications](https://static.raymondcamden.com/images/2019/09/notification2.png)

Click the “Add notification” button and select “Outgoing webhook”:

![Menu for notification optins](https://static.raymondcamden.com/images/2019/09/notification3.png)

First figure out what you want to be notified on, most likely “Deploy succeeded”, and in the URL enter the URL in the form I shared above. Perhaps something like this:

```
https://api.notifymyecho.com/v1/NotifyMe?notification=Build%20Done&title=Build%20Done!&accessCode=ACCESS_CODE

```

Remember that only the title will be visible, but you could include more information in the notification part to provide context, perhaps the name of the site that was deployed.

![Example webhook value](https://static.raymondcamden.com/images/2019/09/notification4.png)

And that’s it! If you want you can go to the “Deploys” menu and hit “Trigger deploy” to force a new build. I wish there was a bit more control over the UI of the notification, but for a free service I’ll take it.

_Header photo by [Prateek Katyal](https://unsplash.com/@prateekkatyal?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on Unsplash_