
Webhooks
- 31 installs
- 61 repo stars
- Updated August 4, 2026
- joelhooks/joelclaw
Add and debug webhook providers in the joelclaw gateway, handling signature verification, payload normalization, and Inngest event routing.
About
Adds, debugs, and manages webhook providers in the joelclaw webhook gateway. A developer uses it to integrate a new webhook, debug signature failures, or verify delivery from external services.
- WebhookProvider interface with signature verification and payload normalization per provider
- Existing todoist/front/vercel/github providers plus an 8-step new-provider checklist
Webhooks by the numbers
- 31 all-time installs (skills.sh)
- Ranked #3,366 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/joelhooks/joelclaw --skill webhooksAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 31 |
|---|---|
| repo stars | ★ 61 |
| Last updated | August 4, 2026 |
| Repository | joelhooks/joelclaw ↗ |
What it does
Add and debug webhook providers in the joelclaw gateway, handling signature verification, payload normalization, and Inngest event routing.
Files
Webhook Gateway Operations
Manage the joelclaw webhook gateway — add providers, debug delivery, register with external services.
Architecture
External Service → Tailscale Funnel :443 → Worker :3111 → /webhooks/:provider
→ verifySignature() → normalizePayload() → (queue pilot or direct Inngest event) → notify function → gateway- ADR-0048: Webhook Gateway for External Service Integration
- Gateway skill: Use
gateway push/gateway testpatterns for delivery checks
Current Providers
| Provider | Events | Signature | Funnel URL |
|---|---|---|---|
| todoist | comment.added, task.completed, task.created | HMAC-SHA256 (x-todoist-hmac-sha256) | https://panda.tail7af24.ts.net/webhooks/todoist |
| front | message.received, message.sent, assignee.changed | HMAC-SHA1 (x-front-signature) | https://panda.tail7af24.ts.net/webhooks/front |
| vercel | deploy.succeeded, deploy.error, deploy.created, deploy.canceled | HMAC-SHA1 (x-vercel-signature) | https://panda.tail7af24.ts.net/webhooks/vercel |
| github | workflow_run.completed, package.published | HMAC-SHA256 (x-hub-signature-256) | https://panda.tail7af24.ts.net/webhooks/github |
Current ADR-0217 pilot note: when QUEUE_PILOTS=github, the webhook gateway enqueues normalized github/workflow_run.completed events into the shared Redis queue instead of posting them directly to Inngest. The Restate drainer then forwards the concrete event name github/workflow_run.completed. github/package.published still goes direct.
Adding a New Provider
See references/new-provider-checklist.md for the full 8-step checklist.
Quick summary: 1. Create providers/{name}.ts implementing WebhookProvider interface 2. Register in server.ts provider map 3. Create Inngest notify function(s) in functions/{name}-notify.ts 4. Export from functions/index.ts and add to functions/index.host.ts (or index.cluster.ts when cluster-owned) 5. Store webhook secret in agent-secrets → add lease to start.sh 6. Deploy: joelclaw inngest restart-worker --register 7. Register webhook URL with external service 8. Verify E2E with curl + real webhook
Key Files
| File | Purpose |
|---|---|
packages/system-bus/src/webhooks/types.ts | WebhookProvider interface, NormalizedEvent type |
packages/system-bus/src/webhooks/server.ts | Hono router — dispatches to providers, rate limiting |
packages/system-bus/src/webhooks/providers/ | Provider implementations (one file per service) |
packages/system-bus/src/inngest/functions/*-notify.ts | Gateway notification functions per provider |
packages/system-bus/src/inngest/functions/index.ts | Function exports barrel |
packages/system-bus/src/inngest/functions/index.host.ts | Host worker function registration (current active role) |
packages/system-bus/src/inngest/functions/index.cluster.ts | Cluster worker function registration (future/role split) |
packages/system-bus/src/serve.ts | Worker role selection + health endpoint + webhook provider list |
~/Code/joelhooks/joelclaw/packages/system-bus/start.sh | Secret leasing on host worker startup |
Debugging Webhooks
Check if webhook is arriving
# Watch worker logs
joelclaw logs worker --follow --grep webhook
# Or directly
curl -s http://localhost:3111/ | jq .webhooks
# → { endpoint: "/webhooks/:provider", providers: ["todoist", "front", "vercel"] }Signature verification failures
# Test with manual HMAC (SHA1 example for Vercel)
SECRET="your-webhook-secret"
BODY='{"type":"test-webhook","payload":{}}'
HMAC=$(echo -n "$BODY" | openssl dgst -sha1 -hmac "$SECRET" -binary | xxd -p)
curl -X POST http://localhost:3111/webhooks/vercel \
-H "Content-Type: application/json" \
-H "x-vercel-signature: $HMAC" \
-d "$BODY"Common failures:
- Wrong secret — Todoist uses
client_secret(not "Verification token"), Vercel uses the secret from webhook creation, Front uses the rules-based secret - Encoding mismatch — Todoist = base64, Vercel = hex, Front = base64 over compact JSON
- Body mutation — Caddy/proxy rewrites body. Use Tailscale Funnel → worker directly
- Rate limited — 20 auth failures per IP per minute. Wait or restart worker
Check Inngest received events
joelclaw runs --count 5
# Look for vercel-deploy-*, todoist-*, front-* function runsGateway not receiving notifications
joelclaw gateway status
joelclaw gateway events # Peek pending eventsRegistering Webhooks with Services
Vercel (Pro/Enterprise required)
# Via Vercel dashboard: Settings → Webhooks → Create
# Or via API:
VERCEL_TOKEN="your-api-token"
curl -X POST "https://api.vercel.com/v1/webhooks" \
-H "Authorization: Bearer $VERCEL_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://panda.tail7af24.ts.net/webhooks/vercel",
"events": ["deployment.created", "deployment.succeeded", "deployment.error", "deployment.canceled"]
}'The response includes a secret — store it: secrets add vercel_webhook_secret --value "..."
GitHub
Set up via repo Settings → Webhooks:
- URL:
https://panda.tail7af24.ts.net/webhooks/github - Content type:
application/json - Secret: generate one, store as
github_webhook_secret - Events: push, pull_request, deployment_status, or "Send me everything"
Todoist
Already configured via Todoist App Console → Webhooks tab. Uses client_secret as HMAC key (not the "Verification token").
Front
Already configured via Front Rules → "Trigger a webhook" action. Rules webhooks scope to specific inboxes at the rule layer.
Signature Algorithms by Provider
| Provider | Algorithm | Encoding | Header | Secret Source |
|---|---|---|---|---|
| Todoist | HMAC-SHA256 | base64 | x-todoist-hmac-sha256 | App Console → client_secret |
| Front | HMAC-SHA1 | base64 (over compact JSON) | x-front-signature | Rules webhook secret |
| Vercel | HMAC-SHA1 | hex | x-vercel-signature | Webhook creation response |
| GitHub | HMAC-SHA256 | hex (prefixed sha256=) | x-hub-signature-256 | Webhook config secret |
| Stripe | HMAC-SHA256 | hex | stripe-signature (structured) | Endpoint signing secret |
Gotchas
- Caddy drops Funnel POST bodies — Point Tailscale Funnel directly at worker
:3111, not through Caddy - `joelclaw inngest restart-worker --register` after deploy — ensures restart + registration in one step
- Vercel webhooks are Pro/Enterprise only — free plans cannot create account-level webhooks
- Front has TWO webhook types — App-level (SHA256, challenges) vs Rules-based (SHA1, no challenges). We use Rules-based
- agent-secrets v0.5.0+ — raw output is default, don't pass
--rawflag - Idempotency keys on all events — safe to receive duplicates from retry-happy providers
interface:
icon_small: "./assets/small-logo.svg"
icon_large: "./assets/large-logo.png"
<svg width="16" height="16" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="JoelClaw icon">
<defs>
<clipPath id="circle-clip">
<circle cx="256" cy="256" r="248" />
</clipPath>
</defs>
<circle cx="256" cy="256" r="248" fill="#0a0a0a" />
<g clip-path="url(#circle-clip)">
<path fill="#ff1493" d="M175.656 22.375l-48.47 82.094c-23.017 4.384-43.547 11.782-60.124 22.374-24.436 15.613-40.572 37.414-45.5 67.875-4.79 29.62 1.568 68.087 24.125 116.093 93.162 22.88 184.08-10.908 257.25-18.813 37.138-4.012 71.196-.898 96.344 22.97 22.33 21.19 36.21 56.808 41.908 113.436 29.246-35.682 44.538-69.065 49.343-99.594 5.543-35.207-2.526-66.97-20.31-95.593-8.52-13.708-19.368-26.618-32-38.626l14.217-33-41.218 10.625c-8.637-6.278-17.765-12.217-27.314-17.782l-7.03-59.782-38.157 37.406c-12.418-5.186-25.184-9.804-38.158-13.812l-8.375-71.28-57.625 56.5c-9.344-1.316-18.625-2.333-27.812-2.97l-31.094-78.125zM222 325.345c-39.146 7.525-82.183 14.312-127.156 11.686 47.403 113.454 207.056 224.082 260.125 87-101.18 33.84-95.303-49.595-132.97-98.686z" />
</g>
</svg>
Adding a New Webhook Provider — Full Checklist
Step-by-step for wiring a new external service's webhooks into the joelclaw gateway.
1. Create Provider Adapter
packages/system-bus/src/webhooks/providers/{provider}.ts
Implement the WebhookProvider interface from ../types.ts:
import { createHmac, timingSafeEqual } from "node:crypto";
import type { WebhookProvider, NormalizedEvent } from "../types";
/** Map provider event types → normalized event names */
const EVENT_MAP: Record<string, string> = {
"provider.event_type": "normalized.name",
};
function getSecret(): string {
const secret = process.env.MY_PROVIDER_WEBHOOK_SECRET;
if (!secret) throw new Error("MY_PROVIDER_WEBHOOK_SECRET env var required");
return secret;
}
export const myProvider: WebhookProvider = {
id: "my-provider",
eventPrefix: "my-provider",
verifySignature(rawBody: string, headers: Record<string, string>): boolean {
const signature = headers["x-my-provider-signature"];
if (!signature) return false;
const secret = getSecret();
// Adjust algorithm (sha1/sha256) and encoding (hex/base64) per provider docs
const computed = createHmac("sha256", secret).update(rawBody).digest("hex");
try {
return timingSafeEqual(
Buffer.from(signature, "hex"),
Buffer.from(computed, "hex"),
);
} catch {
return false;
}
},
normalizePayload(
body: Record<string, unknown>,
_headers: Record<string, string>,
): NormalizedEvent[] {
const type = body.type as string | undefined;
if (!type) return [];
const mappedName = EVENT_MAP[type];
if (!mappedName) return [];
return [{
name: mappedName,
data: {
// Extract meaningful fields — don't just pass the raw body
id: String(body.id ?? ""),
// ... provider-specific fields
},
idempotencyKey: `my-provider-${type}-${body.id ?? Date.now()}`,
}];
},
};Signature Algorithm Cheat Sheet
| Provider | Algorithm | Input | Encoding | Header |
|---|---|---|---|---|
| Todoist | SHA256 | rawBody | base64 | x-todoist-hmac-sha256 |
| Front (Rules) | SHA1 | JSON.stringify(JSON.parse(rawBody)) | base64 | x-front-signature |
| Vercel | SHA1 | rawBody | hex | x-vercel-signature |
| GitHub | SHA256 | rawBody | hex with sha256= prefix | x-hub-signature-256 |
| Stripe | SHA256 | ${timestamp}.${rawBody} | hex | stripe-signature (structured t=,v1=) |
⚠️ Gotcha: Some providers sign a transformed body (Front signs compact JSON, Stripe prepends timestamp). Always read the provider's docs carefully.
2. Register Route
In src/webhooks/server.ts:
import { myProvider } from "./providers/my-provider";
providers.set(myProvider.id, myProvider);Webhook URL becomes: POST /webhooks/my-provider
3. Create Notify Functions
src/inngest/functions/{provider}-notify.ts
Follow the pattern from todoist-notify.ts:
import { inngest } from "../client";
import type { GatewayContext } from "../middleware/gateway";
export const myProviderEventNotify = inngest.createFunction(
{ id: "my-provider-event-notify", name: "MyProvider → Gateway: Event" },
{ event: "my-provider/event.type" },
async ({ event, step, ...rest }) => {
const gateway = (rest as any).gateway as GatewayContext | undefined;
// Optional: enrich with API calls
const context = await step.run("enrich-context", async () => {
// Fetch additional data from provider API if needed
return { /* enriched fields */ };
});
const agentPrompt = await step.run("build-prompt", () => {
return [
`## 📌 Provider Event`,
"",
`**Summary**: ${event.data.summary}`,
`Context and next-action guidance for the agent.`,
].join("\n");
});
const result = await step.run("notify-gateway", async () => {
if (!gateway) return { pushed: false, reason: "no gateway context" };
return await gateway.notify("my-provider.event.type", {
prompt: agentPrompt,
...event.data,
...context,
});
});
return {
status: result.pushed ? "notified" : "skipped",
result,
};
}
);3-step pattern (enrich → build-prompt → notify)
All notify functions follow this pattern: 1. enrich-context — optional API call to get extra data the webhook didn't include 2. build-prompt — create human-readable markdown prompt for the gateway agent 3. notify-gateway — push to gateway with structured data + prompt
4. Register Functions
Export from src/inngest/functions/index.ts:
export { myProviderEventNotify } from "./my-provider-notify";Add to the active role list in src/inngest/functions/index.host.ts (or index.cluster.ts for cluster-owned functions):
// in src/inngest/functions/index.host.ts
import { myProviderEventNotify } from "./my-provider-notify";
export const hostFunctionDefinitions = [
// ...existing functions
myProviderEventNotify,
];Update the health endpoint's webhooks.providers and events sections in serve.ts when introducing a new provider/event family.
5. Store Secrets
# Add the webhook signing secret
secrets add my_provider_webhook_secret --value "the-actual-secret"
# Optional: API token for enrichment
secrets add my_provider_api_token --value "the-api-token"Add to ~/Code/joelhooks/joelclaw/packages/system-bus/start.sh:
MY_SECRET=$(secrets lease my_provider_webhook_secret --ttl 24h 2>/dev/null)
if [ -n "$MY_SECRET" ]; then
export MY_PROVIDER_WEBHOOK_SECRET="$MY_SECRET"
else
echo "WARNING: Failed to lease my_provider_webhook_secret" >&2
fi6. Deploy
# Restart + register in one command (reloads code + re-leases secrets)
joelclaw inngest restart-worker --register7. Register Webhook URL with External Service
Public URL pattern: https://panda.tail7af24.ts.net/webhooks/{provider}
Tailscale Funnel must be configured:
# Already running for existing webhooks — verify:
tailscale serve status
# Should show :443 → http://localhost:3111Each service has its own webhook registration process:
- Vercel: Dashboard → Settings → Webhooks → Create (or REST API)
- GitHub: Repo → Settings → Webhooks → Add webhook
- Todoist: App Console → Webhooks tab
- Front: Rules → "Trigger a webhook" action
- Stripe: Dashboard → Developers → Webhooks → Add endpoint
When creating the webhook, you'll get a signing secret — store it immediately with secrets add.
8. Verify E2E
# Manual test with correct HMAC
SECRET="your-webhook-secret"
BODY='{"type":"test","id":"test-123"}'
# SHA1 hex (Vercel):
HMAC=$(echo -n "$BODY" | openssl dgst -sha1 -hmac "$SECRET" -binary | xxd -p)
curl -X POST http://localhost:3111/webhooks/my-provider \
-H "Content-Type: application/json" \
-H "x-my-provider-signature: $HMAC" \
-d "$BODY"
# SHA256 base64 (Todoist):
HMAC=$(echo -n "$BODY" | openssl dgst -sha256 -hmac "$SECRET" -binary | base64)
curl -X POST http://localhost:3111/webhooks/my-provider \
-H "Content-Type: application/json" \
-H "x-my-provider-hmac-sha256: $HMAC" \
-d "$BODY"
# Check Inngest received events
joelclaw runs --count 3
# Check gateway got the notification
joelclaw gateway eventsCommon Issues
| Symptom | Cause | Fix |
|---|---|---|
| 401 Unauthorized | Wrong secret or encoding mismatch | Check algorithm + encoding in provider docs |
| 404 Not Found | Provider not registered in server.ts | Add to providers Map |
| Events arrive but no Inngest run | Function not registered in role list | Add to index.host.ts (or index.cluster.ts) + joelclaw inngest restart-worker --register |
| Inngest runs but gateway doesn't notify | No gateway session or null check | Check joelclaw gateway status |
| Webhook works locally but not from internet | Funnel not configured | tailscale serve status — verify :443 → :3111 |
| Body hash doesn't match | Caddy or proxy modifying body | Route Funnel directly to worker, not through Caddy |
| Provider auto-disables webhook | Too many failures (Front does this) | Fix the root cause, then re-enable in provider dashboard |