Skip to main content

Webhook Notifications

Xenon can send real-time notifications to Slack channels or generic HTTP endpoints when important events occur in your device lab. Notifications are configured and managed through the Dashboard Settings UI.


Event Types​

EventTriggerPayload
device_offlineA previously online device goes offlineudid, host, name
session_failedA test session ends with a failuresessionId, failureReason, device
device_newA new device is detected and registeredudid, name, platform

Webhook Types​

Slack Webhooks​

Xenon sends rich Slack messages with color-coded attachments:

  • Green — device_new (new device connected)
  • Red — device_offline, session_failed (alerts)

Each message includes structured fields for all payload attributes, plus a timestamp and "Xenon Device Farm" footer.

Setup:

  1. Create a Slack Incoming Webhook
  2. In Dashboard → Settings → Notifications, add the webhook URL
  3. Select the events you want to receive
  4. Save

Generic HTTP Webhooks​

For non-Slack integrations (PagerDuty, Teams, custom endpoints), Xenon sends a JSON POST:

{
"event": "device_offline",
"payload": {
"udid": "00008110-001A...",
"host": "lab-node-01",
"name": "iPhone 15 Pro"
}
}

Custom Payload Templates​

For advanced integrations, you can define a custom payload template using {{variable}} substitution:

{
"text": "Alert: {{eventType}} on device {{udid}}",
"device": "{{name}}",
"host": "{{host}}"
}

Supported variables:

  • {{eventType}} — The event name (device_offline, etc.)
  • Any key from the event payload ({{udid}}, {{sessionId}}, {{failureReason}}, etc.)
  • Nested access via dot notation: {{device.name}}
tip

If your template produces valid JSON, it will be sent as a JSON body. Otherwise, it's wrapped in a { "text": "..." } envelope — compatible with Slack, Microsoft Teams, and most webhook receivers.


Dashboard Configuration​

  1. Navigate to Settings → Notifications
  2. Click Add Webhook
  3. Enter the webhook URL
  4. Select events to subscribe to
  5. Optionally define a custom payload template
  6. Toggle Active on/off to enable or disable without deleting

API Reference​

EndpointMethodDescription
/xenon/api/webhooksGETList all webhook configurations
/xenon/api/webhooksPOSTCreate a new webhook
/xenon/api/webhooks/:idDELETEDelete a webhook configuration