Skip to content

feat(webhooks): log submissions to Discord servers via webhooks#196

Merged
Musiker15 merged 1 commit into
mainfrom
feat/discord-webhook-logging
Jul 9, 2026
Merged

feat(webhooks): log submissions to Discord servers via webhooks#196
Musiker15 merged 1 commit into
mainfrom
feat/discord-webhook-logging

Conversation

@Musiker15

Copy link
Copy Markdown
Member

Feature request: option to log submissions to other servers using webhooks.

What changed

Webhooks now have a delivery format. Alongside the existing generic JSON (HMAC-signed) hooks, a guild can register a Discord channel webhook URL and have submissions posted there as a formatted embed. This works for any Discord server, including ones the bot is not a member of, so a guild can mirror new submissions and status changes into an external log channel.

Details

  • Schema: webhooks.format (json | discord, default json) + migration.
  • Shared: WEBHOOK_FORMATS, Discord webhook URL validation on webhookInputSchema (a discord hook must be a real discord.com/api/webhooks/... URL), and buildDiscordWebhookBody() which renders a SubmissionWebhookPayload as an embed (applicant, status/transition, score, formatted answers, truncated to Discord's limits).
  • Bot: the delivery poller branches on format. Discord hooks send the embed body with no X-MSK-Signature (Discord does not verify one); JSON hooks are unchanged.
  • Dashboard: a format selector on the webhooks page. Discord hooks show a badge, a Discord-specific URL hint (Server Settings, Integrations, Webhooks), and hide the signing secret since it does not apply.

Reuses the existing webhook outbox, retry/backoff and per-event selection. On the same Pro-gated Webhooks tab as the generic hooks. Localized in all 7 languages. Added shared tests for the format validation and embed rendering. Typecheck, lint, tests (shared 90) and build all green. Migration applies via the deploy prisma migrate deploy.

How to use

Webhooks tab, Add endpoint, pick Discord webhook, paste a channel webhook URL from any server (Server Settings, Integrations, Webhooks), choose the events, done.

Adds a delivery format to webhooks. Alongside the existing generic JSON
(HMAC-signed) hooks, a guild can now register a Discord channel webhook URL and
have submissions posted there as a formatted embed. This works for any Discord
server, including ones the bot is not a member of, so a guild can mirror new
submissions and status changes into an external log channel.

- schema: webhooks.format ("json" | "discord") (+ migration)
- shared: WEBHOOK_FORMATS, Discord webhook URL validation on the input schema,
  and buildDiscordWebhookBody() to render a SubmissionWebhookPayload as an embed
- bot: the delivery poller branches on format; discord hooks send the embed body
  without an HMAC signature (Discord does not verify one)
- dashboard: a format selector on the webhooks page; Discord hooks show a badge,
  a Discord-specific URL hint, and hide the signing secret (not applicable)

Reuses the existing webhook outbox, retry/backoff and event selection. Localized
in all 7 languages. Added shared tests for the format validation and embed.
@Musiker15 Musiker15 merged commit d58fd77 into main Jul 9, 2026
3 checks passed
@Musiker15 Musiker15 deleted the feat/discord-webhook-logging branch July 9, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant