Step 1 — Expose a public URL
GitHub and Slack can’t reachlocalhost. Use ngrok to tunnel your local server:
https://abc123.ngrok-free.app. Copy it.
Get a stable URL (recommended)
Free ngrok accounts get a random URL on every restart — meaning you’d have to re-register your webhook every time. Claim a free static domain at dashboard.ngrok.com/domains and it’ll never change.
Step 2 — Create the webhook endpoint
Add one route to your server. All plugins share this single URL:app/api/webhook/route.ts
processWebhook handles everything: it identifies which plugin sent the event, verifies the signature, updates your local database, and runs your hooks.
Step 3 — Register and react
- GitHub
- Slack
Register in GitHub:React to events:
- Go to your repo → Settings → Webhooks → Add webhook
- Set Payload URL:
https://your-ngrok-url.ngrok-free.app/api/webhook - Set Content type:
application/json - Add a Secret — save it
- Choose events (or “Send me everything”)
- Click Add webhook
corsair.ts
How it works
What’s next
Workflows
Chain webhook events into multi-step automations.
Multi-Tenancy
Scope incoming webhooks per user with ?tenantId= param.
GitHub Webhooks
All available GitHub events and payload shapes.
Slack Webhooks
All available Slack events and payload shapes.