Configuration
notify.yaml
Every field in notify.yaml: the notification webhook, and which event types post to it.
This page lists every field in notify.yaml, the file that holds the notification webhook.
config/notify.yaml
enabled: true
url: https://hooks.example.com/services/T000/B000/XXXX # a secret: never shown back
base_url: https://kraft.example.com
events: [gate_requested, work_item_needs_human]
Settings › Notifications writes this file. How Kraft reads the file says when a hand edit takes effect. See Notifications for the payload and every event type, and Get notified when an item needs you to set it up.
| Field | Type | Default | Meaning |
|---|---|---|---|
enabled | boolean | false | Whether Kraft posts notifications. Nothing is sent while it is false, or while url is empty. |
url | string | unset | The webhook Kraft posts to. It is a secret and is never shown back. |
base_url | string | the address the server listens on | The start of the link in each notification. |
events | list | [gate_requested, work_item_needs_human] | The event types that send a notification. Any event type in Events works, but not the Live messages (intake_checked, apply_changed), which are not events. An unknown name makes the file invalid, as described below. |
To be told when a start is held for storage, add work_item_storage_held to events: the default list does not carry it.
How Kraft reads the file
- The file does not exist until the first save in Settings. Without it,
enabledisfalse. - Kraft reads the file at start and again after each save in Settings. A hand edit takes effect at the next save in Settings or at the next restart.
- A save in Settings refuses a
urlorbase_urlthat is not anhttporhttpsURL, an unknown event type, andenabled: truewithout aurl. - A file that is not valid YAML, holds a key this page does not list, or names an event type that does not exist is not loaded. Kraft logs a warning and sends no notifications until the file is fixed.
kraft admin doctorfails itsnotify.yamlrow and says why. - Settings cannot repair a file Kraft does not load: opening the Notifications page and a save both read the file first and answer
422. Edit the file by hand, fix or remove the bad name, then runkraft admin restart.
Related
- Notifications: the payload and every event type.
- Get notified when an item needs you: set the webhook up.
- Configuration: the other files in the config directory, and how Kraft rereads them.