Skip to content
hookdeck avatar

Sendgrid Webhooks

Verified receiver and signature checker for SendGrid email event webhooks, with manual and SDK verification paths.

CCM score
50 of 100
skills.sh installs
253
GitHub stars
104
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers setting up SendGrid event webhook handlers and debugging ECDSA signature verification failures
  • Includes manual Node.js verification and @sendgrid/eventwebhook SDK examples, with a table of 10 event types (delivered, bounce, open, click, and others)
  • Requires the X-Twilio-Email-Event-Webhook-Signature and X-Twilio-Email-Event-Webhook-Timestamp headers and a raw request body before verifying
  • Designed for developers handling delivery tracking and engagement analytics, with local testing via the Hookdeck CLI

Install

$ npx -y skills add hookdeck/webhook-skills --skill sendgrid-webhooks -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

SendGrid Webhooks

When to Use This Skill

  • Setting up SendGrid webhook handlers for email delivery tracking
  • Debugging ECDSA signature verification failures
  • Processing email events (bounce, delivered, open, click, spam report)
  • Implementing email engagement analytics

Essential Code

Signature Verification (Manual)

SendGrid uses ECDSA (Elliptic Curve Digital Signature Algorithm) with public key verification.

// Node.js manual verification
const crypto = require('crypto');

function verifySignature(publicKey, payload, signature, timestamp) {
  // Decode the base64 signature
  const decodedSignature = Buffer.from(signature, 'base64');

  // Create the signed content
  const signedContent = timestamp + payload;

  // Create verifier
  const verifier = crypto.createVerify('sha256');
  verifier.update(signedContent);

  // Add PEM headers if not present
  let pemKey = publicKey;
  if (!pemKey.includes('BEGIN PUBLIC KEY')) {
    pemKey = `-----BEGIN PUBLIC KEY-----\n${publicKey}\n-----END PUBLIC KEY-----`;
  }

  // Verify the signature
  return verifier.verify(pemKey, decodedSignature);
}

Details

Repository
github.com/hookdeck/webhook-skills
Categories
Backend & APIs, Email & Messaging
First seen
Jun 3, 2026

Questions

What does the sendgrid-webhooks skill do?

It helps an agent receive SendGrid webhooks and verify their ECDSA signatures using the X-Twilio-Email-Event-Webhook-Signature and Timestamp headers. It also covers handling email delivery events such as bounce, delivered, open, click, spam report and unsubscribe.

How do I install the sendgrid-webhooks skill?

Run npx -y skills add hookdeck/webhook-skills --skill sendgrid-webhooks -y in your project. The skill then gives your agent SendGrid handler and signature verification guidance.

What does the skill need to verify SendGrid webhooks?

It needs your SendGrid webhook verification key, stored in the SENDGRID_WEBHOOK_VERIFICATION_KEY environment variable. For local testing, the skill suggests the Hookdeck CLI, which needs no account.

Which other skills are in the same category as sendgrid-webhooks?

Other skills in Backend & APIs include entra-app-registration, neon, firebase-basics, firebase-auth-basics and workers-best-practices. This skill focuses on SendGrid email event webhooks, covering signature checks and event types.

More from hookdeck/webhook-skills

All 7

Similar to Sendgrid Webhooks

More Backend & APIs