Closed steebchen closed 4 weeks ago
For a webhook route /api/webhook, use as follows in pages/api/webhook.tsx:
pages/api/webhook.tsx
import { hatchet, workflow, workflow2 } from '@/lib/workflow' const secret = process.env.HATCHET_WEBHOOK_SECRET || 'secret' const webhooks = hatchet.webhooks([workflow, workflow2]) export default webhooks.nextJSHandler({ secret })
For a webhook route /api/webhook, use as follows in
pages/api/webhook.tsx
: