Skip to main content
Hosting

Get phone alerts when your Netlify build fails

Hugin Alerts sends you a push notification within seconds of a Netlify build failure or deploy completion. Know your site broke before a visitor hits a 404 — no dashboard checking required.

Last updated:

What you can monitor with Netlify

Deploy succeeded or failed
Build failures and timeouts
Form submissions
Serverless function errors
Plugin build errors
Split testing events

Setup guide

Get started in minutes

1

How Netlify notifications work

Netlify has two ways to notify external services about events: outgoing webhooks (configured in the Netlify UI for deploy events) and post-build scripts (custom commands that run after your build). Both send HTTP requests — you just need somewhere useful to send them.

2

Get a notification endpoint from Hugin Alerts

Hugin Alerts is a service that takes an HTTP request and delivers it as a push notification to your phone. Install the app and tap "Get started" — you get a unique ingest key immediately. No sign-up, no email, no credit card.

3

Configure a post-build notification

The simplest approach is to add a post-build command in your netlify.toml that sends the result to Hugin Alerts.

toml
# netlify.toml
[build]
  command = "npm run build && node notify-hugin.mjs"
  publish = "dist"

[build.environment]
  HUGIN_KEY = ""  # Set this in Netlify UI, not here
4

Create the notification script

A simple script that checks if this is a production deploy and sends the result to your phone.

javascript
// notify-hugin.mjs
const HUGIN_KEY = process.env.HUGIN_KEY;
const CONTEXT = process.env.CONTEXT || 'unknown'; // production, deploy-preview, branch-deploy
const URL = process.env.DEPLOY_PRIME_URL || process.env.URL || '';
const COMMIT_REF = process.env.COMMIT_REF || '';

if (HUGIN_KEY && CONTEXT === 'production') {
  await fetch('https://api.huginalerts.com/v1/events', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${HUGIN_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      system: 'netlify',
      event: 'deploy_success',
      description: `Deployed to production — ${URL} (${COMMIT_REF.slice(0, 7)})`,
    }),
  });
}

Examples

Ready-to-use examples

Deploy success notification

Get notified when your Netlify site is live.

bash
curl -X POST https://api.huginalerts.com/v1/events \
  -H "Authorization: Bearer YOUR_INGEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "system": "netlify",
    "event": "deploy_success",
    "description": "Deployed to production — mysite.netlify.app (abc1234)"
  }'

Build failure notification

Know immediately when your Netlify build breaks.

bash
curl -X POST https://api.huginalerts.com/v1/events \
  -H "Authorization: Bearer YOUR_INGEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "system": "netlify",
    "event": "build_failed",
    "description": "Build failed — Module not found: @/components/Header"
  }'

Form submission notification

Get alerted when someone submits a form on your Netlify site.

bash
curl -X POST https://api.huginalerts.com/v1/events \
  -H "Authorization: Bearer YOUR_INGEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "system": "netlify",
    "event": "form_submission",
    "description": "New contact form submission from john@example.com"
  }'

Frequently asked questions

How do I get push notifications when my Netlify build fails?
Use Hugin Alerts. Add a post-build script to your project that sends an HTTP POST to the Hugin API. When your build completes, you get an instant push notification on your iPhone or Android. Setup takes under 60 seconds — no account required.
Can I use Netlify's built-in outgoing webhooks directly?
Netlify's outgoing webhooks send their own payload format and don't support custom Authorization headers. Use the post-build script approach for the simplest integration, or set up a lightweight proxy endpoint to transform Netlify's webhook payload.
Does this work with Netlify Functions?
Yes. You can call the Hugin API from Netlify Functions just like any other HTTP request. This is useful for sending notifications from serverless functions that process form submissions or handle API requests.
How do I only get notified for production deploys on Netlify?
Check the CONTEXT environment variable. Netlify sets it to 'production', 'deploy-preview', or 'branch-deploy'. The example script above only sends notifications for production deployments.
Can I get notified about Netlify form submissions on my phone?
Yes. Use a Netlify Function triggered by form submissions to forward the event to the Hugin API. You'll get a push notification within seconds of someone submitting a form on your site.
Does this work with Astro, Hugo, and other static site generators?
Yes. The post-build script approach works with any framework deployed on Netlify — Astro, Hugo, Gatsby, Eleventy, Next.js, or plain HTML. The notification is just a standard HTTP request that runs after your build command.
What is Hugin Alerts?
Hugin Alerts is a push notification service for developers. Send one HTTP request from any system — Netlify builds, CI/CD, cron jobs, scripts — and get an instant push notification on your phone. No sign-up, no email, no credit card. Free during early access.

Start getting Netlify alerts now

Set up takes less than a minute. No sign-up, no email, no credit card.

Get started for free