Send Godwit Sync run summaries to Discord
Discord's webhook format is not the same as Godwit Sync's payload, but Discord's Slack-compatible endpoint understands it directly, once you add one path segment.
Create a Discord webhook
Any Discord channel can receive run summaries through a server-side webhook.
- In Discord, open Server Settings → Integrations → Webhooks.
- Click "New Webhook", name it, and pick the channel that should receive run summaries.
- Click "Copy Webhook URL" (https://discord.com/api/webhooks/<id>/<token>).
Use the Slack-compatible endpoint
Godwit Sync's webhook payload is Slack-shaped: it posts a top-level text field, which is what Slack's incoming webhooks expect. Discord's native webhook format expects a content field instead, so posting straight to the URL from the previous step gets rejected. Appending /slack makes Discord parse the same Slack-shaped payload directly, no proxy or conversion required.
# Copied from Discord:
https://discord.com/api/webhooks/123456789012345678/AbCdEfGhIjKlMnOpQrStUvWxYz
# Used with --notify:
https://discord.com/api/webhooks/123456789012345678/AbCdEfGhIjKlMnOpQrStUvWxYz/slackDiscord ignores the extra structured fields Godwit Sync also sends (run_id, status, objects_total, and so on), the same way Slack does.
Point Godwit Sync at the webhook
Use the /slack-suffixed URL with --notify, on the CLI or in the hooks.notify config list.
godwit sync \
--source ./data \
--destination s3://backups/nightly \
--notify https://discord.com/api/webhooks/123456789012345678/AbCdEfGhIjKlMnOpQrStUvWxYz/slacksource:
url: ./data
destination:
url: s3://backups/nightly
hooks:
notify:
- https://discord.com/api/webhooks/123456789012345678/AbCdEfGhIjKlMnOpQrStUvWxYz/slackWhat lands in the channel
Discord renders the payload's top-level text field as the message body, the same as Slack.
Godwit run `nightly-backup` completed: 142 objects (5.0 GiB) transferred in 47s, 0 failures