hookdeck avatar

Sendgrid Webhooks

Handles SendGrid webhook verification and event processing, which is trickier than most webhook implementations because it uses ECDSA signature verification instead of simple HMAC. You get manual verification code and SDK examples for validating those X-Twilio-Email-Event-Webhook headers, plus a reference table of all the event types (delivered, bounce, open, click, spam report). The verification.md doc is worth reading since ECDSA has gotchas around key formatting. Built by Hookdeck, so it includes their CLI for local testing. Useful if you're building email engagement tracking or need to debug why signatures keep failing.

skills.sh installs
253
GitHub stars
100
last updated
Aug 21, 2026

Install

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

Installs into .claude/skills of the current project.

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);
}

Sponsors

Details

Repository
github.com/hookdeck/webhook-skills
Category
Debugging
First seen
Jun 3, 2026

More from hookdeck/webhook-skills

All 7

Recommended

More Debugging
1rysweet avatarengineer-analystrysweet/amplihackAnalyzes technical systems and problems through engineering lens using first principles, systems thinking, design methodologies, and optimization frameworks. Pr249skills.sh installs
2jwilger avatarmemory-protocoljwilger/agent-skillsPersistent cross-session memory using Memento MCP knowledge graph (mcp__memento__* tools). Recall-before-acting: search memory before starting tasks, on errors,248skills.sh installs
3itsmostafa avatarcloudwatchitsmostafa/aws-agent-skillsAWS CloudWatch monitoring for logs, metrics, alarms, and dashboards. Use when setting up monitoring, creating alarms, querying logs with Insights, configuring m245skills.sh installs
4jdrhyne avatargscjdrhyne/agent-skillsQuery Google Search Console for SEO data - search queries, top pages, CTR opportunities, URL inspection, and sitemaps. Use when analyzing search performance, fi244skills.sh installs
5borghei avatarseo-specialistborghei/claude-skillsSEO covering technical SEO, content optimization, link building, keyword research, and search analytics. Use when auditing technical SEO, researching keywords, 242skills.sh installs
6nuxt-modules avatarmanage-mcpnuxt-modules/mcp-toolkitManage MCP servers in Nuxt with @nuxtjs/mcp-toolkit — setup, create tools/resources/prompts, organize with handlers, build interactive MCP Apps, add elicitation240skills.sh installs