Notifications (Gotify and webhooks)
Aurral can send a notification for these events:
- Discover updated: the daily recommendation refresh finished.
- Flow finished: a flow finished its downloads. The message includes the number of finished and failed tracks.
- Request made: a user requested an album.
- Request available: a requested album was downloaded, or was already on disk.
Aurral can send notifications to Gotify, to webhooks, or to both. Gotify and webhooks have separate event switches. Aurral does not send an event that is turned off, even when a webhook URL exists.
Gotify
Section titled “Gotify”Gotify is a self-hosted push notification server.
- Open Settings > Connect > Gotify.
- Set Server URL to a Gotify address that Aurral can reach, for example
http://gotify:8888in Docker. - Enter the Application token of a Gotify application.
- Under Notification events, turn on the events that you want.
- Select Test notification.
Webhooks
Section titled “Webhooks”A webhook sends one HTTP request for each event. Configure webhooks in the Webhooks section of Settings > Connect. Each webhook has these fields:
- URL: the endpoint to call. It must start with
http://orhttps://. - Body: optional JSON. Leave it blank to send a
GETrequest. Enter a body to send aPOSTrequest. - Headers: optional header names and values.
The body can use these placeholders:
| Placeholder | Value |
|---|---|
$flowName |
The playlist name |
$flowPath |
The media path. For a flow, _flows/<flow-id>. For a static playlist, the Downloads Folder. |
$albumName, $artistName |
The requested album and its artist |
$username, $userId |
The user who requested the album |
$event |
The event name |
The album, user, and event placeholders apply to request events.
Under Notification events in the same tab, turn on the events that your webhooks send.
Test a webhook
Section titled “Test a webhook”Select Test webhook on a webhook card. Aurral sends the current URL, body, and headers at once. The test ignores the event switches and does not save the settings. It fills the placeholders with these values:
| Placeholder | Test value |
|---|---|
$event |
webhookTest |
$flowName |
Aurral webhook test |
$flowPath |
/aurral/test-webhook |
$albumName |
Test album |
$artistName |
Test artist |
$username |
webhook-test-user |
$userId |
webhook-test-user |