• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
jamiedubs

jamiedubs

vercelAlertToDiscord

WIP! pipe alerts from new Vercel Alerts to Discord channel
Public
Like
1
vercelAlertToDiscord
Home
Code
2
README.md
H
index.ts
Branches
1
Pull requests
Remixes
History
Environment variables
1
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
index.ts
https://jamiedubs--cce1c488a3e111f0b8380224a6c84d84.web.val.run
README.md

Vercel to Discord Webhook

A webhook handler that receives Vercel alerts and posts them as detailed, formatted messages to a Discord channel.

Setup

  1. Environment Variable: Set DISCORD_WEBHOOK_URL to your Discord webhook URL

    • In Discord: Server Settings → Integrations → Webhooks → Create Webhook
    • Copy the webhook URL and add it as an environment variable
  2. Vercel Configuration:

    • Go to your Vercel project settings
    • Navigate to Webhooks section
    • Add this Val's HTTP endpoint as a webhook URL
    • Select the events you want to monitor (e.g., deployment alerts, usage anomalies)

Features

  • ✅ Handles Vercel webhook payloads with proper nested data extraction
  • ✅ Rich Discord embeds with comprehensive error information
  • ✅ Shows critical metrics: error rates, request counts, route details
  • ✅ Clickable links to Vercel project, team, and observability dashboard
  • ✅ Color-coded alerts:
    • 🟡 Yellow for anomalies and warnings
    • 🔴 Red for errors and failures
    • 🔵 Blue for general alerts
  • ✅ Statistical information (Z-scores, averages, standard deviation)
  • ✅ Complete raw payload for debugging

Alert Information Displayed

For error anomaly alerts, the webhook shows:

  • Project and Team: With clickable links to Vercel dashboard
  • Error Details: Route, status group (5xx, 4xx, etc.), error rates
  • Metrics: Current vs average error rates, change amounts
  • Statistics: Z-scores, averages, standard deviations
  • Timing: When the alert started (formatted as Discord timestamp)
  • Direct Links: To Vercel observability dashboard for detailed analysis

Supported Alert Types

  • observability.anomaly-error - Error rate anomalies (5xx, 4xx status codes)
  • usage_anomaly - Unusual usage patterns
  • And other Vercel alert types

Example Discord Message

The webhook creates rich Discord embeds with:

  • Alert title showing the specific issue and project name
  • Detailed description with error rates and metrics
  • Organized fields showing project info, routes, and statistics
  • Direct links to Vercel dashboards for immediate investigation
  • Complete raw payload for debugging purposes
HTTP
  • index.ts
    jamiedubs--cc…84.web.val.run
Code
README.md
H
index.ts
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.